Module:Township: Difference between revisions

getBuildingInfoBox: Add maximum building count
m (Remove testing code)
(getBuildingInfoBox: Add maximum building count)
Line 611: Line 611:
end
end


-- Maximum built
local biomeCount = Shared.tableCount(building.biomes)
local maxText = Shared.formatnum(building.maxUpgrades)
if biomeCount > 1 then
maxText = maxText .. ' per biome, ' .. Shared.formatnum(biomeCount * building.maxUpgrades) .. ' total'
end
table.insert(ret, '\n|-\n| <b>Maximum Built:</b><br/>' .. maxText)
-- Benefits
-- Benefits
local benefits = p._getBuildingGroupedBenefitText(building)
local benefits = p._getBuildingGroupedBenefitText(building)