1,124
edits
Line 162: | Line 162: | ||
end | end | ||
if workers or products then | if workers or products or requirements then | ||
local productionSet = {} | local productionSet = {} | ||
table.insert(productionSet, infoboxData(workers, 'Workers')) | table.insert(productionSet, infoboxData(workers, 'Workers')) | ||
Line 188: | Line 188: | ||
end | end | ||
end | end | ||
local maintenance = buildingData.maintenance | |||
local tax = buildingData.tax | |||
if maintenance or tax then | |||
local costSet = {} | |||
local maintenanceLabel = i.icon('maintenance cost', nil , nil, | |||
'Maintenance Cost', en) | |||
local taxLabel = i.icon('coin', nil, nil, 'Tax', 'en') | |||
table.insert(costSet, infoboxData(maintenance, maintenanceLabel)) | |||
table.insert(costSet, infoboxData(tax, taxLabel)) | |||
local costGroup = infoboxGroup(costSet, nil, 'Running Costs') | |||
for k, v in ipairs(costGroup) do | |||
result:node(v) | |||
end | |||
end | |||
return result | return result | ||
end | end | ||
return p | return p |