184
edits
(fix slight mistake that broke aliases) |
(this should allow for changing sizes of spritesheets, it also may just break everything.) |
||
Line 170: | Line 170: | ||
self:setPosition(self.__source.ids[itemName].pos) | self:setPosition(self.__source.ids[itemName].pos) | ||
if self.__source.ids[itemName].spriteSheet then | if self.__source.ids[itemName].spriteSheet then | ||
local newSettings = require(types[self.__source.ids[itemName].spriteSheet]).settings | |||
self.__settings.classname = | self.__settings.classname = newSettings.classname | ||
self.__settings.size = newSettings.size | |||
self.__settings.tiles = newSettings.sheetsize / newSettings.size | |||
self.__settings.scale = newSettings.scale | |||
self.__settings.autoScale = newSettings.autoscale | |||
end | end | ||
end | end | ||
Line 180: | Line 184: | ||
self:setPosition(self.__source.ids[item].pos) | self:setPosition(self.__source.ids[item].pos) | ||
if self.__source.ids[item].spriteSheet then | if self.__source.ids[item].spriteSheet then | ||
local newSettings = require(types[self.__source.ids[item].spriteSheet]).settings | |||
self.__settings.classname = newSettings.classname | |||
self.__settings.size = newSettings.size | |||
self.__settings.tiles = newSettings.sheetsize / newSettings.size | |||
self.__settings.scale = newSettings.scale | |||
self.__settings.autoScale = newSettings.autoscale | |||
end | end | ||
else | else |