Anonymous

Module:Sandbox/GauTest/Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 713: Line 713:
if modifier == 0 then
if modifier == 0 then
-- Buildable but no bonuses
-- Buildable but no bonuses
table.insert(ret, '\r\n|style="background-color:grey;"|+0%')
table.insert(ret, '\r\n|class="table-na"|+0%')
else
else
-- Bonus or penalty
-- Bonus or penalty
local color = modifier < 0 and 'lightpink' or 'lightgreen'
local class = modifier < 0 and 'table-negative' or 'table-positive'
local modifier_value = Shared.numStrWithSign(modifier)
local modifier_value = Shared.numStrWithSign(modifier)
table.insert(ret, '\r\n|style="background-color:'..color..'"|<b>'..modifier_value..'%</b>')
table.insert(ret, '\r\n|class="'..class..'"|<b>'..modifier_value..'%</b>')
end
end
else
else
572

edits