Anonymous

Module:Sandbox/GauTest/Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 453: Line 453:
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', notext=true})..' '..building.provides[key])
local quantity = building.provides[key]
if quantity < 0 then
quantity = '<span style="color:red">'..quantity..'</span>'
else
quantity = Shared.numStrWithSign(quantity)
end
table.insert(benefits, Icons.Icon({stat, type='township', notext=true})..'&nbsp;'..quantity)
end
end
end
end
572

edits