606
edits
(Created page with "local com = require('Module:Common') local a = require('Module:Arguments') local i = require('Module:Icon') local p = {} function p.buildings(frame) local buildingList = mw.loadData('Module:BuildingIndex') local args = a.getArgs(frame) local buildingTable = mw.html.create('table') local dataTable = {} for k, v in pairs(buildingList) do if v.group == args['group'] or not args['group'] then table.insert(dataTable, k) end end table.sort(dataTable) building...") |
m |
||
| Line 48: | Line 48: | ||
table.insert(getUnlocks, c.building) | table.insert(getUnlocks, c.building) | ||
table.insert(getUnlocks, c.population) | table.insert(getUnlocks, c.population) | ||
if c. | if c.path then | ||
for k, v in pairs(c. | for k, v in pairs(c.path) do | ||
table.insert(getUnlocks, i.icon(k .. ' splendour', v, nil, nil, 'en')) | table.insert(getUnlocks, i.icon(k .. ' splendour', v, nil, nil, 'en')) | ||
end | end | ||
| Line 60: | Line 60: | ||
end | end | ||
local | local Unlocks = '' | ||
for k, v in ipairs(getUnlocks) do | for k, v in ipairs(getUnlocks) do | ||
Unlocks = Unlocks .. v | |||
if k ~= #getUnlocks then | if k ~= #getUnlocks then | ||
Unlocks = Unlocks .. '<br />' | |||
end | end | ||
end | end | ||
edits