From 3ed0daea762ac5dab18495b42679c1c922e9b301 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Wed, 25 Nov 2020 20:21:41 +0100 Subject: [PATCH] Fixed Item sprite padding and rune sprites --- eid_api.lua | 10 +++------- main.lua | 3 +++ resources/gfx/eid_cardspills.anm2 | 10 +++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index ea20736e..9aea017f 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -374,16 +374,12 @@ function EID:createItemIconObject(str) local cardID,numReplace3 = string.gsub(str, "Card", "") if numReplace3 > 0 and cardID ~= "" and tonumber(cardID) ~= nil then if tonumber(cardID)>54 then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end - local spriteDummy = Sprite() - spriteDummy:Load("gfx/eid_cardspills.anm2", true) - return {"Cards",tonumber(cardID),8,8,0,0,spriteDummy} + return {"Cards",tonumber(cardID)-1,8,8,0,0,EID.CardPillSprite} end local pillID,numReplace4 = string.gsub(str, "Pill", "") if numReplace4 > 0 and pillID ~= "" and tonumber(pillID) ~= nil then if tonumber(pillID)>13 then return EID.InlineIcons[str] or EID.InlineIcons["Blank"] end - local spriteDummy = Sprite() - spriteDummy:Load("gfx/eid_cardspills.anm2", true) - return {"Pills",tonumber(pillID)-1,8,8,0,1,spriteDummy} + return {"Pills",tonumber(pillID)-1,9,8,0,1,EID.CardPillSprite} end if item == nil then return nil @@ -392,7 +388,7 @@ function EID:createItemIconObject(str) spriteDummy:Load("gfx/eid_inline_icons.anm2", true) spriteDummy:ReplaceSpritesheet(1, item.GfxFileName) spriteDummy:LoadGraphics() - return {"ItemIcon",0,7,7,-4,-2,spriteDummy} + return {"ItemIcon",0,11,7,-2,-2,spriteDummy} end -- Returns the icon for a given transformation name or ID diff --git a/main.lua b/main.lua index 940caec1..9ed47983 100644 --- a/main.lua +++ b/main.lua @@ -16,6 +16,9 @@ EID.IconSprite:Load("gfx/icons.anm2", true) EID.InlineIconSprite = Sprite() EID.InlineIconSprite:Load("gfx/eid_inline_icons.anm2", true) +EID.CardPillSprite = Sprite() +EID.CardPillSprite:Load("gfx/eid_cardspills.anm2", true) + EID.ItemSprite = Sprite() EID.ItemSprite:Load("gfx/005.100_collectible.anm2", true) diff --git a/resources/gfx/eid_cardspills.anm2 b/resources/gfx/eid_cardspills.anm2 index 353090bf..7149cf2b 100644 --- a/resources/gfx/eid_cardspills.anm2 +++ b/resources/gfx/eid_cardspills.anm2 @@ -1,5 +1,5 @@ - + @@ -75,12 +75,12 @@ - - - - + + + +