Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
2,563
edits
(aliases attempt #4) |
(add alias check support to UISlot.Decode (double alias attempt #2)) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
local UISlot = {} | local UISlot = {} | ||
local sprite = require([[Module:Sprite]]) | local sprite = require([[Module:Sprite]]) | ||
Line 51: | Line 45: | ||
end | end | ||
if #t == 1 then | if #t == 1 then | ||
return Sprites.minecraft:Item(item,"minecraft") | |||
elseif #t == 2 then | elseif #t == 2 then | ||
local spr = Sprites[mw.text.trim(t[1])] | local spr = Sprites[mw.text.trim(t[1])] | ||
if spr then | if spr then | ||
return spr:Item(mw.text.trim(t[2]), mw.text.trim(t[1])) | |||
else | else | ||
error("Unknown namespace: " .. mw.text.trim(t[1])) | error("Unknown namespace: " .. mw.text.trim(t[1])) |
edits