Halo Esports Wiki

We are currently performing extensive maintenance to this wiki and as a result there will likely be errors. Please be patient while we work to fix all problems.

READ MORE

Halo Esports Wiki
Advertisement
Halo Esports Wiki

To edit the documentation or categories for this module, click here.


local p = require('Module:RoleAbstract'):extends()

p.modifierLengths = {
	sub = {
		short = 'Sub',
		name = "Substitute",
		role = "Substitute",
		store = "Substitute",
		sentence = "substitute",
		prep = "for",
		article = "a",
		sortnumber = 16,
	},
	trainee = {
		short = 'TRN',
		name = 'Trainee',
		role = 'Trainee',
		store = 'Trainee',
		sentence = 'trainee',
		prep = 'with',
		article = 'a',
		sortnumber = 17,
	},
}

function p:name(opts)
	if not opts then opts = {} end
	if self.is_nil then return end
	if self:hasPrefix() and self:isIngame() then
		return self.modifierLengths[self.modifier][opts.len or self.defaultlength]
	end
	return self:get(opts.len)
end

function p:getSpriteKey(opts)
	if self:hasPrefix() and self:isIngame() then
		return self.modifierLengths[self.modifier].name
	end
	return self:super('getSpriteKey', opts)
end

return p
Advertisement