Module:Sandbox/User:Alsang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 79: | Line 79: | ||
end |
end |
||
local allWeapons = {} |
local allWeapons = {} |
||
for j,jtem in ipairs(weapons) do |
|||
table.insert(allWeapons,{suffixPage='[[' .. jtem .. ']]',prefixPage=''}) |
|||
end |
|||
for i,item in ipairs(variants) do |
for i,item in ipairs(variants) do |
||
for j,jtem in ipairs(weapons) do |
for j,jtem in ipairs(weapons) do |
||
table.insert(allWeapons,{ |
table.insert(allWeapons,{suffixPage='[[' .. jtem .. ' (' .. item .. ')]]',prefixPage='[[' .. item .. ' ' .. jtem .. ']]'}) |
||
end |
end |
||
end |
end |
||
for i,item in ipairs(allWeapons) do |
for i,item in ipairs(allWeapons) do |
||
local query = mw.smw.ask(item. |
local query = mw.smw.ask(item.suffixPage .. '|?Name #- = data|mainlabel=-') |
||
if type(query)=='table' then |
if type(query)=='table' then |
||
item. |
item.suffixItem = query[1].data |
||
end |
end |
||
local query = mw.smw.ask(item. |
local query = mw.smw.ask(item.suffixPage .. '|?Uses facility #- = data|mainlabel=-') |
||
if type(query)=='table' then |
if type(query)=='table' then |
||
item. |
item.suffixFacility = query[1].data |
||
end |
end |
||
local query = mw.smw.ask(item. |
local query = mw.smw.ask(item.prefixPage .. '|?Name #- = data|mainlabel=-') |
||
if type(query)=='table' then |
if type(query)=='table' then |
||
item. |
item.prefixItem = query[1].data |
||
end |
end |
||
local query = mw.smw.ask(item. |
local query = mw.smw.ask(item.prefixPage .. '|?Uses facility #- = data|mainlabel=-') |
||
if type(query)=='table' then |
if type(query)=='table' then |
||
item. |
item.prefixFacility = query[1].data |
||
end |
end |
||
Line 114: | Line 118: | ||
:tag('tr') |
:tag('tr') |
||
:tag('th') |
:tag('th') |
||
:wikitext('Suffix |
:wikitext('Suffix suffixPage') |
||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
:wikitext('Suffix |
:wikitext('Suffix suffixItem') |
||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
Line 123: | Line 127: | ||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
:wikitext('Prefix |
:wikitext('Prefix suffixPage') |
||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
:wikitext('Prefix |
:wikitext('Prefix suffixItem') |
||
:done() |
:done() |
||
:tag('th') |
:tag('th') |
||
Line 136: | Line 140: | ||
local row = out:tag('tr') |
local row = out:tag('tr') |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.suffixPage) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.suffixItem) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.suffixFacility) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.prefixPage) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.prefixItem) |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
:wikitext(item. |
:wikitext(item.prefixFacility) |
||
:done() |
:done() |
||