diff --git a/eid_data.lua b/eid_data.lua index a0354931..d7cbcab9 100644 --- a/eid_data.lua +++ b/eid_data.lua @@ -83,3 +83,24 @@ EID.InlineIcons = { ["RoomLBottomLeft"] = {"roomshape", 10, 10, 10}, ["RoomLBottomRight"] = {"roomshape", 11, 10, 10} } + +-- List of TransformationIcons based on their Name +--Format: [Ingame Name] = {Animationname, Width, Height, LeftOffset [Default: 0], TopOffset [Default: -3], IconSpriteObj (Optional)} +EID.TransformationIcons = { + ["Custom"] = {"TransformationCustom",11,16}, + ["Guppy"] = {"Transformation1",12,16}, + ["Fun Guy"] = {"Transformation2",13,16}, + ["Lord of the Flies"] = {"Transformation3",14,16}, + ["Conjoined"] = {"Transformation4",18,16}, + ["Spun"] = {"Transformation5",8,16}, + ["Mom"] = {"Transformation6",7,16}, + ["Oh crap"] = {"Transformation7",15,16}, + ["Bob"] ={"Transformation8",14,16}, + ["Leviathan"] = {"Transformation9",13,16}, + ["Seraphim"] = {"Transformation10",21,16}, + ["Super Bum"] = {"Transformation11",15,16}, + ["Bookworm"] = {"Transformation12",11,16}, + ["Spider Baby"] = {"Transformation13",13,16,0}, + ["Adult"] = {"Transformation14",0,16}, + ["Stompy"] = {"Transformation15",0,16}, +} \ No newline at end of file diff --git a/eid_debugging.lua b/eid_debugging.lua index f37eb5f9..9bc3190a 100644 --- a/eid_debugging.lua +++ b/eid_debugging.lua @@ -21,7 +21,7 @@ local charsToDebug = { } -- Legacy Overriding descriptions -__eidItemDescriptions[1] = "\1 Overriden" -- 5.100.1 = Sad Onion +__eidItemDescriptions[1] = "\1 Overriden description" -- 5.100.1 = Sad Onion __eidTrinketDescriptions[1] = "\2 Overriden " -- 5.350.1 = swallowed penny __eidCardDescriptions[1] = "Overriden Card description" -- 5.300.1 = the fool __eidPillDescriptions[1] = "Test" -- Doesnt seem to work diff --git a/main.lua b/main.lua index 54dfc976..6d8412af 100644 --- a/main.lua +++ b/main.lua @@ -127,25 +127,32 @@ function printDescription(desc) --Display Transformation if not (desc[2] == "0" or desc[2] == "" or desc[2] == nil) then + local transformationName = EID:getTransformationName(desc[2]) + local transformSprite = EID.TransformationIcons[transformationName] + if transformSprite == nil then + transformSprite = EID.TransformationIcons["Custom"] + end + local iconOffsetX = transformSprite[4] or 0 + local iconOffsetY = transformSprite[5] or -3 + if EIDConfig["TransformationIcons"] then + local iconSprite = transformSprite[6] or IconSprite + iconSprite:Play(transformSprite[1]) + iconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"]) + iconSprite:Render( + Vector(EIDConfig["XPosition"] + iconOffsetX * EIDConfig["Scale"], padding + iconOffsetY * EIDConfig["Scale"]), + Vector(0, 0), + Vector(0, 0) + ) + end if EIDConfig["TransformationText"] then EID:renderString( - EID:getTransformationName(desc[2]), - Vector(EIDConfig["XPosition"] + 16 * EIDConfig["Scale"], padding - 1), + transformationName, + Vector(EIDConfig["XPosition"] + (transformSprite[2]+iconOffsetX +3) * EIDConfig["Scale"], padding - 1), Vector(EIDConfig["Scale"], EIDConfig["Scale"]), EID:getTransformationColor(), false ) end - if EIDConfig["TransformationIcons"] and EID:isVanillaTransformationID(desc[2]) then - IconSprite:Play("Transformation" .. desc[2]) - IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"]) - IconSprite:Update() - IconSprite:Render( - Vector(EIDConfig["XPosition"] + 5 * EIDConfig["Scale"], padding + 5 * EIDConfig["Scale"]), - Vector(0, 0), - Vector(0, 0) - ) - end if (EIDConfig["TransformationIcons"] or EIDConfig["TransformationText"]) then padding = padding + lineHeight * EIDConfig["Scale"] end @@ -201,7 +208,7 @@ function printBulletPoints(description, padding) local textColor = EID:getTextColor() for i, lineToPrint in ipairs(formatedLines) do -- render bulletpoint - local posX = EIDConfig["XPosition"] + local posX = EIDConfig["XPosition"] if i == 1 then local bpIcon = EID:handleBulletpointIcon(lineToPrint) if EID:getIcon(bpIcon) ~= nil then @@ -212,7 +219,7 @@ function printBulletPoints(description, padding) end EID:renderString( lineToPrint, - Vector(posX + 12, padding), + Vector(posX + 12 * EIDConfig["Scale"], padding), Vector(EIDConfig["Scale"], EIDConfig["Scale"]), textColor, false diff --git a/resources/gfx/EID_Icons.png b/resources/gfx/EID_Icons.png index bc5f1574..cd4ce9b9 100644 Binary files a/resources/gfx/EID_Icons.png and b/resources/gfx/EID_Icons.png differ diff --git a/resources/gfx/icons.anm2 b/resources/gfx/icons.anm2 index cebaa9ee..5ab334ff 100644 --- a/resources/gfx/icons.anm2 +++ b/resources/gfx/icons.anm2 @@ -1,8 +1,8 @@ - + - + @@ -41,7 +41,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -113,7 +113,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -137,7 +137,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -161,7 +161,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -377,5 +377,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +