Difference between revisions of "Module:OTable"

Jump to navigation Jump to search
m
no edit summary
(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.splendour then
if c.path then
for k, v in pairs(c.splendour) do
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 preReq = ''
local Unlocks = ''
for k, v in ipairs(getUnlocks) do
for k, v in ipairs(getUnlocks) do
preReq = preReq .. v
Unlocks = Unlocks .. v
if k ~= #getUnlocks then
if k ~= #getUnlocks then
preReq = preReq .. '<br />'
Unlocks = Unlocks .. '<br />'
end
end
end
end
606

edits

Navigation menu