Removed some global variables and formatted files
This commit is contained in:
1 parent
bfa6addf65
commit
1c7df4ffb4
3 files changed
+193
-157
No files matched your search
Vendored
+29
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"__eidItemDescriptions",
|
||||||
|
"__eidTrinketDescriptions",
|
||||||
|
"__eidCardDescriptions",
|
||||||
|
"__eidPillDescriptions",
|
||||||
|
"__eidItemTransformations",
|
||||||
|
"__eidEntityDescriptions",
|
||||||
|
"Game",
|
||||||
|
"LevelCurse",
|
||||||
|
"Vector",
|
||||||
|
"PickupVariant",
|
||||||
|
"EntityType",
|
||||||
|
"Color",
|
||||||
|
"KColor",
|
||||||
|
"RegisterMod",
|
||||||
|
"Isaac",
|
||||||
|
"Sprite",
|
||||||
|
"Font",
|
||||||
|
"ModCallbacks",
|
||||||
|
"RoomType",
|
||||||
|
"DamageFlag",
|
||||||
|
"Input",
|
||||||
|
"CollectibleType",
|
||||||
|
"ModConfigMenu",
|
||||||
|
"Keyboard",
|
||||||
|
"ModConfigMenuOptionType"
|
||||||
|
]
|
||||||
|
}
|
||||||
+151
-144
@@ -16,103 +16,103 @@ EID.TextReplacementPairs = {
|
|||||||
|
|
||||||
--Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]}
|
--Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]}
|
||||||
EID.InlineIcons = {
|
EID.InlineIcons = {
|
||||||
["ERROR"] = {"ERROR", 0, 10, 10},
|
["ERROR"] = {"ERROR", 0, 10, 10},
|
||||||
["ArrowUp"] = {"ArrowUp", 0, 8, 9},
|
["ArrowUp"] = {"ArrowUp", 0, 8, 9},
|
||||||
["ArrowDown"] = {"ArrowDown", 0, 8, 9},
|
["ArrowDown"] = {"ArrowDown", 0, 8, 9},
|
||||||
["Warning"] = {"Warning", 0, 4, 9},
|
["Warning"] = {"Warning", 0, 4, 9},
|
||||||
-- Numbers
|
-- Numbers
|
||||||
["0"] = {"numbers", 0, 4, 7},
|
["0"] = {"numbers", 0, 4, 7},
|
||||||
["1"] = {"numbers", 1, 4, 7,-2},
|
["1"] = {"numbers", 1, 4, 7, -2},
|
||||||
["2"] = {"numbers", 2, 4, 7},
|
["2"] = {"numbers", 2, 4, 7},
|
||||||
["3"] = {"numbers", 3, 4, 7},
|
["3"] = {"numbers", 3, 4, 7},
|
||||||
["4"] = {"numbers", 4, 4, 7},
|
["4"] = {"numbers", 4, 4, 7},
|
||||||
["5"] = {"numbers", 5, 4, 7},
|
["5"] = {"numbers", 5, 4, 7},
|
||||||
["6"] = {"numbers", 6, 4, 7},
|
["6"] = {"numbers", 6, 4, 7},
|
||||||
["7"] = {"numbers", 7, 4, 7},
|
["7"] = {"numbers", 7, 4, 7},
|
||||||
["8"] = {"numbers", 8, 4, 7},
|
["8"] = {"numbers", 8, 4, 7},
|
||||||
["9"] = {"numbers", 9, 4, 7},
|
["9"] = {"numbers", 9, 4, 7},
|
||||||
["10"] = {"numbers", 10, 6, 7},
|
["10"] = {"numbers", 10, 6, 7},
|
||||||
["11"] = {"numbers", 11, 6, 7},
|
["11"] = {"numbers", 11, 6, 7},
|
||||||
["12"] = {"numbers", 12, 6, 7},
|
["12"] = {"numbers", 12, 6, 7},
|
||||||
-- Hearts
|
-- Hearts
|
||||||
["Heart"] = {"hearts", 0, 9, 9},
|
["Heart"] = {"hearts", 0, 9, 9},
|
||||||
["HalfHeart"] = {"hearts", 1, 9, 9},
|
["HalfHeart"] = {"hearts", 1, 9, 9},
|
||||||
["EthernalHeart"] = {"hearts", 2, 9, 9},
|
["EthernalHeart"] = {"hearts", 2, 9, 9},
|
||||||
["EmptyHeart"] = {"hearts", 3, 9, 9},
|
["EmptyHeart"] = {"hearts", 3, 9, 9},
|
||||||
["BlendedHeart"] = {"hearts", 4, 9, 9},
|
["BlendedHeart"] = {"hearts", 4, 9, 9},
|
||||||
["BoneHeart"] = {"hearts", 5, 9, 9},
|
["BoneHeart"] = {"hearts", 5, 9, 9},
|
||||||
["HalfBoneHeart"] = {"hearts", 6, 9, 9},
|
["HalfBoneHeart"] = {"hearts", 6, 9, 9},
|
||||||
["EmptyBoneHeart"] = {"hearts", 7, 9, 9},
|
["EmptyBoneHeart"] = {"hearts", 7, 9, 9},
|
||||||
["SoulHeart"] = {"hearts", 8, 9, 9},
|
["SoulHeart"] = {"hearts", 8, 9, 9},
|
||||||
["HalfSoulHeart"] = {"hearts", 9, 9, 9},
|
["HalfSoulHeart"] = {"hearts", 9, 9, 9},
|
||||||
["BlackHeart"] = {"hearts", 10, 9, 9},
|
["BlackHeart"] = {"hearts", 10, 9, 9},
|
||||||
["HalfBlackHeart"] = {"hearts", 11, 9, 9},
|
["HalfBlackHeart"] = {"hearts", 11, 9, 9},
|
||||||
["GoldenHeart"] = {"hearts", 12, 9, 9},
|
["GoldenHeart"] = {"hearts", 12, 9, 9},
|
||||||
["CoinHeart"] = {"hearts", 13, 9, 9},
|
["CoinHeart"] = {"hearts", 13, 9, 9},
|
||||||
["HalfCoinHeart"] = {"hearts", 14, 9, 9},
|
["HalfCoinHeart"] = {"hearts", 14, 9, 9},
|
||||||
["EmptyCoinHeart"] = {"hearts", 15, 9, 9},
|
["EmptyCoinHeart"] = {"hearts", 15, 9, 9},
|
||||||
-- Pickups
|
-- Pickups
|
||||||
["Key"] = {"pickups", 0, 7, 9},
|
["Key"] = {"pickups", 0, 7, 9},
|
||||||
["GoldenKey"] = {"pickups", 1, 7, 9},
|
["GoldenKey"] = {"pickups", 1, 7, 9},
|
||||||
["Bomb"] = {"pickups", 2, 10, 9},
|
["Bomb"] = {"pickups", 2, 10, 9},
|
||||||
["GoldenBomb"] = {"pickups", 3, 10, 9},
|
["GoldenBomb"] = {"pickups", 3, 10, 9},
|
||||||
["Coin"] = {"pickups", 4, 7, 9},
|
["Coin"] = {"pickups", 4, 7, 9},
|
||||||
["Rune"] = {"pickups", 5, 8, 9},
|
["Rune"] = {"pickups", 5, 8, 9},
|
||||||
["Card"] = {"pickups", 6, 11, 11},
|
["Card"] = {"pickups", 6, 11, 11},
|
||||||
["RedCard"] = {"pickups", 7, 11, 11},
|
["RedCard"] = {"pickups", 7, 11, 11},
|
||||||
["Pill"] = {"pickups", 8, 9, 9},
|
["Pill"] = {"pickups", 8, 9, 9},
|
||||||
["Battery"] = {"pickups", 9, 8, 9},
|
["Battery"] = {"pickups", 9, 8, 9},
|
||||||
["Collectible"] = {"Collectible", 0, 7, 7},
|
["Collectible"] = {"Collectible", 0, 7, 7},
|
||||||
["Trinket"] = {"Trinket", 0, 7, 7},
|
["Trinket"] = {"Trinket", 0, 7, 7},
|
||||||
["Slotmachine"] = {"Slotmachine", 0, 7, 7},
|
["Slotmachine"] = {"Slotmachine", 0, 7, 7},
|
||||||
-- Room Icons
|
-- Room Icons
|
||||||
["Shop"] = {"roomicons", 0, 7, 9},
|
["Shop"] = {"roomicons", 0, 7, 9},
|
||||||
["SecretRoom"] = {"roomicons", 1, 7, 9},
|
["SecretRoom"] = {"roomicons", 1, 7, 9},
|
||||||
["SuperSecretRoom"] = {"roomicons", 2, 7, 9},
|
["SuperSecretRoom"] = {"roomicons", 2, 7, 9},
|
||||||
["Library"] = {"roomicons", 3, 8, 9},
|
["Library"] = {"roomicons", 3, 8, 9},
|
||||||
["TreasureRoom"] = {"roomicons", 4, 7, 9},
|
["TreasureRoom"] = {"roomicons", 4, 7, 9},
|
||||||
["AngelRoom"] = {"roomicons", 5, 7, 9},
|
["AngelRoom"] = {"roomicons", 5, 7, 9},
|
||||||
["DevilRoom"] = {"roomicons", 6, 7, 9},
|
["DevilRoom"] = {"roomicons", 6, 7, 9},
|
||||||
["MiniBoss"] = {"roomicons", 7, 7, 9},
|
["MiniBoss"] = {"roomicons", 7, 7, 9},
|
||||||
["BossRoom"] = {"roomicons", 8, 9, 9},
|
["BossRoom"] = {"roomicons", 8, 9, 9},
|
||||||
["ChallengeRoom"] = {"roomicons", 9, 7, 9},
|
["ChallengeRoom"] = {"roomicons", 9, 7, 9},
|
||||||
["BossRushRoom"] = {"roomicons", 10, 7, 9},
|
["BossRushRoom"] = {"roomicons", 10, 7, 9},
|
||||||
["CursedRoom"] = {"roomicons", 11, 7, 9},
|
["CursedRoom"] = {"roomicons", 11, 7, 9},
|
||||||
["SacrificeRoom"] = {"roomicons", 12, 7, 9},
|
["SacrificeRoom"] = {"roomicons", 12, 7, 9},
|
||||||
["ArcadeRoom"] = {"roomicons", 13, 7, 9},
|
["ArcadeRoom"] = {"roomicons", 13, 7, 9},
|
||||||
["GreedTreasureRoom"] = {"roomicons", 14, 7, 9},
|
["GreedTreasureRoom"] = {"roomicons", 14, 7, 9},
|
||||||
["DiceRoom"] = {"roomicons", 15, 8, 9},
|
["DiceRoom"] = {"roomicons", 15, 8, 9},
|
||||||
["ChestRoom"] = {"roomicons", 16, 8, 9},
|
["ChestRoom"] = {"roomicons", 16, 8, 9},
|
||||||
["IsaacsRoom"] = {"roomicons", 17, 8, 9},
|
["IsaacsRoom"] = {"roomicons", 17, 8, 9},
|
||||||
["BarrenRoom"] = {"roomicons", 18, 8, 9},
|
["BarrenRoom"] = {"roomicons", 18, 8, 9},
|
||||||
-- Roomshape Icons
|
-- Roomshape Icons
|
||||||
["Room"] = {"roomshape", 0, 9, 9},
|
["Room"] = {"roomshape", 0, 9, 9},
|
||||||
["RoomSmallHorizontal"] = {"roomshape", 1, 9, 9},
|
["RoomSmallHorizontal"] = {"roomshape", 1, 9, 9},
|
||||||
["RoomSmallVertical"] = {"roomshape", 2, 7, 6},
|
["RoomSmallVertical"] = {"roomshape", 2, 7, 6},
|
||||||
["RoomLongVertical"] = {"roomshape", 3, 7, 9},
|
["RoomLongVertical"] = {"roomshape", 3, 7, 9},
|
||||||
["RoomLongHorizontal"] = {"roomshape", 4, 11, 9},
|
["RoomLongHorizontal"] = {"roomshape", 4, 11, 9},
|
||||||
["RoomLongThinVertical"] = {"roomshape", 5, 5, 9},
|
["RoomLongThinVertical"] = {"roomshape", 5, 5, 9},
|
||||||
["RoomLongThinHorizontal"] = {"roomshape", 6, 11, 9},
|
["RoomLongThinHorizontal"] = {"roomshape", 6, 11, 9},
|
||||||
["RoomXL"] = {"roomshape", 7, 11, 11},
|
["RoomXL"] = {"roomshape", 7, 11, 11},
|
||||||
["RoomL"] = {"roomshape", 8, 10, 10},
|
["RoomL"] = {"roomshape", 8, 10, 10},
|
||||||
["RoomLTopLeft"] = {"roomshape", 9, 10, 10},
|
["RoomLTopLeft"] = {"roomshape", 9, 10, 10},
|
||||||
["RoomLBottomLeft"] = {"roomshape", 10, 10, 10},
|
["RoomLBottomLeft"] = {"roomshape", 10, 10, 10},
|
||||||
["RoomLBottomRight"] = {"roomshape", 11, 10, 10},
|
["RoomLBottomRight"] = {"roomshape", 11, 10, 10},
|
||||||
-- Transformation Icons
|
-- Transformation Icons
|
||||||
["CustomTransformation"] = {"TransformationCustom",0,11,14, 0, -1, EID.IconSprite},
|
["CustomTransformation"] = {"TransformationCustom", 0, 11, 14, 0, -1, EID.IconSprite},
|
||||||
["Guppy"] = {"Transformation1",0,11,13, 0, -1, EID.IconSprite},
|
["Guppy"] = {"Transformation1", 0, 11, 13, 0, -1, EID.IconSprite},
|
||||||
["FunGuy"] = {"Transformation2",0,13,13, 0, -1, EID.IconSprite},
|
["FunGuy"] = {"Transformation2", 0, 13, 13, 0, -1, EID.IconSprite},
|
||||||
["LordoftheFlies"] = {"Transformation3",0,14,14, 0, -1, EID.IconSprite},
|
["LordoftheFlies"] = {"Transformation3", 0, 14, 14, 0, -1, EID.IconSprite},
|
||||||
["Conjoined"] = {"Transformation4",0,18,15, 0, -1, EID.IconSprite},
|
["Conjoined"] = {"Transformation4", 0, 18, 15, 0, -1, EID.IconSprite},
|
||||||
["Spun"] = {"Transformation5",0,7,15, 0, -1, EID.IconSprite},
|
["Spun"] = {"Transformation5", 0, 7, 15, 0, -1, EID.IconSprite},
|
||||||
["Mom"] = {"Transformation6",0,7,16, 0, -1, EID.IconSprite},
|
["Mom"] = {"Transformation6", 0, 7, 16, 0, -1, EID.IconSprite},
|
||||||
["OhCrap"] = {"Transformation7",0,15,14, 0, -1, EID.IconSprite},
|
["OhCrap"] = {"Transformation7", 0, 15, 14, 0, -1, EID.IconSprite},
|
||||||
["Bob"] ={"Transformation8",0,13,13, 0, -1, EID.IconSprite},
|
["Bob"] = {"Transformation8", 0, 13, 13, 0, -1, EID.IconSprite},
|
||||||
["Leviathan"] = {"Transformation9",0,13,15, 0, -1, EID.IconSprite},
|
["Leviathan"] = {"Transformation9", 0, 13, 15, 0, -1, EID.IconSprite},
|
||||||
["Seraphim"] = {"Transformation10",0,20,14, 0, -1, EID.IconSprite},
|
["Seraphim"] = {"Transformation10", 0, 20, 14, 0, -1, EID.IconSprite},
|
||||||
["SuperBum"] = {"Transformation11",0,14,15, 0, -1, EID.IconSprite},
|
["SuperBum"] = {"Transformation11", 0, 14, 15, 0, -1, EID.IconSprite},
|
||||||
["Bookworm"] = {"Transformation12",0,10,14, 0, -1, EID.IconSprite},
|
["Bookworm"] = {"Transformation12", 0, 10, 14, 0, -1, EID.IconSprite},
|
||||||
["SpiderBaby"] = {"Transformation13",0,13,16, 0, -1, EID.IconSprite},
|
["SpiderBaby"] = {"Transformation13", 0, 13, 16, 0, -1, EID.IconSprite},
|
||||||
--["Adult"] = {"Transformation14",0,0,13, -1, -1, EID.IconSprite},
|
--["Adult"] = {"Transformation14",0,0,13, -1, -1, EID.IconSprite},
|
||||||
--["Stompy"] = {"Transformation15",0,0,13, -1, -1, EID.IconSprite},
|
--["Stompy"] = {"Transformation15",0,0,13, -1, -1, EID.IconSprite},
|
||||||
}
|
}
|
||||||
@@ -120,72 +120,79 @@ EID.InlineIcons = {
|
|||||||
-- Table that holds Colors used for markup objects. Example: "{{ColorRed}}"
|
-- Table that holds Colors used for markup objects. Example: "{{ColorRed}}"
|
||||||
-- Format: ["Shortcut"] = KColor
|
-- Format: ["Shortcut"] = KColor
|
||||||
-- callbacks receive 1 argument, containing the previously used Color object.
|
-- callbacks receive 1 argument, containing the previously used Color object.
|
||||||
EID.InlineColors ={
|
EID.InlineColors = {
|
||||||
-- Default colors
|
-- Default colors
|
||||||
["ColorText"] = function (_) return EID:getTextColor() end,
|
["ColorText"] = function(_) return EID:getTextColor() end,
|
||||||
["ColorTransform"] = function (_) return EID:getTransformationColor() end,
|
["ColorTransform"] = function(_) return EID:getTransformationColor() end,
|
||||||
["ColorError"] = function (_) return EID:getErrorColor() end,
|
["ColorError"] = function(_) return EID:getErrorColor() end,
|
||||||
["ColorObjName"] = function (_) return EID:getNameColor() end,
|
["ColorObjName"] = function(_) return EID:getNameColor() end,
|
||||||
["ColorReset"] = function (_) return EID.LastRenderCallColor end,
|
["ColorReset"] = function(_) return EID.LastRenderCallColor end,
|
||||||
|
|
||||||
-- Basic Colors
|
-- Basic Colors
|
||||||
["ColorBlack"] = KColor(0, 0, 0, 1, 0,0,0),
|
["ColorBlack"] = KColor(0, 0, 0, 1, 0, 0, 0),
|
||||||
["ColorWhite"] = KColor(1, 1, 1, 1, 0,0,0),
|
["ColorWhite"] = KColor(1, 1, 1, 1, 0, 0, 0),
|
||||||
["ColorRed"] = KColor(1, 0, 0, 1, 0,0,0),
|
["ColorRed"] = KColor(1, 0, 0, 1, 0, 0, 0),
|
||||||
["ColorLime"] = KColor(0, 1, 0, 1, 0,0,0),
|
["ColorLime"] = KColor(0, 1, 0, 1, 0, 0, 0),
|
||||||
["ColorBlue"] = KColor(0, 0, 1, 1, 0,0,0),
|
["ColorBlue"] = KColor(0, 0, 1, 1, 0, 0, 0),
|
||||||
["ColorYellow"] = KColor(1, 1, 0, 1, 0,0,0),
|
["ColorYellow"] = KColor(1, 1, 0, 1, 0, 0, 0),
|
||||||
["ColorCyan"] = KColor(0, 1, 1, 1, 0,0,0),
|
["ColorCyan"] = KColor(0, 1, 1, 1, 0, 0, 0),
|
||||||
["ColorPink"] = KColor(1, 0, 1, 1, 0,0,0),
|
["ColorPink"] = KColor(1, 0, 1, 1, 0, 0, 0),
|
||||||
["ColorSilver"] = KColor(0.75, 0.75, 0.75, 1, 0,0,0),
|
["ColorSilver"] = KColor(0.75, 0.75, 0.75, 1, 0, 0, 0),
|
||||||
["ColorGray"] = KColor(0.5, 0.5, 0.5, 1, 0,0,0),
|
["ColorGray"] = KColor(0.5, 0.5, 0.5, 1, 0, 0, 0),
|
||||||
["ColorMaroon"] = KColor(0.5, 0, 0, 1, 0,0,0),
|
["ColorMaroon"] = KColor(0.5, 0, 0, 1, 0, 0, 0),
|
||||||
["ColorOlive"] = KColor(0.5, 0.5, 0, 1, 0,0,0),
|
["ColorOlive"] = KColor(0.5, 0.5, 0, 1, 0, 0, 0),
|
||||||
["ColorGreen"] = KColor(0, 0.5, 0, 1, 0,0,0),
|
["ColorGreen"] = KColor(0, 0.5, 0, 1, 0, 0, 0),
|
||||||
["ColorPurple"] = KColor(0.5, 0, 0.5, 1, 0,0,0),
|
["ColorPurple"] = KColor(0.5, 0, 0.5, 1, 0, 0, 0),
|
||||||
["ColorTeal"] = KColor(0, 0.5, 0.5, 1, 0,0,0),
|
["ColorTeal"] = KColor(0, 0.5, 0.5, 1, 0, 0, 0),
|
||||||
["ColorNavy"] = KColor(0, 0, 0.5, 1, 0,0,0),
|
["ColorNavy"] = KColor(0, 0, 0.5, 1, 0, 0, 0),
|
||||||
["ColorOrange"] = KColor(1, 0.54, 0, 1, 0,0,0),
|
["ColorOrange"] = KColor(1, 0.54, 0, 1, 0, 0, 0),
|
||||||
-- Swag Colors
|
-- Swag Colors
|
||||||
|
|
||||||
-- Rainbow color effect
|
-- Rainbow color effect
|
||||||
["ColorRainbow"] = function (_)
|
["ColorRainbow"] = function(_)
|
||||||
local maxAnimTime = 80
|
local maxAnimTime = 80
|
||||||
local animTime = Game():GetFrameCount() % maxAnimTime
|
local animTime = Game():GetFrameCount() % maxAnimTime
|
||||||
local c = EID.InlineColors
|
local c = EID.InlineColors
|
||||||
local colors = {c["ColorRed"],c["ColorYellow"],c["ColorLime"],c["ColorCyan"],c["ColorBlue"],c["ColorPink"]}
|
local colors = {c["ColorRed"], c["ColorYellow"], c["ColorLime"], c["ColorCyan"], c["ColorBlue"], c["ColorPink"]}
|
||||||
local colorFractions = (maxAnimTime-1)/#colors
|
local colorFractions = (maxAnimTime - 1) / #colors
|
||||||
local subAnm = math.floor(animTime/(colorFractions+1))+1
|
local subAnm = math.floor(animTime / (colorFractions + 1)) + 1
|
||||||
local primaryColorIndex = subAnm%(#colors+1)
|
local primaryColorIndex = subAnm % (#colors + 1)
|
||||||
if primaryColorIndex == 0 then primaryColorIndex = 1 end
|
if primaryColorIndex == 0 then
|
||||||
local secondaryColorIndex = (subAnm+1)%(#colors+1)
|
primaryColorIndex = 1
|
||||||
if secondaryColorIndex == 0 then secondaryColorIndex = 1 end
|
end
|
||||||
return EID:interpolateColors(colors[primaryColorIndex], colors[secondaryColorIndex], (animTime%(colorFractions+1))/colorFractions)
|
local secondaryColorIndex = (subAnm + 1) % (#colors + 1)
|
||||||
end,
|
if secondaryColorIndex == 0 then
|
||||||
|
secondaryColorIndex = 1
|
||||||
|
end
|
||||||
|
return EID:interpolateColors(
|
||||||
|
colors[primaryColorIndex],
|
||||||
|
colors[secondaryColorIndex],
|
||||||
|
(animTime % (colorFractions + 1)) / colorFractions
|
||||||
|
)
|
||||||
|
end,
|
||||||
-- Text will blink frequently
|
-- Text will blink frequently
|
||||||
["ColorBlink"] = function (color)
|
["ColorBlink"] = function(color)
|
||||||
local maxAnimTime = 40
|
local maxAnimTime = 40
|
||||||
local animTime = Game():GetFrameCount() % maxAnimTime
|
local animTime = Game():GetFrameCount() % maxAnimTime
|
||||||
color = EID:copyKColor(color) or EID:getTextColor()
|
color = EID:copyKColor(color) or EID:getTextColor()
|
||||||
if animTime<maxAnimTime/2 then
|
if animTime < maxAnimTime / 2 then
|
||||||
color.Alpha = 1 *color.Alpha
|
color.Alpha = 1 * color.Alpha
|
||||||
else
|
else
|
||||||
color.Alpha = 0 *color.Alpha
|
color.Alpha = 0 * color.Alpha
|
||||||
end
|
end
|
||||||
return color
|
return color
|
||||||
end,
|
end,
|
||||||
-- Text will fade in and out
|
-- Text will fade in and out
|
||||||
["ColorFade"] = function (color)
|
["ColorFade"] = function(color)
|
||||||
local maxAnimTime = 30
|
local maxAnimTime = 30
|
||||||
local animTime = Game():GetFrameCount() % (maxAnimTime+10)
|
local animTime = Game():GetFrameCount() % (maxAnimTime + 10)
|
||||||
color = EID:copyKColor(color) or EID:getTextColor()
|
color = EID:copyKColor(color) or EID:getTextColor()
|
||||||
if animTime<maxAnimTime/2 then
|
if animTime < maxAnimTime / 2 then
|
||||||
color.Alpha = animTime/(maxAnimTime/2) *color.Alpha
|
color.Alpha = animTime / (maxAnimTime / 2) * color.Alpha
|
||||||
elseif animTime<maxAnimTime then
|
elseif animTime < maxAnimTime then
|
||||||
color.Alpha = (1 - (animTime-(maxAnimTime/2))/(maxAnimTime/2)) *color.Alpha
|
color.Alpha = (1 - (animTime - (maxAnimTime / 2)) / (maxAnimTime / 2)) * color.Alpha
|
||||||
else
|
else
|
||||||
color.Alpha = 0
|
color.Alpha = 0
|
||||||
end
|
end
|
||||||
return color
|
return color
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ local function posY()
|
|||||||
return modifiedPosY ~= false and modifiedPosY or EIDConfig["YPosition"]
|
return modifiedPosY ~= false and modifiedPosY or EIDConfig["YPosition"]
|
||||||
end
|
end
|
||||||
|
|
||||||
function printDescription(desc)
|
function EID:printDescription(desc)
|
||||||
local padding = posY()
|
local padding = posY()
|
||||||
local itemType = -1
|
local itemType = -1
|
||||||
if tonumber(desc.ID) ~= nil then
|
if tonumber(desc.ID) ~= nil then
|
||||||
@@ -197,10 +197,10 @@ end
|
|||||||
---------------------------Handle Rendering--------------------------------
|
---------------------------Handle Rendering--------------------------------
|
||||||
|
|
||||||
function EID:renderQuestionMark()
|
function EID:renderQuestionMark()
|
||||||
IconSprite:Play("CurseOfBlind")
|
EID.IconSprite:Play("CurseOfBlind")
|
||||||
IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
EID.IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
IconSprite:Update()
|
EID.IconSprite:Update()
|
||||||
IconSprite:Render(
|
EID.IconSprite:Render(
|
||||||
Vector(EIDConfig["XPosition"] + 5 * EIDConfig["Scale"], posY() + 5 * EIDConfig["Scale"]),
|
Vector(EIDConfig["XPosition"] + 5 * EIDConfig["Scale"], posY() + 5 * EIDConfig["Scale"]),
|
||||||
Vector(0, 0),
|
Vector(0, 0),
|
||||||
Vector(0, 0)
|
Vector(0, 0)
|
||||||
@@ -275,12 +275,12 @@ local function onRender(t)
|
|||||||
|
|
||||||
if dist / 40 > tonumber(EIDConfig["MaxDistance"]) or not closest.Type == EntityType.ENTITY_PICKUP then
|
if dist / 40 > tonumber(EIDConfig["MaxDistance"]) or not closest.Type == EntityType.ENTITY_PICKUP then
|
||||||
if Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and EIDConfig["DisplaySacrificeInfo"] then
|
if Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and EIDConfig["DisplaySacrificeInfo"] then
|
||||||
printDescription(EID:getDescriptionObj("sacrifice", EID.sacrificeCounter))
|
EID:printDescription(EID:getDescriptionObj("sacrifice", EID.sacrificeCounter))
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
Game():GetRoom():GetType() == RoomType.ROOM_DICE and EIDConfig["DisplayDiceInfo"] and type(closestDice) ~= type(nil)
|
Game():GetRoom():GetType() == RoomType.ROOM_DICE and EIDConfig["DisplayDiceInfo"] and type(closestDice) ~= type(nil)
|
||||||
then
|
then
|
||||||
printDescription(EID:getDescriptionObj("dice", closestDice.SubType + 1))
|
EID:printDescription(EID:getDescriptionObj("dice", closestDice.SubType + 1))
|
||||||
EID:renderIndicator(closestDice)
|
EID:renderIndicator(closestDice)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
@@ -308,28 +308,28 @@ local function onRender(t)
|
|||||||
EID:getLegacyModDescription("custom", objIDString) or
|
EID:getLegacyModDescription("custom", objIDString) or
|
||||||
nil
|
nil
|
||||||
if EIDConfig["EnableEntityDescriptions"] and tableEntry ~= nil then
|
if EIDConfig["EnableEntityDescriptions"] and tableEntry ~= nil then
|
||||||
printDescription(EID:getDescriptionObj("custom", objIDString))
|
EID:printDescription(EID:getDescriptionObj("custom", objIDString))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--Handle Trinkets
|
--Handle Trinkets
|
||||||
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
||||||
--Handle Collectibles
|
--Handle Collectibles
|
||||||
printDescription(EID:getDescriptionObj("trinkets", closest.SubType))
|
EID:printDescription(EID:getDescriptionObj("trinkets", closest.SubType))
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
--Handle Cards & Runes
|
--Handle Cards & Runes
|
||||||
if EID:hasCurseBlind() and EIDConfig["DisableOnCurse"] then
|
if EID:hasCurseBlind() and EIDConfig["DisableOnCurse"] then
|
||||||
EID:renderQuestionMark()
|
EID:renderQuestionMark()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
printDescription(EID:getDescriptionObj("collectibles", closest.SubType))
|
EID:printDescription(EID:getDescriptionObj("collectibles", closest.SubType))
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
||||||
--Handle Pills
|
--Handle Pills
|
||||||
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayCardInfoShop"] then
|
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayCardInfoShop"] then
|
||||||
EID:renderQuestionMark()
|
EID:renderQuestionMark()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
printDescription(EID:getDescriptionObj("cards", closest.SubType))
|
EID:printDescription(EID:getDescriptionObj("cards", closest.SubType))
|
||||||
if closest.SubType <= 54 then
|
if closest.SubType <= 54 then
|
||||||
CardSprite:Play(tostring(closest.SubType))
|
CardSprite:Play(tostring(closest.SubType))
|
||||||
CardSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
CardSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
@@ -355,7 +355,7 @@ local function onRender(t)
|
|||||||
local pillEffect = pool:GetPillEffect(pillColor)
|
local pillEffect = pool:GetPillEffect(pillColor)
|
||||||
local identified = pool:IsPillIdentified(pillColor)
|
local identified = pool:IsPillIdentified(pillColor)
|
||||||
if (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then
|
if (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then
|
||||||
printDescription(EID:getDescriptionObj("pills", pillEffect + 1))
|
EID:printDescription(EID:getDescriptionObj("pills", pillEffect + 1))
|
||||||
else
|
else
|
||||||
EID:renderString(
|
EID:renderString(
|
||||||
EID:getDescriptionTable("unidentifiedPill"),
|
EID:getDescriptionTable("unidentifiedPill"),
|
||||||
@@ -393,7 +393,7 @@ if ModConfigMenu then
|
|||||||
function OnGameStart(isSave)
|
function OnGameStart(isSave)
|
||||||
--Loading Moddata--
|
--Loading Moddata--
|
||||||
if EID:HasData() then
|
if EID:HasData() then
|
||||||
savedEIDConfig = json.decode(Isaac.LoadModData(EID))
|
local savedEIDConfig = json.decode(Isaac.LoadModData(EID))
|
||||||
-- hardcode Language usage
|
-- hardcode Language usage
|
||||||
savedEIDConfig["Language"] = EIDConfig["Language"]
|
savedEIDConfig["Language"] = EIDConfig["Language"]
|
||||||
-- Only copy Saved config entries that exist in the save
|
-- Only copy Saved config entries that exist in the save
|
||||||
|
|||||||
Reference in new issue
Block a user