Module:Sprite: Difference between revisions

Jump to navigation Jump to search
Alias Attempt #5
No edit summary
(Alias Attempt #5)
Line 2: Line 2:


local Sprite = {}
local Sprite = {}
local aliasData = {
moduleAliases = [[Module:InventorySlot/Aliases]]
}
UISlot.aliasData = aliasData
local aliases = mw.loadData( aliasData.moduleAliases )


local types = {
local types = {
Line 112: Line 118:


function Sprite:setItem(item)
function Sprite:setItem(item)
self.__settings.name = item;
    if aliases[item] then
        spr.__settings.name = aliases[item].title;
    else
        self.__settings.name = item;
    end
if self.__source.ids[item] then
if self.__source.ids[item] then
self:setPosition(self.__source.ids[item].pos)
self:setPosition(self.__source.ids[item].pos)
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
2,564

edits

Navigation menu