Added feature to add custom Transformations
This commit is contained in:
1 parent
46513ca399
commit
924bbafca6
10 files changed
+5060
-4876
No files matched your search
+33
-29
@@ -16,9 +16,9 @@ local charsToDebug = {
|
||||
"Markup roomtypes: |{{DevilRoom}}|{{AngelRoom}}|{{ChallengeRoom}}|{{IsaacsRoom}}|{{TreasureRoom}}|{{ArcadeRoom}}|{{BossRushRoom}}|{{Shop}}|{{SuperSecretRoom}}|{{BarrenRoom}}|{{MiniBoss}}|{{DiceRoom}}|{{GreedTreasureRoom}}|{{SecretRoom}}|{{Library}}|{{ChestRoom}}|{{BossRoom}}|{{CursedRoom}}|{{SacrificeRoom}}|",
|
||||
"Markup roomshapes: |{{Room}}|{{RoomLongHorizontal}}|{{RoomLongThinHorizontal}}|{{RoomSmallHorizontal}}|{{RoomLBottomRight}}|{{RoomSmallVertical}}|{{RoomLBottomLeft}}|{{RoomLTopLeft}}|{{RoomL}}|{{RoomLongVertical}}|{{RoomXL}}|{{RoomLongThinVertical}}|",
|
||||
"Markup transformations: |{{CustomTransformation}}|{{Guppy}}|{{FunGuy}}|{{LordoftheFlies}}|{{Conjoined}}|{{Spun}}|{{Mom}}|{{OhCrap}}|{{Bob}}|{{Leviathan}}|{{Seraphim}}|{{SuperBum}}|{{Bookworm}}|{{SpiderBaby}}|{{Adult}}|{{Stompy}}|",
|
||||
"Markup Main Colors: {{ColorText}}Text {{ColorTransform}}Transform {{ColorError}}Error {{ColorObjName}}ObjName",
|
||||
"Markup Colors: {{ColorBlack}}Black {{ColorWhite}}White {{ColorRed}}Red {{ColorLime}}Lime {{ColorBlue}}Blue {{ColorYellow}}Yellow {{ColorCyan}}Cyan {{ColorPink}}Pink {{ColorSilver}}Silver {{ColorGray}}Gray {{ColorMaroon}}Maroon {{ColorOlive}}Olive {{ColorGreen}}Green {{ColorPurple}}Purple {{ColorTeal}}Teal {{ColorNavy}}Navy ",
|
||||
"Markup swag Colors: {{ColorFade}}Fade {{CR}}{{ColorBlink}}Blink {{ColorRainbow}}Rainbow {{ColorBlink}}BlinkWithColor {{ColorFade}}BlinkColorFade",
|
||||
"Markup Main Colors: {{ColorText}}Text {{ColorTransform}}Transform {{ColorError}}Error {{ColorObjName}}ObjName {{ColorBlack}}Black {{ColorWhite}}White {{ColorRed}}Red {{ColorLime}}Lime {{ColorBlue}}Blue",
|
||||
"Markup Colors: {{ColorYellow}}Yellow {{ColorCyan}}Cyan {{ColorPink}}Pink {{ColorSilver}}Silver {{ColorGray}}Gray {{ColorMaroon}}Maroon {{ColorOlive}}Olive {{ColorGreen}}Green {{ColorPurple}}Purple {{ColorTeal}}Teal {{ColorNavy}}Navy {{ColorOrange}}Orange ",
|
||||
"Markup special Colors: {{ColorFade}}Fade {{CR}}{{ColorBlink}}Blink {{ColorRainbow}}Rainbow {{ColorBlink}}BlinkWithColor {{ColorFade}}BlinkColorFade",
|
||||
"End of line"
|
||||
}
|
||||
|
||||
@@ -26,21 +26,15 @@ local charsToDebug = {
|
||||
----------------LEGACY METHODS-----------------
|
||||
-----------------------------------------------
|
||||
------ Legacy Overriding descriptions ------
|
||||
__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[21] = "Test" -- Pill Effect 20 = Hematemesis
|
||||
__eidItemTransformations[1] = "Test Transformation" -- add custom transformation Text to Sad Onion
|
||||
__eidItemDescriptions[1] = "\1 Overriden Legacy description" -- 5.100.1 = Sad Onion
|
||||
__eidTrinketDescriptions[1] = "\2 Overriden Legacy description" -- 5.350.1 = swallowed penny
|
||||
__eidCardDescriptions[1] = "Overriden Legacy description" -- 5.300.1 = the fool
|
||||
__eidPillDescriptions[21] = "Overriden Legacy description" -- Pill Effect 20 = Hematemesis
|
||||
__eidItemTransformations[1] = "Legacy Transformation" -- add custom transformation Text to Sad Onion
|
||||
|
||||
------ Legacy add Description to entity ------
|
||||
__eidEntityDescriptions["5.10.1"] = {"Entity Name", "Entity description"} -- Adds description to full red hearts
|
||||
|
||||
-- the Transformation icon will try to get an icon with the same name as the transformation, but without any spaces. Default Icon otherwise
|
||||
__eidItemTransformations[2] = "Some Test Transformation"
|
||||
|
||||
------ Test: Add all transformations to spoon bender ------
|
||||
__eidItemTransformations[3] = "1,2,3,4,5,6,7,8,9,10,11,12,13"
|
||||
|
||||
------ Test: Description with colors ------
|
||||
__eidItemDescriptions[3] =
|
||||
"Some {{ColorRed}}long ass Test string with a lot of Words that sound interesting#With{{ColorBlink}} cool {{CR}}{{ColorRed}}C{{ColorGreen}}o{{ColorBlue}}l{{ColorYellow}}o{{ColorOrange}}r{{ColorPink}}s{{ColorWhite}} and a high amount of nifty {{ColorRainbow}}Swag "
|
||||
@@ -49,35 +43,45 @@ __eidItemDescriptions[3] =
|
||||
------------------NEW METHODS------------------
|
||||
-----------------------------------------------
|
||||
------ Overriding descriptions------
|
||||
EID:addCollectible(5, "New override Method") -- minimal method
|
||||
EID:addCollectible(6, "New override Method", "new Name", "ru") -- maximal method
|
||||
EID:addCollectible(2, "New override Method") -- minimal method
|
||||
EID:addCollectible(2, "New override Method", "new Name", "ru") -- maximal method
|
||||
EID:addCard(2, "New override Method", "new Name") -- card
|
||||
EID:addPill(2, "New override Method", "new Name") -- pill
|
||||
EID:addEntity(5, 10, 2, "Custom Name", "Custom description") -- Entity
|
||||
EID:addTransformation("collectible", 5, "New transformation") -- Transformation
|
||||
EID:addEntity(5, 10, 2, "Custom Name", "Custom description") -- Entity
|
||||
|
||||
------ Test: adding custom icons ------
|
||||
------ Test: adding custom transformation icon ------
|
||||
local dummySprite = Sprite()
|
||||
dummySprite:Load("gfx/eid_inline_icons.anm2", true)
|
||||
-- add animated icon using api function (Make sure to create new Sprite Obj when using animated icons. Reuse objects when only using static icons)
|
||||
EID:addIcon("TestIcon", "hearts", -1, 9, 9, -1, 0, dummySprite)
|
||||
-- add icon directly
|
||||
EID.InlineIcons["NewTransform1"] = {"hearts", 2, 9, 12, -1, 0,dummySprite}
|
||||
-- the Transformation icon will try to get an icon with the same name as the transformation, but without any spaces. Default Icon otherwise
|
||||
EID:createTransformation("NewTransform1", "New transformation") -- Transformation
|
||||
EID:createTransformation("NewTransform1", "New russian transformation", "ru") -- add Transformation name in russian
|
||||
|
||||
EID:assignTransformation("collectible", 5, "NewTransform1") -- Add Transformation to My Reflection
|
||||
|
||||
------ Test: Add all transformations + some customs ones to Inner Eye ------
|
||||
EID:assignTransformation("collectible", 2, "1,2,3,4,5,6,7,8,9,10,11,12,13,something Custom,NewTransform1")
|
||||
|
||||
------ Test: adding custom icons ------
|
||||
local dummySprite2 = Sprite()
|
||||
dummySprite2:Load("gfx/eid_inline_icons.anm2", true)
|
||||
EID.InlineIcons["Test"] = {"pickups", -1, 9, 9, -1, 0, dummySprite2}
|
||||
-- add animated icon using api function (Make sure to create new Sprite Obj when using animated icons. Reuse objects when only using static icons)
|
||||
EID:addIcon("TestIcon", "hearts", -1, 9, 9, -1, 0, dummySprite2)
|
||||
|
||||
|
||||
-- add icon directly
|
||||
local dummySprite3 = Sprite()
|
||||
dummySprite3:Load("gfx/eid_inline_icons.anm2", true)
|
||||
EID.InlineIcons["Test"] = {"pickups", -1, 9, 9, -1, 0, dummySprite3}
|
||||
|
||||
|
||||
__eidItemDescriptions[2] = "{{Bomb}} Emote {{Key}} Test {{Test}}{{TestIcon}} {{ColorBlackBlink}}description {{SomeInvalidInnerStuff}} cool" -- 5.100.2 = Inner Eye
|
||||
__eidItemDescriptions[6] = "This item as Inline Icon {{Collectible6}}#And here are others {{Collectible69}} {{Collectible16}} {{Collectible323}} {{Collectible345}} {{Collectible223}}#And some trinket sprites {{Trinket12}} {{Trinket22}} {{Trinket1}} {{Trinket55}} {{Trinket100}} {{Trinket123}}" -- 5.100.2 = Inner Eye
|
||||
|
||||
------ Test: adding custom transformation icon ------
|
||||
EID.InlineIcons["SomeTestTransformation"] = {"hearts", 2, 9, 9, -1, 0, dummySprite}
|
||||
|
||||
------ Test: adding custom icons ------
|
||||
EID:addColor("ColorTwitterBlue", KColor(0, 0.671875, 0.9296875, 1, 0, 0, 0), nil)
|
||||
EID:addColor(
|
||||
"ColorBlackBlink",
|
||||
nil,
|
||||
function(color)
|
||||
EID:addColor("ColorBlackBlink", nil, function(color)
|
||||
local maxAnimTime = 30
|
||||
local animTime = Game():GetFrameCount() % maxAnimTime
|
||||
color = EID:copyKColor(color) or EID:getTextColor()
|
||||
|
||||
Reference in new issue
Block a user