Module:Sandbox/GauTest/Township: Difference between revisions

no edit summary
(Migrate GetTownshipStatIcon to Icons.Icon)
No edit summary
Line 346: Line 346:
-- Tier
-- Tier
local tier = p._GetTierRequirements(building.tier)
local tier = p._GetTierRequirements(building.tier)
table.insert(ret, '\r\n|-\r\n| <b>Tier '..building.tier..'</b><ul><li>'..Icons._SkillReq('Township', tier.level, false)..'</li><li>'..Icons.Icon({'Population', type='township'})..'&nbsp;'..tier.population..'</li></ul>')
table.insert(ret, '\r\n|-\r\n| <b>Tier '..building.tier..'</b><ul><li>'..Icons._SkillReq('Township', tier.level, false)..'</li><li>'..Icons.Icon({'Population', type='township', notext=true})..'&nbsp;'..tier.population..'</li></ul>')
-- Upgrades From
-- Upgrades From
Line 387: Line 387:
for key, stat in pairs(stats) do
for key, stat in pairs(stats) do
if building.provides[key] ~= nil and building.provides[key] ~= 0 then
if building.provides[key] ~= nil and building.provides[key] ~= 0 then
table.insert(benefits, Icons.Icon({stat, type='township'})..'&nbsp;'..building.provides[key])
table.insert(benefits, Icons.Icon({stat, type='township', notext=true})..'&nbsp;'..building.provides[key])
end
end
end
end
Line 413: Line 413:
end
end
end
end
retProduction = table.concat(retProduction, ', ')..'/t ('..Icons.Icon({'Workers', type='township'})..'&nbsp;'..workers..')'
retProduction = table.concat(retProduction, ', ')..'/t ('..Icons.Icon({'Workers', type='township', notext=true})..'&nbsp;'..workers..')'
table.insert(retResources, retProduction)
table.insert(retResources, retProduction)
end
end
572

edits