Halo Esports Wiki
Advertisement
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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