572
edits
No edit summary |
No edit summary |
||
Line 339: | Line 339: | ||
-- Upgrades From | -- Upgrades From | ||
table.insert(ret, '\r\n|-\r\n|') | table.insert(ret, '\r\n|-\r\n|Base Cost') | ||
if building.upgradesFrom ~= nil then | if building.upgradesFrom ~= nil then | ||
local upgradesFromBuilding = p._GetBuildingByID(building.upgradesFrom) | local upgradesFromBuilding = p._GetBuildingByID(building.upgradesFrom) | ||
table.insert(ret, '< | table.insert(ret, '<br>'..Icons.Icon({upgradesFromBuilding.name, type='building'})..'<br>') | ||
end | end | ||
-- Cost | -- Cost | ||
Line 350: | Line 350: | ||
table.insert(cost, Icons.Icon({resource_data.name, type='resource', notext=true})..' '..resource.quantity) | table.insert(cost, Icons.Icon({resource_data.name, type='resource', notext=true})..' '..resource.quantity) | ||
end | end | ||
table.insert(ret, | table.insert(ret, table.concat(cost, ', ')) | ||
-- Upgrades To | -- Upgrades To | ||
Line 358: | Line 358: | ||
local upgradesTo = GameData.getEntities(Township.buildings, checkFunc) | local upgradesTo = GameData.getEntities(Township.buildings, checkFunc) | ||
if #upgradesTo > 0 then | if #upgradesTo > 0 then | ||
table.insert(ret, '\r\n|-\r\n| <b>Upgrades To:</b> '..Icons.Icon({upgradesTo[1].name, type='building'})) | table.insert(ret, '\r\n|-\r\n| <b>Upgrades To:</b><br>'..Icons.Icon({upgradesTo[1].name, type='building'})) | ||
-- Cost | -- Cost | ||
local upgrade_cost = {} | local upgrade_cost = {} | ||
Line 365: | Line 365: | ||
table.insert(upgrade_cost, Icons.Icon({resource_data.name, type='resource', notext=true})..' '..resource.quantity) | table.insert(upgrade_cost, Icons.Icon({resource_data.name, type='resource', notext=true})..' '..resource.quantity) | ||
end | end | ||
table.insert(ret, '<br | table.insert(ret, '<br>'..table.concat(upgrade_cost, ', ')) | ||
end | end | ||
edits