Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
2,564
edits
(attempt at making alias titles work) |
(Getting aliases to work: attempt #2) |
||
Line 51: | Line 51: | ||
end | end | ||
if #t == 1 then | if #t == 1 then | ||
spr = Sprites.minecraft:Item(item) | |||
if aliases then | |||
local alias = aliases and aliases[item] | |||
spr.__settings.name = alias.title | |||
end | |||
return spr | |||
elseif #t == 2 then | elseif #t == 2 then | ||
local spr = Sprites[mw.text.trim(t[1])] | local spr = Sprites[mw.text.trim(t[1])] | ||
Line 57: | Line 62: | ||
spr = spr:Item(mw.text.trim(t[2])) | spr = spr:Item(mw.text.trim(t[2])) | ||
if aliases then | if aliases then | ||
spr.__settings.name = | local alias = aliases and aliases[item] | ||
spr.__settings.name = alias.title | |||
end | end | ||
return spr | return spr |
edits