Added support for custom Transformation icons
This commit is contained in:
1 parent
f537f79188
commit
3f0c7218aa
5 files changed
+94
-30
No files matched your search
@@ -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},
|
||||
}
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
+51
-15
@@ -1,8 +1,8 @@
|
||||
<AnimatedActor>
|
||||
<Info CreatedBy="Unknown" CreatedOn="30.07.2018 02:38:30" Version="13" Fps="30"/>
|
||||
<Info CreatedBy="Unknown" CreatedOn="26.09.2020 20:26:10" Version="23" Fps="30"/>
|
||||
<Content>
|
||||
<Spritesheets>
|
||||
<Spritesheet Path="EID_Icons.png" Id="0"/>
|
||||
<Spritesheet Path="eid_Icons.png" Id="0"/>
|
||||
</Spritesheets>
|
||||
<Layers>
|
||||
<Layer Name="1" Id="0" SpritesheetId="0"/>
|
||||
@@ -41,7 +41,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="0" YCrop="32" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="2" YCrop="34" Width="12" Height="12" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -53,7 +53,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="16" YCrop="32" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="18" YCrop="33" Width="13" Height="13" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -65,7 +65,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="9" YPivot="8" XCrop="15" YCrop="0" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="17" YCrop="0" Width="14" Height="14" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -77,7 +77,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="-1" YPosition="-1" XPivot="8" YPivot="8" XCrop="0" YCrop="15" Width="18" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="0" YCrop="16" Width="18" Height="15" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -89,7 +89,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="32" YCrop="17" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="36" YCrop="17" Width="8" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -101,7 +101,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="0" YCrop="48" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="5" YCrop="48" Width="7" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -113,7 +113,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="32" YCrop="32" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="32" YCrop="33" Width="15" Height="14" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -125,7 +125,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="16" YCrop="48" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="17" YCrop="50" Width="14" Height="12" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -137,7 +137,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="6" YPivot="8" XCrop="18" YCrop="16" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="18" YCrop="17" Width="13" Height="15" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -149,7 +149,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="12" YPivot="8" XCrop="32" YCrop="0" Width="21" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="32" YCrop="1" Width="21" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -161,7 +161,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="0" YCrop="0" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="0" YCrop="1" Width="15" Height="14" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -173,7 +173,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="0" YCrop="64" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="2" YCrop="65" Width="11" Height="14" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -185,7 +185,7 @@
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="8" YPivot="8" XCrop="32" YCrop="48" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="34" YCrop="48" Width="13" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
@@ -377,5 +377,41 @@
|
||||
<NullAnimations/>
|
||||
<Triggers/>
|
||||
</Animation>
|
||||
<Animation Name="Transformation14" FrameNum="1" Loop="false">
|
||||
<RootAnimation>
|
||||
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="34" YCrop="48" Width="0" Height="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
<Triggers/>
|
||||
</Animation>
|
||||
<Animation Name="Transformation15" FrameNum="1" Loop="false">
|
||||
<RootAnimation>
|
||||
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="34" YCrop="48" Width="0" Height="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
<Triggers/>
|
||||
</Animation>
|
||||
<Animation Name="TransformationCustom" FrameNum="1" Loop="false">
|
||||
<RootAnimation>
|
||||
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</RootAnimation>
|
||||
<LayerAnimations>
|
||||
<LayerAnimation LayerId="0" Visible="true">
|
||||
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="18" YCrop="64" Width="11" Height="14" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||
</LayerAnimation>
|
||||
</LayerAnimations>
|
||||
<NullAnimations/>
|
||||
<Triggers/>
|
||||
</Animation>
|
||||
</Animations>
|
||||
</AnimatedActor>
|
||||
Reference in new issue
Block a user