Module:Buildings

local p = {} local buildings = mw.loadData('Module:Buildings/data') local f = require('Module:Functions')

function p.table(frame) local data = { '==Character List==', '{| class="wikitable mw-datatable sortable" style="text-align: center;"', '|-',       '! Name', '! Picture', '! Relationships', '! data-sort-type="number" | Available', '|-'   }    for a, s in pairs(buildings) do        table.insert(data, '| '..a..f.noPage(frame,a,"")..'') table.insert(data, '| ') table.insert(data, '|'..getRelationships(frame,s.relationships,55)) table.insert(data, '|'..check(s.available)) table.insert(data, '|-') end table.insert(data, '|colspan=4| Add character') table.insert(data, '|}') return table.concat(data, "\n") end

return p