Module:CharacterInfobox: Difference between revisions

Content deleted Content added
m Fixed link; Added Allegiance function
m Added Ethos images
 
(8 intermediate revisions by the same user not shown)
Line 13:
output = ''
if not HF.isempty(field.Value) then
if field.valueValue == "IndependantAlliance" then
output = '[[File:Alliance_vector.svg|27px|link=]] ' .. '[[' .. field.Value .. ']]'
elseif field.Value == "Empire" then
output = '[[File:Empire_vector.svg|27px|link=]] ' .. '[[' .. field.Value .. ']]'
elseif field.Value == "Federation" then
output = '[[File:Federation_vector.svg|27px|link=]] ' .. '[[' .. field.Value .. ']]'
elseif field.Value == "Independent" then
output = field.Value
else
output = '[[' .. field.Value .. ']]'
end
return output
end
end
 
function Infobox.Ethos( field, vars )
output = ''
if not HF.isempty(field.Value) then
if field.Value == "Combat" then
output = '[[File:Ethos Combat.svg|27px|link=]] ' .. field.Value
elseif field.Value == "Covert" then
output = '[[File:Ethos Covert.svg|27px|link=]] ' .. field.Value
elseif field.Value == "Finance" then
output = '[[File:Ethos Finance.svg|27px|link=]] ' .. field.Value
elseif field.Value == "Social" then
output = '[[File:Ethos Social.svg|27px|link=]] ' .. field.Value
else
output = '[[' .. field.Value .. ']]'
Line 52 ⟶ 76:
output = field.Value
if not HF.isempty(field.PowerIcon) then
output = '[[File:' .. field.PowerIcon .. '|19px35px|link=]] ' .. output
end
return output
Line 60 ⟶ 84:
output = ''
if not HF.isempty(field.Value) then
output = '[[File:' .. field.Value .. '|285px306px]]'
end
return output