606
edits
m |
m |
||
| Line 213: | Line 213: | ||
---SECTION-CONSTRUCTION | ---SECTION-CONSTRUCTION | ||
if buildingData.construction then | if buildingData.construction then | ||
local | local constructionData = {} | ||
for resource, amount in pairs(buildingData.construction) do | for resource, amount in pairs(buildingData.construction) do | ||
local resourceIcon = i.icon(resource, amount, nil, com.firstUpper({resource}), 'en') | local resourceIcon = i.icon(resource, amount, nil, com.firstUpper({resource}), 'en') | ||
table.insert(constructionData, { label = resourceIcon }) | |||
end | end | ||
if | if #constructionData > 0 then | ||
addSection(infobox, constructionData, 'Construction Requirements') -- Call addSection without the column count | |||
end | end | ||
end | end | ||
--/ | --/ | ||
edits