Module:ShipInfobox: Difference between revisions
Content deleted Content added
m Added size 6 |
Merge from Module:ShipInfobox?new |
||
Line 4:
local lang = mw.language.new('en')
-- if a variable is required, this logic hides them if variable is empty
function Infobox.
-- Rather than ParserFunctions, try passing your variables this way.
if not HF.isempty(field.Requirement) then
output = field.Value
▲ local output = mw.html.create('span')
return tostring(output)
end
return output
end
function Infobox.Factionreq( field, vars )
local output = ''
if not HF.isempty(field.Value) then
output = '[[' .. field.Value .. ']]'
return output
end
end
-- replaces {{#if:{{{topspeed|}}}|{{{topspeed|?}}} m/s|---}} logic
| |||