444
edits
Inconvenient (talk | contribs) mNo edit summary |
Inconvenient (talk | contribs) (added runes) |
||
Line 5: | Line 5: | ||
local MagicData = mw.loadData('Module:Magic/data') | local MagicData = mw.loadData('Module:Magic/data') | ||
local ItemData = mw.loadData('Module:Items/data') | local ItemData = mw.loadData('Module:Items/data') | ||
local Shared = require('Module:Shared') | local Shared = require('Module:Shared') | ||
Line 20: | Line 19: | ||
result = result..'\r\n|}' | result = result..'\r\n|}' | ||
return result | return result | ||
end | |||
function p.getRuneNavbox(frame) | |||
local standardRunes = {} | |||
local combinationRunes = {} | |||
for i, item in pairs(ItemData.Items) do | |||
if (i >= 389 and i < 399) or (i >= 820 and i < 823) then | |||
table.insert(standardRunes, Icons.Icon({item.name, type='item'})) | |||
elseif i >= 823 and i < 830 then | |||
table.insert(combinationRunes, Icons.Icon({item.name, type='item'})) | |||
end | |||
end | |||
local result = '{| class="wikitable" style="margin:auto; clear:both; width: 100%"' | |||
result = result..'\r\n!colspan="2"|[[File:Air_Rune_(item).svg|25px|link=Runes]] [[Runes]]' | |||
result = result..'\r\n|-\r\n!scope="row"|Standard Runes' | |||
result = result..'\r\n|style="text-align:center;|'..table.concat(standardRunes, ' • ') | |||
result = result..'\r\n|-\r\n!scope="row"|Combination Runes' | |||
result = result..'\r\n|style="text-align:center;|'..table.concat(combinationRunes, ' • ') | |||
result = result..'\r\n|}' | |||
return result | |||
end | end | ||
edits