Différences entre les versions de « Module:Tables »

Aller à la navigation Aller à la recherche
79 octets ajoutés ,  14 août 2022 à 11:32
aucun résumé de modification
(Created page with "local com = require('Module:Common') local a = require('Module:Args') local i = require('Module:Icon') local p = {} function p.buildings(frame) local buildingList = mw.load('Module:Buildings') local args = a.getArgs(frame) local buildingTable = mw.html.create('table') buildingTable:addClass('wikitable sortable') :tag('tr') :tag('th') :wikitext('Name') :done() :tag('th') :wikitext('Prerequisites')...")
 
Ligne 8 : Ligne 8 :
local args = a.getArgs(frame)
local args = a.getArgs(frame)
local buildingTable = mw.html.create('table')
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)
buildingTable:addClass('wikitable sortable')
buildingTable:addClass('wikitable sortable')
    :tag('tr')
:tag('tr')
        :tag('th')
:tag('th')
            :wikitext('Name')
:wikitext('Name')
            :done()
:done()
        :tag('th')
:tag('th')
            :wikitext('Prerequisites')
:wikitext('Prerequisites')
            :done()
:done()
        :tag('th')
:tag('th')
            :wikitext('Production')
:wikitext('Production')
            :done()
:done()
        :tag('th')
:tag('th')
            :wikitext('Construction Requirements')
:wikitext('Construction Requirements')
            :done()
:done()
        :done()
:done()
 
end
end
1 124

modifications

Menu de navigation