Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,659
edits
m (It's far too late, I'm tired and really should stop making edits.) |
(Better nil check) |
||
Line 149: | Line 149: | ||
elseif aliases[item].name then | elseif aliases[item].name then | ||
self.__settings.title = aliases[item].name | self.__settings.title = aliases[item].name | ||
end | |||
if aliases[item].name ~= nil then | |||
local itemName = aliases[item].name | |||
self:setPosition(self.__source.ids[itemName].pos) | |||
if self.__source.ids[itemName].spriteSheet then | |||
self.__settings.image = getSpriteSheet(self.__source.ids[itemName].spriteSheet) | |||
end | |||
end | end | ||
else | else | ||
self.__settings.title = item; | self.__settings.title = item; | ||
if self.__source.ids[item] then | |||
self:setPosition(self.__source.ids[item].pos) | |||
if self.__source.ids[item].spriteSheet then | |||
self.__settings.image = getSpriteSheet(self.__source.ids[item].spriteSheet) | |||
end | |||
else | |||
self:setPosition(nil) --will use default | |||
end | end | ||
end | end | ||
return self | return self | ||
end | end |
edits