isaacscript-common 84.2.0 → 84.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{arrays/cachedEnumValues.d.ts → cachedEnumValues.d.ts} +4 -4
- package/dist/cachedEnumValues.d.ts.map +1 -0
- package/dist/{arrays/cachedEnumValues.js → cachedEnumValues.js} +5 -5
- package/dist/callbacks.js +1 -1
- package/dist/callbacks.lua +1 -1
- package/dist/classes/callbacks/PostItemDischarge.js +1 -1
- package/dist/classes/callbacks/PostItemDischarge.lua +1 -1
- package/dist/classes/callbacks/PostKeyboardChanged.js +1 -1
- package/dist/classes/callbacks/PostKeyboardChanged.lua +1 -1
- package/dist/classes/callbacks/PostPlayerChangeHealth.js +1 -1
- package/dist/classes/callbacks/PostPlayerChangeHealth.lua +1 -1
- package/dist/classes/callbacks/PostPlayerChangeStat.js +1 -1
- package/dist/classes/callbacks/PostPlayerChangeStat.lua +1 -1
- package/dist/classes/callbacks/PostTransformation.js +1 -1
- package/dist/classes/callbacks/PostTransformation.lua +1 -1
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.d.ts +1 -1
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +1 -1
- package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.lua +1 -1
- package/dist/classes/features/other/DeployJSONRoom.js +1 -1
- package/dist/classes/features/other/DeployJSONRoom.lua +1 -1
- package/dist/classes/features/other/ModdedElementSets.js +1 -1
- package/dist/classes/features/other/ModdedElementSets.lua +1 -1
- package/dist/classes/features/other/customStages/streakText.js +1 -1
- package/dist/classes/features/other/customStages/streakText.lua +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.js +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +1 -1
- package/dist/decorators.d.ts.map +1 -1
- package/dist/decorators.js +9 -3
- package/dist/decorators.lua +9 -2
- package/dist/functions/cards.js +1 -1
- package/dist/functions/cards.lua +1 -1
- package/dist/functions/decorators.d.ts.map +1 -1
- package/dist/functions/decorators.js +10 -6
- package/dist/functions/decorators.lua +10 -6
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.js +1 -1
- package/dist/functions/doors.lua +1 -1
- package/dist/functions/enums.d.ts.map +1 -1
- package/dist/functions/enums.js +6 -11
- package/dist/functions/enums.lua +14 -7
- package/dist/functions/gridEntities.js +1 -1
- package/dist/functions/gridEntities.lua +1 -1
- package/dist/functions/input.js +1 -1
- package/dist/functions/input.lua +1 -1
- package/dist/functions/itemPool.js +1 -1
- package/dist/functions/itemPool.lua +1 -1
- package/dist/functions/level.js +1 -1
- package/dist/functions/level.lua +1 -1
- package/dist/functions/pills.js +1 -1
- package/dist/functions/pills.lua +1 -1
- package/dist/functions/playerCollectibles.js +1 -1
- package/dist/functions/playerCollectibles.lua +1 -1
- package/dist/functions/playerTrinkets.js +1 -1
- package/dist/functions/playerTrinkets.lua +1 -1
- package/dist/functions/pocketItems.js +1 -1
- package/dist/functions/pocketItems.lua +1 -1
- package/dist/functions/roomData.js +1 -1
- package/dist/functions/roomData.lua +1 -1
- package/dist/functions/roomShapeWalls.js +1 -1
- package/dist/functions/roomShapeWalls.lua +1 -1
- package/dist/functions/run.js +1 -1
- package/dist/functions/run.lua +1 -1
- package/dist/functions/sound.js +1 -1
- package/dist/functions/sound.lua +1 -1
- package/dist/functions/transformations.js +1 -1
- package/dist/functions/transformations.lua +1 -1
- package/dist/isaacscript-common.lua +1419 -1401
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +1 -1
- package/dist/objects/itemPoolTypeToCollectibleTypesSet.lua +1 -1
- package/dist/serialization.js +1 -1
- package/dist/serialization.lua +1 -1
- package/dist/sets/bossSets.js +1 -1
- package/dist/sets/bossSets.lua +1 -1
- package/package.json +1 -1
- package/src/{arrays/cachedEnumValues.ts → cachedEnumValues.ts} +5 -5
- package/src/callbacks.ts +1 -1
- package/src/classes/callbacks/PostItemDischarge.ts +1 -1
- package/src/classes/callbacks/PostKeyboardChanged.ts +1 -1
- package/src/classes/callbacks/PostPlayerChangeHealth.ts +1 -1
- package/src/classes/callbacks/PostPlayerChangeStat.ts +1 -1
- package/src/classes/callbacks/PostTransformation.ts +1 -1
- package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +1 -1
- package/src/classes/features/other/DeployJSONRoom.ts +1 -1
- package/src/classes/features/other/ModdedElementSets.ts +1 -1
- package/src/classes/features/other/customStages/streakText.ts +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +1 -1
- package/src/decorators.ts +18 -9
- package/src/functions/cards.ts +1 -1
- package/src/functions/decorators.ts +12 -13
- package/src/functions/doors.ts +1 -4
- package/src/functions/enums.ts +9 -11
- package/src/functions/gridEntities.ts +1 -1
- package/src/functions/input.ts +1 -1
- package/src/functions/itemPool.ts +1 -1
- package/src/functions/level.ts +1 -1
- package/src/functions/pills.ts +1 -1
- package/src/functions/playerCollectibles.ts +1 -1
- package/src/functions/playerTrinkets.ts +1 -1
- package/src/functions/pocketItems.ts +1 -1
- package/src/functions/roomData.ts +1 -1
- package/src/functions/roomShapeWalls.ts +1 -1
- package/src/functions/run.ts +1 -1
- package/src/functions/sound.ts +1 -1
- package/src/functions/transformations.ts +1 -1
- package/src/objects/itemPoolTypeToCollectibleTypesSet.ts +1 -1
- package/src/serialization.ts +1 -1
- package/src/sets/bossSets.ts +1 -1
- package/dist/arrays/cachedEnumValues.d.ts.map +0 -1
- /package/dist/{arrays/cachedEnumValues.lua → cachedEnumValues.lua} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 84.1
|
|
3
|
+
isaacscript-common 84.2.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -2681,6 +2681,32 @@ return {
|
|
|
2681
2681
|
__TS__UsingAsync = __TS__UsingAsync
|
|
2682
2682
|
}
|
|
2683
2683
|
end,
|
|
2684
|
+
["enums.HealthType"] = function(...)
|
|
2685
|
+
local ____exports = {}
|
|
2686
|
+
--- This represents the type of health that is either given or taken away from a player. Note that we
|
|
2687
|
+
-- cannot use the `HeartSubType` enum for this purpose this since it has no value for broken hearts
|
|
2688
|
+
-- or max hearts.
|
|
2689
|
+
____exports.HealthType = {}
|
|
2690
|
+
____exports.HealthType.RED = 0
|
|
2691
|
+
____exports.HealthType[____exports.HealthType.RED] = "RED"
|
|
2692
|
+
____exports.HealthType.SOUL = 1
|
|
2693
|
+
____exports.HealthType[____exports.HealthType.SOUL] = "SOUL"
|
|
2694
|
+
____exports.HealthType.ETERNAL = 2
|
|
2695
|
+
____exports.HealthType[____exports.HealthType.ETERNAL] = "ETERNAL"
|
|
2696
|
+
____exports.HealthType.BLACK = 3
|
|
2697
|
+
____exports.HealthType[____exports.HealthType.BLACK] = "BLACK"
|
|
2698
|
+
____exports.HealthType.GOLDEN = 4
|
|
2699
|
+
____exports.HealthType[____exports.HealthType.GOLDEN] = "GOLDEN"
|
|
2700
|
+
____exports.HealthType.BONE = 5
|
|
2701
|
+
____exports.HealthType[____exports.HealthType.BONE] = "BONE"
|
|
2702
|
+
____exports.HealthType.ROTTEN = 6
|
|
2703
|
+
____exports.HealthType[____exports.HealthType.ROTTEN] = "ROTTEN"
|
|
2704
|
+
____exports.HealthType.BROKEN = 7
|
|
2705
|
+
____exports.HealthType[____exports.HealthType.BROKEN] = "BROKEN"
|
|
2706
|
+
____exports.HealthType.MAX_HEARTS = 8
|
|
2707
|
+
____exports.HealthType[____exports.HealthType.MAX_HEARTS] = "MAX_HEARTS"
|
|
2708
|
+
return ____exports
|
|
2709
|
+
end,
|
|
2684
2710
|
["enums.ModCallbackCustom"] = function(...)
|
|
2685
2711
|
local ____exports = {}
|
|
2686
2712
|
--- - The Isaac API offers a lot of callbacks, but a lot of times there isn't one for the specific
|
|
@@ -2972,42 +2998,6 @@ ____exports.ModCallbackCustom.PRE_ROOM_ENTITY_SPAWN_FILTER = 139
|
|
|
2972
2998
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_ROOM_ENTITY_SPAWN_FILTER] = "PRE_ROOM_ENTITY_SPAWN_FILTER"
|
|
2973
2999
|
____exports.ModCallbackCustom.PRE_TEAR_COLLISION_FILTER = 140
|
|
2974
3000
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_TEAR_COLLISION_FILTER] = "PRE_TEAR_COLLISION_FILTER"
|
|
2975
|
-
return ____exports
|
|
2976
|
-
end,
|
|
2977
|
-
["enums.AmbushType"] = function(...)
|
|
2978
|
-
local ____exports = {}
|
|
2979
|
-
--- This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks.
|
|
2980
|
-
____exports.AmbushType = {}
|
|
2981
|
-
____exports.AmbushType.CHALLENGE_ROOM = 0
|
|
2982
|
-
____exports.AmbushType[____exports.AmbushType.CHALLENGE_ROOM] = "CHALLENGE_ROOM"
|
|
2983
|
-
____exports.AmbushType.BOSS_RUSH = 1
|
|
2984
|
-
____exports.AmbushType[____exports.AmbushType.BOSS_RUSH] = "BOSS_RUSH"
|
|
2985
|
-
return ____exports
|
|
2986
|
-
end,
|
|
2987
|
-
["enums.HealthType"] = function(...)
|
|
2988
|
-
local ____exports = {}
|
|
2989
|
-
--- This represents the type of health that is either given or taken away from a player. Note that we
|
|
2990
|
-
-- cannot use the `HeartSubType` enum for this purpose this since it has no value for broken hearts
|
|
2991
|
-
-- or max hearts.
|
|
2992
|
-
____exports.HealthType = {}
|
|
2993
|
-
____exports.HealthType.RED = 0
|
|
2994
|
-
____exports.HealthType[____exports.HealthType.RED] = "RED"
|
|
2995
|
-
____exports.HealthType.SOUL = 1
|
|
2996
|
-
____exports.HealthType[____exports.HealthType.SOUL] = "SOUL"
|
|
2997
|
-
____exports.HealthType.ETERNAL = 2
|
|
2998
|
-
____exports.HealthType[____exports.HealthType.ETERNAL] = "ETERNAL"
|
|
2999
|
-
____exports.HealthType.BLACK = 3
|
|
3000
|
-
____exports.HealthType[____exports.HealthType.BLACK] = "BLACK"
|
|
3001
|
-
____exports.HealthType.GOLDEN = 4
|
|
3002
|
-
____exports.HealthType[____exports.HealthType.GOLDEN] = "GOLDEN"
|
|
3003
|
-
____exports.HealthType.BONE = 5
|
|
3004
|
-
____exports.HealthType[____exports.HealthType.BONE] = "BONE"
|
|
3005
|
-
____exports.HealthType.ROTTEN = 6
|
|
3006
|
-
____exports.HealthType[____exports.HealthType.ROTTEN] = "ROTTEN"
|
|
3007
|
-
____exports.HealthType.BROKEN = 7
|
|
3008
|
-
____exports.HealthType[____exports.HealthType.BROKEN] = "BROKEN"
|
|
3009
|
-
____exports.HealthType.MAX_HEARTS = 8
|
|
3010
|
-
____exports.HealthType[____exports.HealthType.MAX_HEARTS] = "MAX_HEARTS"
|
|
3011
3001
|
return ____exports
|
|
3012
3002
|
end,
|
|
3013
3003
|
["enums.PlayerStat"] = function(...)
|
|
@@ -3042,14 +3032,22 @@ ____exports.PlayerStat.SIZE = 12
|
|
|
3042
3032
|
____exports.PlayerStat[____exports.PlayerStat.SIZE] = "SIZE"
|
|
3043
3033
|
return ____exports
|
|
3044
3034
|
end,
|
|
3045
|
-
["enums.
|
|
3035
|
+
["enums.private.SerializationBrand"] = function(...)
|
|
3046
3036
|
local ____exports = {}
|
|
3047
|
-
---
|
|
3048
|
-
|
|
3049
|
-
____exports.
|
|
3050
|
-
____exports.
|
|
3051
|
-
____exports.
|
|
3052
|
-
____exports.
|
|
3037
|
+
--- During serialization, we write an arbitrary string key to the object with a value of an empty
|
|
3038
|
+
-- string. This is used during deserialization to instantiate the correct type of object.
|
|
3039
|
+
____exports.SerializationBrand = {}
|
|
3040
|
+
____exports.SerializationBrand.DEFAULT_MAP = "__TSTL_DEFAULT_MAP"
|
|
3041
|
+
____exports.SerializationBrand.MAP = "__TSTL_MAP"
|
|
3042
|
+
____exports.SerializationBrand.SET = "__TSTL_SET"
|
|
3043
|
+
____exports.SerializationBrand.BIT_SET_128 = "__BIT_SET_128"
|
|
3044
|
+
____exports.SerializationBrand.COLOR = "__COLOR"
|
|
3045
|
+
____exports.SerializationBrand.K_COLOR = "__K_COLOR"
|
|
3046
|
+
____exports.SerializationBrand.RNG = "__RNG"
|
|
3047
|
+
____exports.SerializationBrand.VECTOR = "__VECTOR"
|
|
3048
|
+
____exports.SerializationBrand.DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE"
|
|
3049
|
+
____exports.SerializationBrand.OBJECT_WITH_NUMBER_KEYS = "__TSTL_OBJECT_WITH_NUMBER_KEYS"
|
|
3050
|
+
____exports.SerializationBrand.TSTL_CLASS = "__TSTL_CLASS"
|
|
3053
3051
|
return ____exports
|
|
3054
3052
|
end,
|
|
3055
3053
|
["types.ReadonlySet"] = function(...)
|
|
@@ -3060,244 +3058,769 @@ local ____exports = {}
|
|
|
3060
3058
|
____exports.ReadonlySet = Set
|
|
3061
3059
|
return ____exports
|
|
3062
3060
|
end,
|
|
3063
|
-
["types.
|
|
3061
|
+
["types.WidenLiteral"] = function(...)
|
|
3062
|
+
local ____exports = {}
|
|
3063
|
+
return ____exports
|
|
3064
|
+
end,
|
|
3065
|
+
["core.cachedClasses"] = function(...)
|
|
3066
|
+
local ____exports = {}
|
|
3067
|
+
--- A cached version of the class returned from the `Game()` constructor.
|
|
3068
|
+
--
|
|
3069
|
+
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
3070
|
+
--
|
|
3071
|
+
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
3072
|
+
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
3073
|
+
____exports.game = Game()
|
|
3074
|
+
--- A cached version of the class returned from the `Isaac.GetItemConfig()` constructor.
|
|
3075
|
+
--
|
|
3076
|
+
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
3077
|
+
--
|
|
3078
|
+
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
3079
|
+
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
3080
|
+
____exports.itemConfig = Isaac.GetItemConfig()
|
|
3081
|
+
--- A cached version of the class returned from the `MusicManager()` constructor.
|
|
3082
|
+
--
|
|
3083
|
+
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
3084
|
+
--
|
|
3085
|
+
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
3086
|
+
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
3087
|
+
____exports.musicManager = MusicManager()
|
|
3088
|
+
--- A cached version of the class returned from the `SFXManager()` constructor.
|
|
3089
|
+
--
|
|
3090
|
+
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
3091
|
+
--
|
|
3092
|
+
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
3093
|
+
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
3094
|
+
____exports.sfxManager = SFXManager()
|
|
3095
|
+
--- An object containing all 7 vanilla fonts that are pre-loaded and ready to use.
|
|
3096
|
+
--
|
|
3097
|
+
-- For more information on the vanilla fonts and to see what they look like, see:
|
|
3098
|
+
-- https://wofsauge.github.io/IsaacDocs/rep/tutorials/Tutorial-Rendertext.html
|
|
3099
|
+
____exports.fonts = {
|
|
3100
|
+
droid = Font(),
|
|
3101
|
+
pfTempestaSevenCondensed = Font(),
|
|
3102
|
+
teamMeatFont10 = Font(),
|
|
3103
|
+
teamMeatFont12 = Font(),
|
|
3104
|
+
teamMeatFont16Bold = Font(),
|
|
3105
|
+
terminus = Font(),
|
|
3106
|
+
upheaval = Font()
|
|
3107
|
+
}
|
|
3108
|
+
____exports.fonts.droid:Load("font/droid.fnt")
|
|
3109
|
+
____exports.fonts.pfTempestaSevenCondensed:Load("font/pftempestasevencondensed.fnt")
|
|
3110
|
+
____exports.fonts.teamMeatFont10:Load("font/teammeatfont10.fnt")
|
|
3111
|
+
____exports.fonts.teamMeatFont12:Load("font/teammeatfont12.fnt")
|
|
3112
|
+
____exports.fonts.teamMeatFont16Bold:Load("font/teammeatfont16bold.fnt")
|
|
3113
|
+
____exports.fonts.terminus:Load("font/terminus.fnt")
|
|
3114
|
+
____exports.fonts.upheaval:Load("font/upheaval.fnt")
|
|
3115
|
+
return ____exports
|
|
3116
|
+
end,
|
|
3117
|
+
["types.ReadonlyRecord"] = function(...)
|
|
3118
|
+
local ____exports = {}
|
|
3119
|
+
return ____exports
|
|
3120
|
+
end,
|
|
3121
|
+
["functions.types"] = function(...)
|
|
3064
3122
|
local ____lualib = require("lualib_bundle")
|
|
3065
|
-
local
|
|
3123
|
+
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
3066
3124
|
local ____exports = {}
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
3070
|
-
local ____ReadonlySet = require("types.ReadonlySet")
|
|
3071
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
3072
|
-
local DEFAULT_ITEM_TYPE = ItemType.NULL
|
|
3073
|
-
local DEFAULT_SUB_TYPE = CollectibleType.NULL
|
|
3074
|
-
function ____exports.newPickingUpItem(self)
|
|
3075
|
-
return {itemType = DEFAULT_ITEM_TYPE, subType = DEFAULT_SUB_TYPE}
|
|
3076
|
-
end
|
|
3077
|
-
function ____exports.resetPickingUpItem(self, pickingUpItem)
|
|
3078
|
-
pickingUpItem.itemType = DEFAULT_ITEM_TYPE
|
|
3079
|
-
pickingUpItem.subType = DEFAULT_SUB_TYPE
|
|
3125
|
+
function ____exports.isNumber(self, variable)
|
|
3126
|
+
return type(variable) == "number"
|
|
3080
3127
|
end
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3128
|
+
--- Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
|
|
3129
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3130
|
+
--
|
|
3131
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3132
|
+
function ____exports.asCardType(self, num)
|
|
3133
|
+
return num
|
|
3085
3134
|
end
|
|
3086
|
-
--- Helper function to
|
|
3087
|
-
|
|
3088
|
-
|
|
3135
|
+
--- Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
|
|
3136
|
+
-- `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3137
|
+
--
|
|
3138
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3139
|
+
function ____exports.asCollectibleType(self, num)
|
|
3140
|
+
return num
|
|
3089
3141
|
end
|
|
3090
|
-
--- Helper function to
|
|
3091
|
-
|
|
3092
|
-
|
|
3142
|
+
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
|
|
3143
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3144
|
+
--
|
|
3145
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3146
|
+
function ____exports.asFloat(self, num)
|
|
3147
|
+
return num
|
|
3093
3148
|
end
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3101
|
-
if ____exportKey ~= "default" then
|
|
3102
|
-
____exports[____exportKey] = ____exportValue
|
|
3103
|
-
end
|
|
3104
|
-
end
|
|
3149
|
+
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
|
|
3150
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3151
|
+
--
|
|
3152
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3153
|
+
function ____exports.asInt(self, num)
|
|
3154
|
+
return num
|
|
3105
3155
|
end
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
end
|
|
3156
|
+
--- Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
|
|
3157
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3158
|
+
--
|
|
3159
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3160
|
+
function ____exports.asLevelStage(self, num)
|
|
3161
|
+
return num
|
|
3113
3162
|
end
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
end
|
|
3163
|
+
--- Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
|
|
3164
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3165
|
+
--
|
|
3166
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3167
|
+
function ____exports.asNPCState(self, num)
|
|
3168
|
+
return num
|
|
3121
3169
|
end
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
end
|
|
3170
|
+
--- Helper function to safely cast an enum to a `number`. (This is better than using the `as`
|
|
3171
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3172
|
+
--
|
|
3173
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3174
|
+
function ____exports.asNumber(self, num)
|
|
3175
|
+
return num
|
|
3129
3176
|
end
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
end
|
|
3177
|
+
--- Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
|
|
3178
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3179
|
+
--
|
|
3180
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3181
|
+
function ____exports.asPillColor(self, num)
|
|
3182
|
+
return num
|
|
3137
3183
|
end
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
end
|
|
3184
|
+
--- Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
|
|
3185
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3186
|
+
--
|
|
3187
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3188
|
+
function ____exports.asPillEffect(self, num)
|
|
3189
|
+
return num
|
|
3145
3190
|
end
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
end
|
|
3191
|
+
--- Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
|
|
3192
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3193
|
+
--
|
|
3194
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3195
|
+
function ____exports.asPlayerType(self, num)
|
|
3196
|
+
return num
|
|
3153
3197
|
end
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
end
|
|
3198
|
+
--- Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
|
|
3199
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3200
|
+
--
|
|
3201
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3202
|
+
function ____exports.asRoomType(self, num)
|
|
3203
|
+
return num
|
|
3161
3204
|
end
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
end
|
|
3205
|
+
--- Helper function to safely cast an enum to a `string`. (This is better than using the `as`
|
|
3206
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3207
|
+
--
|
|
3208
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3209
|
+
function ____exports.asString(self, str)
|
|
3210
|
+
return str
|
|
3169
3211
|
end
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
end
|
|
3212
|
+
--- Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
|
|
3213
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
3214
|
+
--
|
|
3215
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
3216
|
+
function ____exports.asTrinketType(self, num)
|
|
3217
|
+
return num
|
|
3177
3218
|
end
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3181
|
-
if ____exportKey ~= "default" then
|
|
3182
|
-
____exports[____exportKey] = ____exportValue
|
|
3183
|
-
end
|
|
3184
|
-
end
|
|
3219
|
+
function ____exports.isBoolean(self, variable)
|
|
3220
|
+
return type(variable) == "boolean"
|
|
3185
3221
|
end
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3189
|
-
if ____exportKey ~= "default" then
|
|
3190
|
-
____exports[____exportKey] = ____exportValue
|
|
3191
|
-
end
|
|
3192
|
-
end
|
|
3222
|
+
function ____exports.isFunction(self, variable)
|
|
3223
|
+
return type(variable) == "function"
|
|
3193
3224
|
end
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
if ____exportKey ~= "default" then
|
|
3198
|
-
____exports[____exportKey] = ____exportValue
|
|
3199
|
-
end
|
|
3225
|
+
function ____exports.isInteger(self, variable)
|
|
3226
|
+
if not ____exports.isNumber(nil, variable) then
|
|
3227
|
+
return false
|
|
3200
3228
|
end
|
|
3229
|
+
return variable == math.floor(variable)
|
|
3201
3230
|
end
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
____exports[____exportKey] = ____exportValue
|
|
3207
|
-
end
|
|
3208
|
-
end
|
|
3231
|
+
--- Helper function to detect if a variable is a boolean, number, or string.
|
|
3232
|
+
function ____exports.isPrimitive(self, variable)
|
|
3233
|
+
local variableType = __TS__TypeOf(variable)
|
|
3234
|
+
return variableType == "boolean" or variableType == "number" or variableType == "string"
|
|
3209
3235
|
end
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3213
|
-
if ____exportKey ~= "default" then
|
|
3214
|
-
____exports[____exportKey] = ____exportValue
|
|
3215
|
-
end
|
|
3216
|
-
end
|
|
3236
|
+
function ____exports.isString(self, variable)
|
|
3237
|
+
return type(variable) == "string"
|
|
3217
3238
|
end
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3221
|
-
if ____exportKey ~= "default" then
|
|
3222
|
-
____exports[____exportKey] = ____exportValue
|
|
3223
|
-
end
|
|
3224
|
-
end
|
|
3239
|
+
function ____exports.isTable(self, variable)
|
|
3240
|
+
return type(variable) == "table"
|
|
3225
3241
|
end
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3229
|
-
if ____exportKey ~= "default" then
|
|
3230
|
-
____exports[____exportKey] = ____exportValue
|
|
3231
|
-
end
|
|
3232
|
-
end
|
|
3242
|
+
function ____exports.isUserdata(self, variable)
|
|
3243
|
+
return type(variable) == "userdata"
|
|
3233
3244
|
end
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3245
|
+
--- Helper function to convert a string to an integer. Returns undefined if the string is not an
|
|
3246
|
+
-- integer.
|
|
3247
|
+
--
|
|
3248
|
+
-- Under the hood, this uses the built-in `tonumber` and `math.floor` functions.
|
|
3249
|
+
--
|
|
3250
|
+
-- This is named `parseIntSafe` in order to match the helper function in `isaacscript-common-ts`.
|
|
3251
|
+
function ____exports.parseIntSafe(self, ____string)
|
|
3252
|
+
if not ____exports.isString(nil, ____string) then
|
|
3253
|
+
return nil
|
|
3240
3254
|
end
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3245
|
-
if ____exportKey ~= "default" then
|
|
3246
|
-
____exports[____exportKey] = ____exportValue
|
|
3247
|
-
end
|
|
3255
|
+
local number = tonumber(____string)
|
|
3256
|
+
if number == nil then
|
|
3257
|
+
return nil
|
|
3248
3258
|
end
|
|
3259
|
+
local flooredNumber = math.floor(number)
|
|
3260
|
+
return number == flooredNumber and flooredNumber or nil
|
|
3249
3261
|
end
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3262
|
+
return ____exports
|
|
3263
|
+
end,
|
|
3264
|
+
["functions.log"] = function(...)
|
|
3265
|
+
local ____exports = {}
|
|
3266
|
+
local ____types = require("functions.types")
|
|
3267
|
+
local isNumber = ____types.isNumber
|
|
3268
|
+
--- Helper function to get the name and the line number of the current calling function.
|
|
3269
|
+
--
|
|
3270
|
+
-- For this function to work properly, the "--luadebug" flag must be enabled. Otherwise, it will
|
|
3271
|
+
-- always return undefined.
|
|
3272
|
+
--
|
|
3273
|
+
-- @param levels Optional. The amount of levels to look backwards in the call stack. Default is 3
|
|
3274
|
+
-- (because the first level is this function, the second level is the calling
|
|
3275
|
+
-- function, and the third level is the parent of the calling function).
|
|
3276
|
+
function ____exports.getParentFunctionDescription(levels)
|
|
3277
|
+
if levels == nil then
|
|
3278
|
+
levels = 3
|
|
3256
3279
|
end
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
if ____exportKey ~= "default" then
|
|
3262
|
-
____exports[____exportKey] = ____exportValue
|
|
3280
|
+
if debug ~= nil then
|
|
3281
|
+
local debugTable = debug.getinfo(levels)
|
|
3282
|
+
if debugTable ~= nil then
|
|
3283
|
+
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
3263
3284
|
end
|
|
3264
3285
|
end
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.EntityGridCollisionClass")
|
|
3268
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3269
|
-
if ____exportKey ~= "default" then
|
|
3270
|
-
____exports[____exportKey] = ____exportValue
|
|
3271
|
-
end
|
|
3286
|
+
if SandboxGetParentFunctionDescription ~= nil then
|
|
3287
|
+
return SandboxGetParentFunctionDescription(levels)
|
|
3272
3288
|
end
|
|
3289
|
+
return nil
|
|
3273
3290
|
end
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3291
|
+
--- Helper function to avoid typing out `Isaac.DebugString()`.
|
|
3292
|
+
--
|
|
3293
|
+
-- If you have the "--luadebug" launch flag turned on, then this function will also prepend the
|
|
3294
|
+
-- function name and the line number before the string, like this:
|
|
3295
|
+
--
|
|
3296
|
+
-- ```text
|
|
3297
|
+
-- [INFO] - Lua Debug: saveToDisk:42494 - The save data manager wrote data to the "save#.dat" file.
|
|
3298
|
+
-- ```
|
|
3299
|
+
--
|
|
3300
|
+
-- Subsequently, it is recommended that you turn on the "--luadebug" launch flag when developing
|
|
3301
|
+
-- your mod so that debugging becomes a little bit easier.
|
|
3302
|
+
--
|
|
3303
|
+
-- @param msg The message to log.
|
|
3304
|
+
-- @param includeParentFunction Optional. Whether to prefix the message with the function name and
|
|
3305
|
+
-- line number, as shown in the above example. Default is true.
|
|
3306
|
+
function ____exports.log(msg, includeParentFunction)
|
|
3307
|
+
if includeParentFunction == nil then
|
|
3308
|
+
includeParentFunction = true
|
|
3280
3309
|
end
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.FadeoutTarget")
|
|
3284
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3285
|
-
if ____exportKey ~= "default" then
|
|
3286
|
-
____exports[____exportKey] = ____exportValue
|
|
3287
|
-
end
|
|
3310
|
+
if isNumber(nil, msg) then
|
|
3311
|
+
msg = tostring(msg)
|
|
3288
3312
|
end
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
____exports[____exportKey] = ____exportValue
|
|
3295
|
-
end
|
|
3313
|
+
local ____includeParentFunction_0
|
|
3314
|
+
if includeParentFunction then
|
|
3315
|
+
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
3316
|
+
else
|
|
3317
|
+
____includeParentFunction_0 = nil
|
|
3296
3318
|
end
|
|
3319
|
+
local parentFunctionDescription = ____includeParentFunction_0
|
|
3320
|
+
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
3321
|
+
Isaac.DebugString(debugMsg)
|
|
3297
3322
|
end
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3323
|
+
--- Helper function to log a message to the "log.txt" file and to print it to the screen at the same
|
|
3324
|
+
-- time.
|
|
3325
|
+
function ____exports.logAndPrint(self, msg)
|
|
3326
|
+
____exports.log(msg)
|
|
3327
|
+
print(msg)
|
|
3328
|
+
end
|
|
3329
|
+
--- Helper function to log an error message and also print it to the console for better visibility.
|
|
3330
|
+
--
|
|
3331
|
+
-- This is useful in situations where using the `error` function would be dangerous (since it
|
|
3332
|
+
-- prevents all of the subsequent code in the callback from running).
|
|
3333
|
+
function ____exports.logError(msg)
|
|
3334
|
+
local errorMsg = "Error: " .. msg
|
|
3335
|
+
____exports.logAndPrint(nil, errorMsg)
|
|
3336
|
+
end
|
|
3337
|
+
return ____exports
|
|
3338
|
+
end,
|
|
3339
|
+
["functions.debugFunctions"] = function(...)
|
|
3340
|
+
local ____exports = {}
|
|
3341
|
+
local ____log = require("functions.log")
|
|
3342
|
+
local log = ____log.log
|
|
3343
|
+
--- Helper function to get the current time for benchmarking / profiling purposes.
|
|
3344
|
+
--
|
|
3345
|
+
-- The return value will either be in seconds or milliseconds, depending on if the "--luadebug" flag
|
|
3346
|
+
-- is turned on.
|
|
3347
|
+
--
|
|
3348
|
+
-- If the "--luadebug" flag is present, then this function will use the `socket.gettime` method,
|
|
3349
|
+
-- which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
|
|
3350
|
+
-- the more conventional `Isaac.GetTime` method, since it has one extra decimal point of precision.
|
|
3351
|
+
--
|
|
3352
|
+
-- If the "--luadebug" flag is not present, then this function will use the `Isaac.GetTime` method,
|
|
3353
|
+
-- which returns the number of milliseconds since the computer's operating system was started (e.g.
|
|
3354
|
+
-- "739454963").
|
|
3355
|
+
--
|
|
3356
|
+
-- @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
|
|
3357
|
+
-- Default is true. If set to false, the `Isaac.GetTime()` method will
|
|
3358
|
+
-- always be used.
|
|
3359
|
+
function ____exports.getTime(self, useSocketIfAvailable)
|
|
3360
|
+
if useSocketIfAvailable == nil then
|
|
3361
|
+
useSocketIfAvailable = true
|
|
3362
|
+
end
|
|
3363
|
+
if useSocketIfAvailable then
|
|
3364
|
+
if SandboxGetTime ~= nil then
|
|
3365
|
+
return SandboxGetTime()
|
|
3366
|
+
end
|
|
3367
|
+
if ____exports.isLuaDebugEnabled(nil) then
|
|
3368
|
+
local ok, requiredSocket = pcall(require, "socket")
|
|
3369
|
+
if ok then
|
|
3370
|
+
local socket = requiredSocket
|
|
3371
|
+
return socket.gettime()
|
|
3372
|
+
end
|
|
3373
|
+
end
|
|
3374
|
+
end
|
|
3375
|
+
return Isaac.GetTime()
|
|
3376
|
+
end
|
|
3377
|
+
--- Players can boot the game with an launch option called "--luadebug", which will enable additional
|
|
3378
|
+
-- functionality that is considered to be unsafe. For more information about this flag, see the
|
|
3379
|
+
-- wiki: https://bindingofisaacrebirth.fandom.com/wiki/Launch_Options
|
|
3380
|
+
--
|
|
3381
|
+
-- When this flag is enabled, the global environment will be slightly different. The differences are
|
|
3382
|
+
-- documented here: https://wofsauge.github.io/IsaacDocs/rep/Globals.html
|
|
3383
|
+
--
|
|
3384
|
+
-- This function uses the `package` global variable as a proxy to determine if the "--luadebug" flag
|
|
3385
|
+
-- is enabled.
|
|
3386
|
+
--
|
|
3387
|
+
-- Note that this function will return false if the Racing+ sandbox is enabled, even if the
|
|
3388
|
+
-- "--luadebug" flag is really turned on. If checking for this case is needed, check for the
|
|
3389
|
+
-- presence of the `sandboxGetTraceback` function.
|
|
3390
|
+
function ____exports.isLuaDebugEnabled(self)
|
|
3391
|
+
return _G.package ~= nil
|
|
3392
|
+
end
|
|
3393
|
+
--- Helper function to get the amount of elapsed time for benchmarking / profiling purposes.
|
|
3394
|
+
--
|
|
3395
|
+
-- For more information, see the documentation for the `getTime` helper function.
|
|
3396
|
+
--
|
|
3397
|
+
-- @param time The milliseconds (int) or fractional seconds (float).
|
|
3398
|
+
-- @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
|
|
3399
|
+
-- Default is true. If set to false, the `Isaac.GetTime()` method will
|
|
3400
|
+
-- always be used.
|
|
3401
|
+
function ____exports.getElapsedTimeSince(self, time, useSocketIfAvailable)
|
|
3402
|
+
if useSocketIfAvailable == nil then
|
|
3403
|
+
useSocketIfAvailable = true
|
|
3404
|
+
end
|
|
3405
|
+
return ____exports.getTime(nil, useSocketIfAvailable) - time
|
|
3406
|
+
end
|
|
3407
|
+
--- Helper function to get a stack trace.
|
|
3408
|
+
--
|
|
3409
|
+
-- This will only work if the `--luadebug` launch option is enabled. If it isn't, then a error
|
|
3410
|
+
-- string will be returned.
|
|
3411
|
+
function ____exports.getTraceback()
|
|
3412
|
+
if SandboxGetTraceback ~= nil then
|
|
3413
|
+
return SandboxGetTraceback()
|
|
3414
|
+
end
|
|
3415
|
+
if debug ~= nil then
|
|
3416
|
+
return debug.traceback()
|
|
3417
|
+
end
|
|
3418
|
+
return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
|
|
3419
|
+
end
|
|
3420
|
+
--- Helper function to log a stack trace to the "log.txt" file, similar to JavaScript's
|
|
3421
|
+
-- `console.trace` function.
|
|
3422
|
+
--
|
|
3423
|
+
-- This will only work if the `--luadebug` launch option is enabled. If it isn't, then a error
|
|
3424
|
+
-- string will be logged.
|
|
3425
|
+
function ____exports.traceback()
|
|
3426
|
+
local tracebackOutput = ____exports.getTraceback()
|
|
3427
|
+
log(tracebackOutput)
|
|
3428
|
+
end
|
|
3429
|
+
return ____exports
|
|
3430
|
+
end,
|
|
3431
|
+
["types.PlayerIndex"] = function(...)
|
|
3432
|
+
local ____exports = {}
|
|
3433
|
+
return ____exports
|
|
3434
|
+
end,
|
|
3435
|
+
["functions.playerIndex"] = function(...)
|
|
3436
|
+
local ____lualib = require("lualib_bundle")
|
|
3437
|
+
local __TS__New = ____lualib.__TS__New
|
|
3438
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
3439
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
3440
|
+
local ____exports = {}
|
|
3441
|
+
local getPlayerIndexCollectibleType, DEFAULT_COLLECTIBLE_TYPE, EXCLUDED_CHARACTERS
|
|
3442
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
3443
|
+
local BabySubType = ____isaac_2Dtypescript_2Ddefinitions.BabySubType
|
|
3444
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
3445
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
3446
|
+
local PlayerVariant = ____isaac_2Dtypescript_2Ddefinitions.PlayerVariant
|
|
3447
|
+
local ____cachedClasses = require("core.cachedClasses")
|
|
3448
|
+
local game = ____cachedClasses.game
|
|
3449
|
+
local ____ReadonlySet = require("types.ReadonlySet")
|
|
3450
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
3451
|
+
--- Helper function to get every player with no restrictions, by using `Game.GetNumPlayers` and
|
|
3452
|
+
-- `Isaac.GetPlayer`.
|
|
3453
|
+
--
|
|
3454
|
+
-- This function is almost never what you want to use. For most purposes, use the `getPlayers`
|
|
3455
|
+
-- helper function instead to get a filtered list of players.
|
|
3456
|
+
function ____exports.getAllPlayers(self)
|
|
3457
|
+
local numPlayers = game:GetNumPlayers()
|
|
3458
|
+
local players = {}
|
|
3459
|
+
do
|
|
3460
|
+
local i = 0
|
|
3461
|
+
while i < numPlayers do
|
|
3462
|
+
local player = Isaac.GetPlayer(i)
|
|
3463
|
+
players[#players + 1] = player
|
|
3464
|
+
i = i + 1
|
|
3465
|
+
end
|
|
3466
|
+
end
|
|
3467
|
+
return players
|
|
3468
|
+
end
|
|
3469
|
+
--- Mods often have to track variables relating to the player. In naive mods, information will only
|
|
3470
|
+
-- be stored about the first player. However, in order to be robust, mods must handle up to 4
|
|
3471
|
+
-- players playing at the same time. This means that information must be stored on a map data
|
|
3472
|
+
-- structure. Finding a good index for these types of map data structures is difficult:
|
|
3473
|
+
--
|
|
3474
|
+
-- - We cannot use the index from `Isaac.GetPlayer(i)` since this fails in the case where there are
|
|
3475
|
+
-- two players and the first player leaves the run.
|
|
3476
|
+
-- - We cannot use `EntityPlayer.ControllerIndex` as an index because it fails in the case of Jacob
|
|
3477
|
+
-- & Esau or Tainted Forgotten. It also fails in the case of a player changing their controls
|
|
3478
|
+
-- mid-run.
|
|
3479
|
+
-- - We cannot use `EntityPlayer.GetData().index` because it does not persist across saving and
|
|
3480
|
+
-- continuing.
|
|
3481
|
+
-- - We cannot use `GetPtrHash()` as an index because it does not persist across exiting and
|
|
3482
|
+
-- relaunching the game.
|
|
3483
|
+
-- - We cannot use `EntityPlayer.InitSeed` because it is not consistent with additional players
|
|
3484
|
+
-- beyond the first.
|
|
3485
|
+
--
|
|
3486
|
+
-- Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
|
|
3487
|
+
-- (1). This works even if the player does not have any Sad Onions.
|
|
3488
|
+
--
|
|
3489
|
+
-- Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
|
|
3490
|
+
-- though they are technically different characters, they share the same inventory and `InitSeed`.)
|
|
3491
|
+
-- If this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG
|
|
3492
|
+
-- of Spoon Bender (3) will be used for The Soul.
|
|
3493
|
+
--
|
|
3494
|
+
-- Also note that this index does not work in the `POST_PLAYER_INIT` function for players 2 through
|
|
3495
|
+
-- 4. With that said, in almost all cases, you should be lazy-initializing your data structures in
|
|
3496
|
+
-- other callbacks, so this should not be an issue.
|
|
3497
|
+
function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
|
|
3498
|
+
if differentiateForgottenAndSoul == nil then
|
|
3499
|
+
differentiateForgottenAndSoul = false
|
|
3500
|
+
end
|
|
3501
|
+
local playerToUse = player
|
|
3502
|
+
local isSubPlayer = player:IsSubPlayer()
|
|
3503
|
+
if isSubPlayer then
|
|
3504
|
+
local subPlayer = player
|
|
3505
|
+
local playerParent = ____exports.getSubPlayerParent(nil, subPlayer)
|
|
3506
|
+
if playerParent ~= nil then
|
|
3507
|
+
playerToUse = playerParent
|
|
3508
|
+
end
|
|
3509
|
+
end
|
|
3510
|
+
local collectibleType = getPlayerIndexCollectibleType(nil, player, differentiateForgottenAndSoul)
|
|
3511
|
+
local collectibleRNG = playerToUse:GetCollectibleRNG(collectibleType)
|
|
3512
|
+
local seed = collectibleRNG:GetSeed()
|
|
3513
|
+
return seed
|
|
3514
|
+
end
|
|
3515
|
+
function getPlayerIndexCollectibleType(self, player, differentiateForgottenAndSoul)
|
|
3516
|
+
local character = player:GetPlayerType()
|
|
3517
|
+
if character == PlayerType.SOUL then
|
|
3518
|
+
return differentiateForgottenAndSoul and CollectibleType.INNER_EYE or DEFAULT_COLLECTIBLE_TYPE
|
|
3519
|
+
end
|
|
3520
|
+
return DEFAULT_COLLECTIBLE_TYPE
|
|
3521
|
+
end
|
|
3522
|
+
--- This function always excludes players with a non-undefined parent, since they are not real
|
|
3523
|
+
-- players (e.g. the Strawman Keeper).
|
|
3524
|
+
--
|
|
3525
|
+
-- If this is not desired, use the `getAllPlayers` helper function instead.
|
|
3526
|
+
--
|
|
3527
|
+
-- @param performCharacterExclusions Whether to exclude characters that are not directly controlled
|
|
3528
|
+
-- by the player (i.e. Esau & Tainted Soul). Default is false.
|
|
3529
|
+
function ____exports.getPlayers(self, performCharacterExclusions)
|
|
3530
|
+
if performCharacterExclusions == nil then
|
|
3531
|
+
performCharacterExclusions = false
|
|
3532
|
+
end
|
|
3533
|
+
local players = ____exports.getAllPlayers(nil)
|
|
3534
|
+
local nonChildPlayers = __TS__ArrayFilter(
|
|
3535
|
+
players,
|
|
3536
|
+
function(____, player) return not ____exports.isChildPlayer(nil, player) end
|
|
3537
|
+
)
|
|
3538
|
+
local nonChildPlayersFiltered = __TS__ArrayFilter(
|
|
3539
|
+
nonChildPlayers,
|
|
3540
|
+
function(____, player)
|
|
3541
|
+
local character = player:GetPlayerType()
|
|
3542
|
+
return not EXCLUDED_CHARACTERS:has(character)
|
|
3543
|
+
end
|
|
3544
|
+
)
|
|
3545
|
+
return performCharacterExclusions and nonChildPlayersFiltered or nonChildPlayers
|
|
3546
|
+
end
|
|
3547
|
+
--- Helper function to get a parent `EntityPlayer` object for a given `EntitySubPlayer` object. This
|
|
3548
|
+
-- is useful because calling the `EntityPlayer.GetSubPlayer` method on a sub-player object will
|
|
3549
|
+
-- return undefined.
|
|
3550
|
+
function ____exports.getSubPlayerParent(self, subPlayer)
|
|
3551
|
+
local subPlayerPtrHash = GetPtrHash(subPlayer)
|
|
3552
|
+
local players = ____exports.getPlayers(nil)
|
|
3553
|
+
return __TS__ArrayFind(
|
|
3554
|
+
players,
|
|
3555
|
+
function(____, player)
|
|
3556
|
+
local thisPlayerSubPlayer = player:GetSubPlayer()
|
|
3557
|
+
if thisPlayerSubPlayer == nil then
|
|
3558
|
+
return false
|
|
3559
|
+
end
|
|
3560
|
+
local thisPlayerSubPlayerPtrHash = GetPtrHash(thisPlayerSubPlayer)
|
|
3561
|
+
return thisPlayerSubPlayerPtrHash == subPlayerPtrHash
|
|
3562
|
+
end
|
|
3563
|
+
)
|
|
3564
|
+
end
|
|
3565
|
+
--- Helper function to detect if a particular player is a "child" player, meaning that they have a
|
|
3566
|
+
-- non-undefined `EntityPlayer.Parent` field. (For example, the Strawman Keeper.)
|
|
3567
|
+
function ____exports.isChildPlayer(self, player)
|
|
3568
|
+
return player.Parent ~= nil
|
|
3569
|
+
end
|
|
3570
|
+
DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
3571
|
+
EXCLUDED_CHARACTERS = __TS__New(ReadonlySet, {PlayerType.ESAU, PlayerType.SOUL_B})
|
|
3572
|
+
--- Helper function to get all of the other players in the room besides the one provided. (This
|
|
3573
|
+
-- includes "child" players.)
|
|
3574
|
+
function ____exports.getOtherPlayers(self, player)
|
|
3575
|
+
local playerPtrHash = GetPtrHash(player)
|
|
3576
|
+
local players = ____exports.getAllPlayers(nil)
|
|
3577
|
+
return __TS__ArrayFilter(
|
|
3578
|
+
players,
|
|
3579
|
+
function(____, otherPlayer) return GetPtrHash(otherPlayer) ~= playerPtrHash end
|
|
3580
|
+
)
|
|
3581
|
+
end
|
|
3582
|
+
--- Helper function to get the corresponding `EntityPlayer` object that corresponds to a
|
|
3583
|
+
-- `PlayerIndex`.
|
|
3584
|
+
function ____exports.getPlayerFromIndex(self, playerIndex)
|
|
3585
|
+
local players = ____exports.getAllPlayers(nil)
|
|
3586
|
+
return __TS__ArrayFind(
|
|
3587
|
+
players,
|
|
3588
|
+
function(____, player) return ____exports.getPlayerIndex(nil, player) == playerIndex end
|
|
3589
|
+
)
|
|
3590
|
+
end
|
|
3591
|
+
--- Helper function to return the index of this player with respect to the output of the
|
|
3592
|
+
-- `Isaac.GetPlayer` method.
|
|
3593
|
+
--
|
|
3594
|
+
-- Note that if you storing information about a player in a data structure, you never want to use
|
|
3595
|
+
-- this index; use the `getPlayerIndex` function instead.
|
|
3596
|
+
function ____exports.getPlayerIndexVanilla(self, playerToFind)
|
|
3597
|
+
local numPlayers = game:GetNumPlayers()
|
|
3598
|
+
local playerToFindHash = GetPtrHash(playerToFind)
|
|
3599
|
+
do
|
|
3600
|
+
local i = 0
|
|
3601
|
+
while i < numPlayers do
|
|
3602
|
+
local player = Isaac.GetPlayer(i)
|
|
3603
|
+
local playerHash = GetPtrHash(player)
|
|
3604
|
+
if playerHash == playerToFindHash then
|
|
3605
|
+
return i
|
|
3606
|
+
end
|
|
3607
|
+
i = i + 1
|
|
3608
|
+
end
|
|
3609
|
+
end
|
|
3610
|
+
return nil
|
|
3611
|
+
end
|
|
3612
|
+
--- Helper function to detect if a particular player is the Found Soul player provided by the
|
|
3613
|
+
-- trinket.
|
|
3614
|
+
function ____exports.isFoundSoul(self, player)
|
|
3615
|
+
return ____exports.isChildPlayer(nil, player) and player.Variant == PlayerVariant.COOP_BABY and player.SubType == BabySubType.FOUND_SOUL
|
|
3616
|
+
end
|
|
3617
|
+
return ____exports
|
|
3618
|
+
end,
|
|
3619
|
+
["lua_modules.isaac-typescript-definitions.dist.index"] = function(...)
|
|
3620
|
+
local ____exports = {}
|
|
3621
|
+
do
|
|
3622
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.ActiveSlot")
|
|
3623
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3624
|
+
if ____exportKey ~= "default" then
|
|
3625
|
+
____exports[____exportKey] = ____exportValue
|
|
3626
|
+
end
|
|
3627
|
+
end
|
|
3628
|
+
end
|
|
3629
|
+
do
|
|
3630
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.BackdropType")
|
|
3631
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3632
|
+
if ____exportKey ~= "default" then
|
|
3633
|
+
____exports[____exportKey] = ____exportValue
|
|
3634
|
+
end
|
|
3635
|
+
end
|
|
3636
|
+
end
|
|
3637
|
+
do
|
|
3638
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.BrokenWatchState")
|
|
3639
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3640
|
+
if ____exportKey ~= "default" then
|
|
3641
|
+
____exports[____exportKey] = ____exportValue
|
|
3642
|
+
end
|
|
3643
|
+
end
|
|
3644
|
+
end
|
|
3645
|
+
do
|
|
3646
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.ButtonAction")
|
|
3647
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3648
|
+
if ____exportKey ~= "default" then
|
|
3649
|
+
____exports[____exportKey] = ____exportValue
|
|
3650
|
+
end
|
|
3651
|
+
end
|
|
3652
|
+
end
|
|
3653
|
+
do
|
|
3654
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CallbackPriority")
|
|
3655
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3656
|
+
if ____exportKey ~= "default" then
|
|
3657
|
+
____exports[____exportKey] = ____exportValue
|
|
3658
|
+
end
|
|
3659
|
+
end
|
|
3660
|
+
end
|
|
3661
|
+
do
|
|
3662
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Challenge")
|
|
3663
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3664
|
+
if ____exportKey ~= "default" then
|
|
3665
|
+
____exports[____exportKey] = ____exportValue
|
|
3666
|
+
end
|
|
3667
|
+
end
|
|
3668
|
+
end
|
|
3669
|
+
do
|
|
3670
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.ChampionColor")
|
|
3671
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3672
|
+
if ____exportKey ~= "default" then
|
|
3673
|
+
____exports[____exportKey] = ____exportValue
|
|
3674
|
+
end
|
|
3675
|
+
end
|
|
3676
|
+
end
|
|
3677
|
+
do
|
|
3678
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CollectibleAnimation")
|
|
3679
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3680
|
+
if ____exportKey ~= "default" then
|
|
3681
|
+
____exports[____exportKey] = ____exportValue
|
|
3682
|
+
end
|
|
3683
|
+
end
|
|
3684
|
+
end
|
|
3685
|
+
do
|
|
3686
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CollectiblePedestalType")
|
|
3687
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3688
|
+
if ____exportKey ~= "default" then
|
|
3689
|
+
____exports[____exportKey] = ____exportValue
|
|
3690
|
+
end
|
|
3691
|
+
end
|
|
3692
|
+
end
|
|
3693
|
+
do
|
|
3694
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CollectibleSpriteLayer")
|
|
3695
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3696
|
+
if ____exportKey ~= "default" then
|
|
3697
|
+
____exports[____exportKey] = ____exportValue
|
|
3698
|
+
end
|
|
3699
|
+
end
|
|
3700
|
+
end
|
|
3701
|
+
do
|
|
3702
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Controller")
|
|
3703
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3704
|
+
if ____exportKey ~= "default" then
|
|
3705
|
+
____exports[____exportKey] = ____exportValue
|
|
3706
|
+
end
|
|
3707
|
+
end
|
|
3708
|
+
end
|
|
3709
|
+
do
|
|
3710
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.ControllerIndex")
|
|
3711
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3712
|
+
if ____exportKey ~= "default" then
|
|
3713
|
+
____exports[____exportKey] = ____exportValue
|
|
3714
|
+
end
|
|
3715
|
+
end
|
|
3716
|
+
end
|
|
3717
|
+
do
|
|
3718
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CopyableIsaacAPIClassType")
|
|
3719
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3720
|
+
if ____exportKey ~= "default" then
|
|
3721
|
+
____exports[____exportKey] = ____exportValue
|
|
3722
|
+
end
|
|
3723
|
+
end
|
|
3724
|
+
end
|
|
3725
|
+
do
|
|
3726
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.CurseID")
|
|
3727
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3728
|
+
if ____exportKey ~= "default" then
|
|
3729
|
+
____exports[____exportKey] = ____exportValue
|
|
3730
|
+
end
|
|
3731
|
+
end
|
|
3732
|
+
end
|
|
3733
|
+
do
|
|
3734
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.DebugCommand")
|
|
3735
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3736
|
+
if ____exportKey ~= "default" then
|
|
3737
|
+
____exports[____exportKey] = ____exportValue
|
|
3738
|
+
end
|
|
3739
|
+
end
|
|
3740
|
+
end
|
|
3741
|
+
do
|
|
3742
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Difficulty")
|
|
3743
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3744
|
+
if ____exportKey ~= "default" then
|
|
3745
|
+
____exports[____exportKey] = ____exportValue
|
|
3746
|
+
end
|
|
3747
|
+
end
|
|
3748
|
+
end
|
|
3749
|
+
do
|
|
3750
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Dimension")
|
|
3751
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3752
|
+
if ____exportKey ~= "default" then
|
|
3753
|
+
____exports[____exportKey] = ____exportValue
|
|
3754
|
+
end
|
|
3755
|
+
end
|
|
3756
|
+
end
|
|
3757
|
+
do
|
|
3758
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Direction")
|
|
3759
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3760
|
+
if ____exportKey ~= "default" then
|
|
3761
|
+
____exports[____exportKey] = ____exportValue
|
|
3762
|
+
end
|
|
3763
|
+
end
|
|
3764
|
+
end
|
|
3765
|
+
do
|
|
3766
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.DoorSlot")
|
|
3767
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3768
|
+
if ____exportKey ~= "default" then
|
|
3769
|
+
____exports[____exportKey] = ____exportValue
|
|
3770
|
+
end
|
|
3771
|
+
end
|
|
3772
|
+
end
|
|
3773
|
+
do
|
|
3774
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.Ending")
|
|
3775
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3776
|
+
if ____exportKey ~= "default" then
|
|
3777
|
+
____exports[____exportKey] = ____exportValue
|
|
3778
|
+
end
|
|
3779
|
+
end
|
|
3780
|
+
end
|
|
3781
|
+
do
|
|
3782
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.EntityCollisionClass")
|
|
3783
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3784
|
+
if ____exportKey ~= "default" then
|
|
3785
|
+
____exports[____exportKey] = ____exportValue
|
|
3786
|
+
end
|
|
3787
|
+
end
|
|
3788
|
+
end
|
|
3789
|
+
do
|
|
3790
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.EntityGridCollisionClass")
|
|
3791
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3792
|
+
if ____exportKey ~= "default" then
|
|
3793
|
+
____exports[____exportKey] = ____exportValue
|
|
3794
|
+
end
|
|
3795
|
+
end
|
|
3796
|
+
end
|
|
3797
|
+
do
|
|
3798
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.EntityType")
|
|
3799
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3800
|
+
if ____exportKey ~= "default" then
|
|
3801
|
+
____exports[____exportKey] = ____exportValue
|
|
3802
|
+
end
|
|
3803
|
+
end
|
|
3804
|
+
end
|
|
3805
|
+
do
|
|
3806
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.FadeoutTarget")
|
|
3807
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3808
|
+
if ____exportKey ~= "default" then
|
|
3809
|
+
____exports[____exportKey] = ____exportValue
|
|
3810
|
+
end
|
|
3811
|
+
end
|
|
3812
|
+
end
|
|
3813
|
+
do
|
|
3814
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.GameStateFlag")
|
|
3815
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3816
|
+
if ____exportKey ~= "default" then
|
|
3817
|
+
____exports[____exportKey] = ____exportValue
|
|
3818
|
+
end
|
|
3819
|
+
end
|
|
3820
|
+
end
|
|
3821
|
+
do
|
|
3822
|
+
local ____export = require("lua_modules.isaac-typescript-definitions.dist.enums.GridCollisionClass")
|
|
3823
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
3301
3824
|
if ____exportKey ~= "default" then
|
|
3302
3825
|
____exports[____exportKey] = ____exportValue
|
|
3303
3826
|
end
|
|
@@ -16711,1066 +17234,188 @@ ____exports.ButtonAction.PILL_CARD = 10
|
|
|
16711
17234
|
____exports.ButtonAction[____exports.ButtonAction.PILL_CARD] = "PILL_CARD"
|
|
16712
17235
|
____exports.ButtonAction.DROP = 11
|
|
16713
17236
|
____exports.ButtonAction[____exports.ButtonAction.DROP] = "DROP"
|
|
16714
|
-
____exports.ButtonAction.PAUSE = 12
|
|
16715
|
-
____exports.ButtonAction[____exports.ButtonAction.PAUSE] = "PAUSE"
|
|
16716
|
-
____exports.ButtonAction.MAP = 13
|
|
16717
|
-
____exports.ButtonAction[____exports.ButtonAction.MAP] = "MAP"
|
|
16718
|
-
____exports.ButtonAction.MENU_CONFIRM = 14
|
|
16719
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_CONFIRM] = "MENU_CONFIRM"
|
|
16720
|
-
____exports.ButtonAction.MENU_BACK = 15
|
|
16721
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_BACK] = "MENU_BACK"
|
|
16722
|
-
____exports.ButtonAction.RESTART = 16
|
|
16723
|
-
____exports.ButtonAction[____exports.ButtonAction.RESTART] = "RESTART"
|
|
16724
|
-
____exports.ButtonAction.FULLSCREEN = 17
|
|
16725
|
-
____exports.ButtonAction[____exports.ButtonAction.FULLSCREEN] = "FULLSCREEN"
|
|
16726
|
-
____exports.ButtonAction.MUTE = 18
|
|
16727
|
-
____exports.ButtonAction[____exports.ButtonAction.MUTE] = "MUTE"
|
|
16728
|
-
____exports.ButtonAction.JOIN_MULTIPLAYER = 19
|
|
16729
|
-
____exports.ButtonAction[____exports.ButtonAction.JOIN_MULTIPLAYER] = "JOIN_MULTIPLAYER"
|
|
16730
|
-
____exports.ButtonAction.MENU_LEFT = 20
|
|
16731
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_LEFT] = "MENU_LEFT"
|
|
16732
|
-
____exports.ButtonAction.MENU_RIGHT = 21
|
|
16733
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_RIGHT] = "MENU_RIGHT"
|
|
16734
|
-
____exports.ButtonAction.MENU_UP = 22
|
|
16735
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_UP] = "MENU_UP"
|
|
16736
|
-
____exports.ButtonAction.MENU_DOWN = 23
|
|
16737
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_DOWN] = "MENU_DOWN"
|
|
16738
|
-
____exports.ButtonAction.MENU_LT = 24
|
|
16739
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_LT] = "MENU_LT"
|
|
16740
|
-
____exports.ButtonAction.MENU_RT = 25
|
|
16741
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_RT] = "MENU_RT"
|
|
16742
|
-
____exports.ButtonAction.MENU_TAB = 26
|
|
16743
|
-
____exports.ButtonAction[____exports.ButtonAction.MENU_TAB] = "MENU_TAB"
|
|
16744
|
-
____exports.ButtonAction.CONSOLE = 28
|
|
16745
|
-
____exports.ButtonAction[____exports.ButtonAction.CONSOLE] = "CONSOLE"
|
|
16746
|
-
return ____exports
|
|
16747
|
-
end,
|
|
16748
|
-
["lua_modules.isaac-typescript-definitions.dist.enums.BrokenWatchState"] = function(...)
|
|
16749
|
-
local ____exports = {}
|
|
16750
|
-
--- Used by the `Room.SetBrokenWatchState` method.
|
|
16751
|
-
____exports.BrokenWatchState = {}
|
|
16752
|
-
____exports.BrokenWatchState.NONE = 0
|
|
16753
|
-
____exports.BrokenWatchState[____exports.BrokenWatchState.NONE] = "NONE"
|
|
16754
|
-
____exports.BrokenWatchState.SLOW = 1
|
|
16755
|
-
____exports.BrokenWatchState[____exports.BrokenWatchState.SLOW] = "SLOW"
|
|
16756
|
-
____exports.BrokenWatchState.FAST = 2
|
|
16757
|
-
____exports.BrokenWatchState[____exports.BrokenWatchState.FAST] = "FAST"
|
|
16758
|
-
return ____exports
|
|
16759
|
-
end,
|
|
16760
|
-
["lua_modules.isaac-typescript-definitions.dist.enums.BackdropType"] = function(...)
|
|
16761
|
-
local ____exports = {}
|
|
16762
|
-
____exports.BackdropType = {}
|
|
16763
|
-
____exports.BackdropType.BASEMENT = 1
|
|
16764
|
-
____exports.BackdropType[____exports.BackdropType.BASEMENT] = "BASEMENT"
|
|
16765
|
-
____exports.BackdropType.CELLAR = 2
|
|
16766
|
-
____exports.BackdropType[____exports.BackdropType.CELLAR] = "CELLAR"
|
|
16767
|
-
____exports.BackdropType.BURNING_BASEMENT = 3
|
|
16768
|
-
____exports.BackdropType[____exports.BackdropType.BURNING_BASEMENT] = "BURNING_BASEMENT"
|
|
16769
|
-
____exports.BackdropType.CAVES = 4
|
|
16770
|
-
____exports.BackdropType[____exports.BackdropType.CAVES] = "CAVES"
|
|
16771
|
-
____exports.BackdropType.CATACOMBS = 5
|
|
16772
|
-
____exports.BackdropType[____exports.BackdropType.CATACOMBS] = "CATACOMBS"
|
|
16773
|
-
____exports.BackdropType.FLOODED_CAVES = 6
|
|
16774
|
-
____exports.BackdropType[____exports.BackdropType.FLOODED_CAVES] = "FLOODED_CAVES"
|
|
16775
|
-
____exports.BackdropType.DEPTHS = 7
|
|
16776
|
-
____exports.BackdropType[____exports.BackdropType.DEPTHS] = "DEPTHS"
|
|
16777
|
-
____exports.BackdropType.NECROPOLIS = 8
|
|
16778
|
-
____exports.BackdropType[____exports.BackdropType.NECROPOLIS] = "NECROPOLIS"
|
|
16779
|
-
____exports.BackdropType.DANK_DEPTHS = 9
|
|
16780
|
-
____exports.BackdropType[____exports.BackdropType.DANK_DEPTHS] = "DANK_DEPTHS"
|
|
16781
|
-
____exports.BackdropType.WOMB = 10
|
|
16782
|
-
____exports.BackdropType[____exports.BackdropType.WOMB] = "WOMB"
|
|
16783
|
-
____exports.BackdropType.UTERO = 11
|
|
16784
|
-
____exports.BackdropType[____exports.BackdropType.UTERO] = "UTERO"
|
|
16785
|
-
____exports.BackdropType.SCARRED_WOMB = 12
|
|
16786
|
-
____exports.BackdropType[____exports.BackdropType.SCARRED_WOMB] = "SCARRED_WOMB"
|
|
16787
|
-
____exports.BackdropType.BLUE_WOMB = 13
|
|
16788
|
-
____exports.BackdropType[____exports.BackdropType.BLUE_WOMB] = "BLUE_WOMB"
|
|
16789
|
-
____exports.BackdropType.SHEOL = 14
|
|
16790
|
-
____exports.BackdropType[____exports.BackdropType.SHEOL] = "SHEOL"
|
|
16791
|
-
____exports.BackdropType.CATHEDRAL = 15
|
|
16792
|
-
____exports.BackdropType[____exports.BackdropType.CATHEDRAL] = "CATHEDRAL"
|
|
16793
|
-
____exports.BackdropType.DARK_ROOM = 16
|
|
16794
|
-
____exports.BackdropType[____exports.BackdropType.DARK_ROOM] = "DARK_ROOM"
|
|
16795
|
-
____exports.BackdropType.CHEST = 17
|
|
16796
|
-
____exports.BackdropType[____exports.BackdropType.CHEST] = "CHEST"
|
|
16797
|
-
____exports.BackdropType.MEGA_SATAN = 18
|
|
16798
|
-
____exports.BackdropType[____exports.BackdropType.MEGA_SATAN] = "MEGA_SATAN"
|
|
16799
|
-
____exports.BackdropType.LIBRARY = 19
|
|
16800
|
-
____exports.BackdropType[____exports.BackdropType.LIBRARY] = "LIBRARY"
|
|
16801
|
-
____exports.BackdropType.SHOP = 20
|
|
16802
|
-
____exports.BackdropType[____exports.BackdropType.SHOP] = "SHOP"
|
|
16803
|
-
____exports.BackdropType.CLEAN_BEDROOM = 21
|
|
16804
|
-
____exports.BackdropType[____exports.BackdropType.CLEAN_BEDROOM] = "CLEAN_BEDROOM"
|
|
16805
|
-
____exports.BackdropType.DIRTY_BEDROOM = 22
|
|
16806
|
-
____exports.BackdropType[____exports.BackdropType.DIRTY_BEDROOM] = "DIRTY_BEDROOM"
|
|
16807
|
-
____exports.BackdropType.SECRET = 23
|
|
16808
|
-
____exports.BackdropType[____exports.BackdropType.SECRET] = "SECRET"
|
|
16809
|
-
____exports.BackdropType.DICE = 24
|
|
16810
|
-
____exports.BackdropType[____exports.BackdropType.DICE] = "DICE"
|
|
16811
|
-
____exports.BackdropType.ARCADE = 25
|
|
16812
|
-
____exports.BackdropType[____exports.BackdropType.ARCADE] = "ARCADE"
|
|
16813
|
-
____exports.BackdropType.ERROR_ROOM = 26
|
|
16814
|
-
____exports.BackdropType[____exports.BackdropType.ERROR_ROOM] = "ERROR_ROOM"
|
|
16815
|
-
____exports.BackdropType.BLUE_WOMB_PASS = 27
|
|
16816
|
-
____exports.BackdropType[____exports.BackdropType.BLUE_WOMB_PASS] = "BLUE_WOMB_PASS"
|
|
16817
|
-
____exports.BackdropType.GREED_SHOP = 28
|
|
16818
|
-
____exports.BackdropType[____exports.BackdropType.GREED_SHOP] = "GREED_SHOP"
|
|
16819
|
-
____exports.BackdropType.DUNGEON = 29
|
|
16820
|
-
____exports.BackdropType[____exports.BackdropType.DUNGEON] = "DUNGEON"
|
|
16821
|
-
____exports.BackdropType.SACRIFICE = 30
|
|
16822
|
-
____exports.BackdropType[____exports.BackdropType.SACRIFICE] = "SACRIFICE"
|
|
16823
|
-
____exports.BackdropType.DOWNPOUR = 31
|
|
16824
|
-
____exports.BackdropType[____exports.BackdropType.DOWNPOUR] = "DOWNPOUR"
|
|
16825
|
-
____exports.BackdropType.MINES = 32
|
|
16826
|
-
____exports.BackdropType[____exports.BackdropType.MINES] = "MINES"
|
|
16827
|
-
____exports.BackdropType.MAUSOLEUM = 33
|
|
16828
|
-
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM] = "MAUSOLEUM"
|
|
16829
|
-
____exports.BackdropType.CORPSE = 34
|
|
16830
|
-
____exports.BackdropType[____exports.BackdropType.CORPSE] = "CORPSE"
|
|
16831
|
-
____exports.BackdropType.PLANETARIUM = 35
|
|
16832
|
-
____exports.BackdropType[____exports.BackdropType.PLANETARIUM] = "PLANETARIUM"
|
|
16833
|
-
____exports.BackdropType.DOWNPOUR_ENTRANCE = 36
|
|
16834
|
-
____exports.BackdropType[____exports.BackdropType.DOWNPOUR_ENTRANCE] = "DOWNPOUR_ENTRANCE"
|
|
16835
|
-
____exports.BackdropType.MINES_ENTRANCE = 37
|
|
16836
|
-
____exports.BackdropType[____exports.BackdropType.MINES_ENTRANCE] = "MINES_ENTRANCE"
|
|
16837
|
-
____exports.BackdropType.MAUSOLEUM_ENTRANCE = 38
|
|
16838
|
-
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_ENTRANCE] = "MAUSOLEUM_ENTRANCE"
|
|
16839
|
-
____exports.BackdropType.CORPSE_ENTRANCE = 39
|
|
16840
|
-
____exports.BackdropType[____exports.BackdropType.CORPSE_ENTRANCE] = "CORPSE_ENTRANCE"
|
|
16841
|
-
____exports.BackdropType.MAUSOLEUM_2 = 40
|
|
16842
|
-
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_2] = "MAUSOLEUM_2"
|
|
16843
|
-
____exports.BackdropType.MAUSOLEUM_3 = 41
|
|
16844
|
-
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_3] = "MAUSOLEUM_3"
|
|
16845
|
-
____exports.BackdropType.MAUSOLEUM_4 = 42
|
|
16846
|
-
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_4] = "MAUSOLEUM_4"
|
|
16847
|
-
____exports.BackdropType.CORPSE_2 = 43
|
|
16848
|
-
____exports.BackdropType[____exports.BackdropType.CORPSE_2] = "CORPSE_2"
|
|
16849
|
-
____exports.BackdropType.CORPSE_3 = 44
|
|
16850
|
-
____exports.BackdropType[____exports.BackdropType.CORPSE_3] = "CORPSE_3"
|
|
16851
|
-
____exports.BackdropType.DROSS = 45
|
|
16852
|
-
____exports.BackdropType[____exports.BackdropType.DROSS] = "DROSS"
|
|
16853
|
-
____exports.BackdropType.ASHPIT = 46
|
|
16854
|
-
____exports.BackdropType[____exports.BackdropType.ASHPIT] = "ASHPIT"
|
|
16855
|
-
____exports.BackdropType.GEHENNA = 47
|
|
16856
|
-
____exports.BackdropType[____exports.BackdropType.GEHENNA] = "GEHENNA"
|
|
16857
|
-
____exports.BackdropType.MORTIS = 48
|
|
16858
|
-
____exports.BackdropType[____exports.BackdropType.MORTIS] = "MORTIS"
|
|
16859
|
-
____exports.BackdropType.ISAACS_BEDROOM = 49
|
|
16860
|
-
____exports.BackdropType[____exports.BackdropType.ISAACS_BEDROOM] = "ISAACS_BEDROOM"
|
|
16861
|
-
____exports.BackdropType.HALLWAY = 50
|
|
16862
|
-
____exports.BackdropType[____exports.BackdropType.HALLWAY] = "HALLWAY"
|
|
16863
|
-
____exports.BackdropType.MOMS_BEDROOM = 51
|
|
16864
|
-
____exports.BackdropType[____exports.BackdropType.MOMS_BEDROOM] = "MOMS_BEDROOM"
|
|
16865
|
-
____exports.BackdropType.CLOSET = 52
|
|
16866
|
-
____exports.BackdropType[____exports.BackdropType.CLOSET] = "CLOSET"
|
|
16867
|
-
____exports.BackdropType.CLOSET_B = 53
|
|
16868
|
-
____exports.BackdropType[____exports.BackdropType.CLOSET_B] = "CLOSET_B"
|
|
16869
|
-
____exports.BackdropType.DOGMA = 54
|
|
16870
|
-
____exports.BackdropType[____exports.BackdropType.DOGMA] = "DOGMA"
|
|
16871
|
-
____exports.BackdropType.DUNGEON_GIDEON = 55
|
|
16872
|
-
____exports.BackdropType[____exports.BackdropType.DUNGEON_GIDEON] = "DUNGEON_GIDEON"
|
|
16873
|
-
____exports.BackdropType.DUNGEON_ROTGUT = 56
|
|
16874
|
-
____exports.BackdropType[____exports.BackdropType.DUNGEON_ROTGUT] = "DUNGEON_ROTGUT"
|
|
16875
|
-
____exports.BackdropType.DUNGEON_BEAST = 57
|
|
16876
|
-
____exports.BackdropType[____exports.BackdropType.DUNGEON_BEAST] = "DUNGEON_BEAST"
|
|
16877
|
-
____exports.BackdropType.MINES_SHAFT = 58
|
|
16878
|
-
____exports.BackdropType[____exports.BackdropType.MINES_SHAFT] = "MINES_SHAFT"
|
|
16879
|
-
____exports.BackdropType.ASHPIT_SHAFT = 59
|
|
16880
|
-
____exports.BackdropType[____exports.BackdropType.ASHPIT_SHAFT] = "ASHPIT_SHAFT"
|
|
16881
|
-
____exports.BackdropType.DARK_CLOSET = 60
|
|
16882
|
-
____exports.BackdropType[____exports.BackdropType.DARK_CLOSET] = "DARK_CLOSET"
|
|
16883
|
-
return ____exports
|
|
16884
|
-
end,
|
|
16885
|
-
["lua_modules.isaac-typescript-definitions.dist.enums.ActiveSlot"] = function(...)
|
|
16886
|
-
local ____exports = {}
|
|
16887
|
-
____exports.ActiveSlot = {}
|
|
16888
|
-
____exports.ActiveSlot.PRIMARY = 0
|
|
16889
|
-
____exports.ActiveSlot[____exports.ActiveSlot.PRIMARY] = "PRIMARY"
|
|
16890
|
-
____exports.ActiveSlot.SECONDARY = 1
|
|
16891
|
-
____exports.ActiveSlot[____exports.ActiveSlot.SECONDARY] = "SECONDARY"
|
|
16892
|
-
____exports.ActiveSlot.POCKET = 2
|
|
16893
|
-
____exports.ActiveSlot[____exports.ActiveSlot.POCKET] = "POCKET"
|
|
16894
|
-
____exports.ActiveSlot.POCKET_SINGLE_USE = 3
|
|
16895
|
-
____exports.ActiveSlot[____exports.ActiveSlot.POCKET_SINGLE_USE] = "POCKET_SINGLE_USE"
|
|
16896
|
-
return ____exports
|
|
16897
|
-
end,
|
|
16898
|
-
["types.PossibleStatType"] = function(...)
|
|
16899
|
-
local ____exports = {}
|
|
16900
|
-
return ____exports
|
|
16901
|
-
end,
|
|
16902
|
-
["shouldFire"] = function(...)
|
|
16903
|
-
local ____exports = {}
|
|
16904
|
-
function ____exports.shouldFireAmbush(self, fireArgs, optionalArgs)
|
|
16905
|
-
local ambushType = table.unpack(fireArgs)
|
|
16906
|
-
local callbackAmbushType = table.unpack(optionalArgs)
|
|
16907
|
-
return callbackAmbushType == nil or callbackAmbushType == ambushType
|
|
16908
|
-
end
|
|
16909
|
-
function ____exports.shouldFireBomb(self, fireArgs, optionalArgs)
|
|
16910
|
-
local bomb = table.unpack(fireArgs)
|
|
16911
|
-
local callbackBombVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16912
|
-
return (callbackBombVariant == nil or callbackBombVariant == bomb.Variant) and (callbackSubType == nil or callbackSubType == bomb.SubType)
|
|
16913
|
-
end
|
|
16914
|
-
function ____exports.shouldFireBoolean(self, fireArgs, optionalArgs)
|
|
16915
|
-
local fireArg = table.unpack(fireArgs)
|
|
16916
|
-
local optionalArg = table.unpack(optionalArgs)
|
|
16917
|
-
return optionalArg == nil or optionalArg == fireArg
|
|
16918
|
-
end
|
|
16919
|
-
function ____exports.shouldFireCollectibleType(self, fireArgs, optionalArgs)
|
|
16920
|
-
local _player, collectibleType = table.unpack(fireArgs)
|
|
16921
|
-
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
16922
|
-
return callbackCollectibleType == nil or callbackCollectibleType == collectibleType
|
|
16923
|
-
end
|
|
16924
|
-
function ____exports.shouldFireDoor(self, fireArgs, optionalArgs)
|
|
16925
|
-
local door = table.unpack(fireArgs)
|
|
16926
|
-
local callbackDoorVariant = table.unpack(optionalArgs)
|
|
16927
|
-
local doorVariant = door:GetVariant()
|
|
16928
|
-
return callbackDoorVariant == nil or callbackDoorVariant == doorVariant
|
|
16929
|
-
end
|
|
16930
|
-
function ____exports.shouldFireEffect(self, fireArgs, optionalArgs)
|
|
16931
|
-
local effect = table.unpack(fireArgs)
|
|
16932
|
-
local callbackEffectVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16933
|
-
return (callbackEffectVariant == nil or callbackEffectVariant == effect.Variant) and (callbackSubType == nil or callbackSubType == effect.SubType)
|
|
16934
|
-
end
|
|
16935
|
-
function ____exports.shouldFireEntity(self, fireArgs, optionalArgs)
|
|
16936
|
-
local entity = table.unpack(fireArgs)
|
|
16937
|
-
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16938
|
-
return (callbackEntityType == nil or callbackEntityType == entity.Type) and (callbackVariant == nil or callbackVariant == entity.Variant) and (callbackSubType == nil or callbackSubType == entity.SubType)
|
|
16939
|
-
end
|
|
16940
|
-
function ____exports.shouldFireFamiliar(self, fireArgs, optionalArgs)
|
|
16941
|
-
local familiar = table.unpack(fireArgs)
|
|
16942
|
-
local callbackFamiliarVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16943
|
-
return (callbackFamiliarVariant == nil or callbackFamiliarVariant == familiar.Variant) and (callbackSubType == nil or callbackSubType == familiar.SubType)
|
|
16944
|
-
end
|
|
16945
|
-
function ____exports.shouldFireGridEntity(self, fireArgs, optionalArgs)
|
|
16946
|
-
local gridEntity = table.unpack(fireArgs)
|
|
16947
|
-
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs)
|
|
16948
|
-
local gridEntityType = gridEntity:GetType()
|
|
16949
|
-
local variant = gridEntity:GetVariant()
|
|
16950
|
-
return (callbackGridEntityType == nil or callbackGridEntityType == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
16951
|
-
end
|
|
16952
|
-
function ____exports.shouldFireGridEntityCustom(self, fireArgs, optionalArgs)
|
|
16953
|
-
local _gridEntity, gridEntityTypeCustom = table.unpack(fireArgs)
|
|
16954
|
-
local callbackGridEntityTypeCustom = table.unpack(optionalArgs)
|
|
16955
|
-
return callbackGridEntityTypeCustom == nil or callbackGridEntityTypeCustom == gridEntityTypeCustom
|
|
16956
|
-
end
|
|
16957
|
-
function ____exports.shouldFireItemPickup(self, fireArgs, optionalArgs)
|
|
16958
|
-
local _player, pickingUpItem = table.unpack(fireArgs)
|
|
16959
|
-
local callbackItemType, callbackSubtype = table.unpack(optionalArgs)
|
|
16960
|
-
return (callbackItemType == nil or callbackItemType == pickingUpItem.itemType) and (callbackSubtype == nil or callbackSubtype == pickingUpItem.subType)
|
|
16961
|
-
end
|
|
16962
|
-
function ____exports.shouldFireKnife(self, fireArgs, optionalArgs)
|
|
16963
|
-
local knife = table.unpack(fireArgs)
|
|
16964
|
-
local callbackKnifeVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16965
|
-
return (callbackKnifeVariant == nil or callbackKnifeVariant == knife.Variant) and (callbackSubType == nil or callbackSubType == knife.SubType)
|
|
16966
|
-
end
|
|
16967
|
-
function ____exports.shouldFireLaser(self, fireArgs, optionalArgs)
|
|
16968
|
-
local laser = table.unpack(fireArgs)
|
|
16969
|
-
local callbackLaserVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16970
|
-
return (callbackLaserVariant == nil or callbackLaserVariant == laser.Variant) and (callbackSubType == nil or callbackSubType == laser.SubType)
|
|
16971
|
-
end
|
|
16972
|
-
function ____exports.shouldFireLevel(self, fireArgs, optionalArgs)
|
|
16973
|
-
local stage, stageType = table.unpack(fireArgs)
|
|
16974
|
-
local callbackStage, callbackStageType = table.unpack(optionalArgs)
|
|
16975
|
-
return (callbackStage == nil or callbackStage == stage) and (callbackStageType == nil or callbackStageType == stageType)
|
|
16976
|
-
end
|
|
16977
|
-
function ____exports.shouldFireNPC(self, fireArgs, optionalArgs)
|
|
16978
|
-
local npc = table.unpack(fireArgs)
|
|
16979
|
-
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16980
|
-
return (callbackEntityType == nil or callbackEntityType == npc.Type) and (callbackVariant == nil or callbackVariant == npc.Variant) and (callbackSubType == nil or callbackSubType == npc.SubType)
|
|
16981
|
-
end
|
|
16982
|
-
function ____exports.shouldFirePickup(self, fireArgs, optionalArgs)
|
|
16983
|
-
local pickup = table.unpack(fireArgs)
|
|
16984
|
-
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs)
|
|
16985
|
-
return (callbackPickupVariant == nil or callbackPickupVariant == pickup.Variant) and (callbackPickupSubType == nil or callbackPickupSubType == pickup.SubType)
|
|
16986
|
-
end
|
|
16987
|
-
function ____exports.shouldFirePit(self, fireArgs, optionalArgs)
|
|
16988
|
-
local pit = table.unpack(fireArgs)
|
|
16989
|
-
local callbackPitVariant = table.unpack(optionalArgs)
|
|
16990
|
-
local pitVariant = pit:GetVariant()
|
|
16991
|
-
return callbackPitVariant == nil or callbackPitVariant == pitVariant
|
|
16992
|
-
end
|
|
16993
|
-
function ____exports.shouldFirePlayer(self, fireArgs, optionalArgs)
|
|
16994
|
-
local player = table.unpack(fireArgs)
|
|
16995
|
-
local callbackPlayerVariant, callbackCharacter = table.unpack(optionalArgs)
|
|
16996
|
-
local character = player:GetPlayerType()
|
|
16997
|
-
return (callbackPlayerVariant == nil or callbackPlayerVariant == player.Variant) and (callbackCharacter == nil or callbackCharacter == character)
|
|
16998
|
-
end
|
|
16999
|
-
function ____exports.shouldFirePoop(self, fireArgs, optionalArgs)
|
|
17000
|
-
local poop = table.unpack(fireArgs)
|
|
17001
|
-
local callbackPoopGridEntityVariant = table.unpack(optionalArgs)
|
|
17002
|
-
local poopGridEntityVariant = poop:GetVariant()
|
|
17003
|
-
return callbackPoopGridEntityVariant == nil or callbackPoopGridEntityVariant == poopGridEntityVariant
|
|
17004
|
-
end
|
|
17005
|
-
function ____exports.shouldFirePressurePlate(self, fireArgs, optionalArgs)
|
|
17006
|
-
local pressurePlate = table.unpack(fireArgs)
|
|
17007
|
-
local callbackPressurePlateVariant = table.unpack(optionalArgs)
|
|
17008
|
-
local pressurePlateVariant = pressurePlate:GetVariant()
|
|
17009
|
-
return callbackPressurePlateVariant == nil or callbackPressurePlateVariant == pressurePlateVariant
|
|
17010
|
-
end
|
|
17011
|
-
function ____exports.shouldFireProjectile(self, fireArgs, optionalArgs)
|
|
17012
|
-
local projectile = table.unpack(fireArgs)
|
|
17013
|
-
local callbackProjectileVariant, callbackSubType = table.unpack(optionalArgs)
|
|
17014
|
-
return (callbackProjectileVariant == nil or callbackProjectileVariant == projectile.Variant) and (callbackSubType == nil or callbackSubType == projectile.SubType)
|
|
17015
|
-
end
|
|
17016
|
-
function ____exports.shouldFireRock(self, fireArgs, optionalArgs)
|
|
17017
|
-
local rock = table.unpack(fireArgs)
|
|
17018
|
-
local callbackGridEntity, callbackVariant = table.unpack(optionalArgs)
|
|
17019
|
-
local gridEntityType = rock:GetType()
|
|
17020
|
-
local variant = rock:GetVariant()
|
|
17021
|
-
return (callbackGridEntity == nil or callbackGridEntity == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
17022
|
-
end
|
|
17023
|
-
function ____exports.shouldFireRoom(self, fireArgs, optionalArgs)
|
|
17024
|
-
local roomType = table.unpack(fireArgs)
|
|
17025
|
-
local callbackRoomType = table.unpack(optionalArgs)
|
|
17026
|
-
return callbackRoomType == nil or callbackRoomType == roomType
|
|
17027
|
-
end
|
|
17028
|
-
function ____exports.shouldFireSlot(self, fireArgs, optionalArgs)
|
|
17029
|
-
local slot = table.unpack(fireArgs)
|
|
17030
|
-
local callbackSlotVariant, callbackSubType = table.unpack(optionalArgs)
|
|
17031
|
-
return (callbackSlotVariant == nil or callbackSlotVariant == slot.Variant) and (callbackSubType == nil or callbackSubType == slot.SubType)
|
|
17032
|
-
end
|
|
17033
|
-
function ____exports.shouldFireSpikes(self, fireArgs, optionalArgs)
|
|
17034
|
-
local spikes = table.unpack(fireArgs)
|
|
17035
|
-
local callbackVariant = table.unpack(optionalArgs)
|
|
17036
|
-
local variant = spikes:GetVariant()
|
|
17037
|
-
return callbackVariant == nil or callbackVariant == variant
|
|
17038
|
-
end
|
|
17039
|
-
function ____exports.shouldFireTNT(self, fireArgs, optionalArgs)
|
|
17040
|
-
local tnt = table.unpack(fireArgs)
|
|
17041
|
-
local callbackVariant = table.unpack(optionalArgs)
|
|
17042
|
-
local variant = tnt:GetVariant()
|
|
17043
|
-
return callbackVariant == nil or callbackVariant == variant
|
|
17044
|
-
end
|
|
17045
|
-
function ____exports.shouldFireTear(self, fireArgs, optionalArgs)
|
|
17046
|
-
local tear = table.unpack(fireArgs)
|
|
17047
|
-
local callbackTearVariant, callbackSubType = table.unpack(optionalArgs)
|
|
17048
|
-
return (callbackTearVariant == nil or callbackTearVariant == tear.Variant) and (callbackSubType == nil or callbackSubType == tear.SubType)
|
|
17049
|
-
end
|
|
17050
|
-
function ____exports.shouldFireTrinketType(self, fireArgs, optionalArgs)
|
|
17051
|
-
local _player, trinketType = table.unpack(fireArgs)
|
|
17052
|
-
local callbackTrinketType = table.unpack(optionalArgs)
|
|
17053
|
-
return callbackTrinketType == nil or callbackTrinketType == trinketType
|
|
17054
|
-
end
|
|
17055
|
-
return ____exports
|
|
17056
|
-
end,
|
|
17057
|
-
["functions.types"] = function(...)
|
|
17058
|
-
local ____lualib = require("lualib_bundle")
|
|
17059
|
-
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
17060
|
-
local ____exports = {}
|
|
17061
|
-
function ____exports.isNumber(self, variable)
|
|
17062
|
-
return type(variable) == "number"
|
|
17063
|
-
end
|
|
17064
|
-
--- Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
|
|
17065
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17066
|
-
--
|
|
17067
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17068
|
-
function ____exports.asCardType(self, num)
|
|
17069
|
-
return num
|
|
17070
|
-
end
|
|
17071
|
-
--- Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
|
|
17072
|
-
-- `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17073
|
-
--
|
|
17074
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17075
|
-
function ____exports.asCollectibleType(self, num)
|
|
17076
|
-
return num
|
|
17077
|
-
end
|
|
17078
|
-
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
|
|
17079
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17080
|
-
--
|
|
17081
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17082
|
-
function ____exports.asFloat(self, num)
|
|
17083
|
-
return num
|
|
17084
|
-
end
|
|
17085
|
-
--- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
|
|
17086
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17087
|
-
--
|
|
17088
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17089
|
-
function ____exports.asInt(self, num)
|
|
17090
|
-
return num
|
|
17091
|
-
end
|
|
17092
|
-
--- Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
|
|
17093
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17094
|
-
--
|
|
17095
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17096
|
-
function ____exports.asLevelStage(self, num)
|
|
17097
|
-
return num
|
|
17098
|
-
end
|
|
17099
|
-
--- Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
|
|
17100
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17101
|
-
--
|
|
17102
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17103
|
-
function ____exports.asNPCState(self, num)
|
|
17104
|
-
return num
|
|
17105
|
-
end
|
|
17106
|
-
--- Helper function to safely cast an enum to a `number`. (This is better than using the `as`
|
|
17107
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17108
|
-
--
|
|
17109
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17110
|
-
function ____exports.asNumber(self, num)
|
|
17111
|
-
return num
|
|
17112
|
-
end
|
|
17113
|
-
--- Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
|
|
17114
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17115
|
-
--
|
|
17116
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17117
|
-
function ____exports.asPillColor(self, num)
|
|
17118
|
-
return num
|
|
17119
|
-
end
|
|
17120
|
-
--- Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
|
|
17121
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17122
|
-
--
|
|
17123
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17124
|
-
function ____exports.asPillEffect(self, num)
|
|
17125
|
-
return num
|
|
17126
|
-
end
|
|
17127
|
-
--- Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
|
|
17128
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17129
|
-
--
|
|
17130
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17131
|
-
function ____exports.asPlayerType(self, num)
|
|
17132
|
-
return num
|
|
17133
|
-
end
|
|
17134
|
-
--- Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
|
|
17135
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17136
|
-
--
|
|
17137
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17138
|
-
function ____exports.asRoomType(self, num)
|
|
17139
|
-
return num
|
|
17140
|
-
end
|
|
17141
|
-
--- Helper function to safely cast an enum to a `string`. (This is better than using the `as`
|
|
17142
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17143
|
-
--
|
|
17144
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17145
|
-
function ____exports.asString(self, str)
|
|
17146
|
-
return str
|
|
17147
|
-
end
|
|
17148
|
-
--- Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
|
|
17149
|
-
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
17150
|
-
--
|
|
17151
|
-
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
17152
|
-
function ____exports.asTrinketType(self, num)
|
|
17153
|
-
return num
|
|
17154
|
-
end
|
|
17155
|
-
function ____exports.isBoolean(self, variable)
|
|
17156
|
-
return type(variable) == "boolean"
|
|
17157
|
-
end
|
|
17158
|
-
function ____exports.isFunction(self, variable)
|
|
17159
|
-
return type(variable) == "function"
|
|
17160
|
-
end
|
|
17161
|
-
function ____exports.isInteger(self, variable)
|
|
17162
|
-
if not ____exports.isNumber(nil, variable) then
|
|
17163
|
-
return false
|
|
17164
|
-
end
|
|
17165
|
-
return variable == math.floor(variable)
|
|
17166
|
-
end
|
|
17167
|
-
--- Helper function to detect if a variable is a boolean, number, or string.
|
|
17168
|
-
function ____exports.isPrimitive(self, variable)
|
|
17169
|
-
local variableType = __TS__TypeOf(variable)
|
|
17170
|
-
return variableType == "boolean" or variableType == "number" or variableType == "string"
|
|
17171
|
-
end
|
|
17172
|
-
function ____exports.isString(self, variable)
|
|
17173
|
-
return type(variable) == "string"
|
|
17174
|
-
end
|
|
17175
|
-
function ____exports.isTable(self, variable)
|
|
17176
|
-
return type(variable) == "table"
|
|
17177
|
-
end
|
|
17178
|
-
function ____exports.isUserdata(self, variable)
|
|
17179
|
-
return type(variable) == "userdata"
|
|
17180
|
-
end
|
|
17181
|
-
--- Helper function to convert a string to an integer. Returns undefined if the string is not an
|
|
17182
|
-
-- integer.
|
|
17183
|
-
--
|
|
17184
|
-
-- Under the hood, this uses the built-in `tonumber` and `math.floor` functions.
|
|
17185
|
-
--
|
|
17186
|
-
-- This is named `parseIntSafe` in order to match the helper function in `isaacscript-common-ts`.
|
|
17187
|
-
function ____exports.parseIntSafe(self, ____string)
|
|
17188
|
-
if not ____exports.isString(nil, ____string) then
|
|
17189
|
-
return nil
|
|
17190
|
-
end
|
|
17191
|
-
local number = tonumber(____string)
|
|
17192
|
-
if number == nil then
|
|
17193
|
-
return nil
|
|
17194
|
-
end
|
|
17195
|
-
local flooredNumber = math.floor(number)
|
|
17196
|
-
return number == flooredNumber and flooredNumber or nil
|
|
17197
|
-
end
|
|
17198
|
-
return ____exports
|
|
17199
|
-
end,
|
|
17200
|
-
["functions.sort"] = function(...)
|
|
17201
|
-
local ____lualib = require("lualib_bundle")
|
|
17202
|
-
local __TS__ArraySlice = ____lualib.__TS__ArraySlice
|
|
17203
|
-
local ____exports = {}
|
|
17204
|
-
local ____types = require("functions.types")
|
|
17205
|
-
local isNumber = ____types.isNumber
|
|
17206
|
-
local isString = ____types.isString
|
|
17207
|
-
local isTable = ____types.isTable
|
|
17208
|
-
function ____exports.sortNormal(self, a, b)
|
|
17209
|
-
if not isNumber(nil, a) and not isString(nil, a) then
|
|
17210
|
-
error("Failed to normal sort since the first value was not a number or string and was instead: " .. type(a))
|
|
17211
|
-
end
|
|
17212
|
-
if not isNumber(nil, b) and not isString(nil, b) then
|
|
17213
|
-
error("Failed to normal sort since the second value was not a number or string and was instead: " .. type(b))
|
|
17214
|
-
end
|
|
17215
|
-
if a < b then
|
|
17216
|
-
return -1
|
|
17217
|
-
end
|
|
17218
|
-
if a > b then
|
|
17219
|
-
return 1
|
|
17220
|
-
end
|
|
17221
|
-
return 0
|
|
17222
|
-
end
|
|
17223
|
-
--- Helper function to sort an array of objects by one of the object keys.
|
|
17224
|
-
--
|
|
17225
|
-
-- For example:
|
|
17226
|
-
--
|
|
17227
|
-
-- ```ts
|
|
17228
|
-
-- const myArray = [
|
|
17229
|
-
-- {
|
|
17230
|
-
-- name: "alice",
|
|
17231
|
-
-- age: 30,
|
|
17232
|
-
-- },
|
|
17233
|
-
-- {
|
|
17234
|
-
-- name: "bob",
|
|
17235
|
-
-- age: 20,
|
|
17236
|
-
-- },
|
|
17237
|
-
-- ];
|
|
17238
|
-
-- myArray.sort(sortObjectArrayByKey("age"));
|
|
17239
|
-
-- ```
|
|
17240
|
-
function ____exports.sortObjectArrayByKey(self, key)
|
|
17241
|
-
return function(____, a, b)
|
|
17242
|
-
if not isTable(nil, a) then
|
|
17243
|
-
error((("Failed to sort an object array by the key of \"" .. key) .. "\" since the first element was not a table and was instead: ") .. type(a))
|
|
17244
|
-
end
|
|
17245
|
-
if not isTable(nil, b) then
|
|
17246
|
-
error(((("Failed to sort an object array by the key of \"" .. key) .. "\" since the second element was not a table and was instead: ") .. type(b)) .. ".")
|
|
17247
|
-
end
|
|
17248
|
-
local aValue = a[key]
|
|
17249
|
-
local bValue = b[key]
|
|
17250
|
-
return ____exports.sortNormal(nil, aValue, bValue)
|
|
17251
|
-
end
|
|
17252
|
-
end
|
|
17253
|
-
--- Helper function to sort a two-dimensional array by the first element.
|
|
17254
|
-
--
|
|
17255
|
-
-- For example:
|
|
17256
|
-
--
|
|
17257
|
-
-- ```ts
|
|
17258
|
-
-- const myArray = [[1, 2], [2, 3], [3, 4]];
|
|
17259
|
-
-- myArray.sort(sortTwoDimensionalArray);
|
|
17260
|
-
-- ```
|
|
17261
|
-
--
|
|
17262
|
-
-- This function also properly handles when the array elements are strings or numbers (instead of
|
|
17263
|
-
-- another array).
|
|
17264
|
-
--
|
|
17265
|
-
-- From:
|
|
17266
|
-
-- https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
|
|
17267
|
-
function ____exports.sortTwoDimensionalArray(self, a, b)
|
|
17268
|
-
local aType = type(a)
|
|
17269
|
-
local bType = type(b)
|
|
17270
|
-
if aType ~= bType then
|
|
17271
|
-
error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(a)) .. " & ") .. tostring(b)) .. " (") .. aType) .. " & ") .. bType) .. ")")
|
|
17272
|
-
end
|
|
17273
|
-
if aType == "string" or aType == "number" then
|
|
17274
|
-
return ____exports.sortNormal(nil, a, b)
|
|
17275
|
-
end
|
|
17276
|
-
if aType ~= "table" then
|
|
17277
|
-
error("Failed to two-dimensional sort since the first element was not a string, number, or table.")
|
|
17278
|
-
end
|
|
17279
|
-
if bType ~= "table" then
|
|
17280
|
-
error("Failed to two-dimensional sort since the second element was not a string, number, or table.")
|
|
17281
|
-
end
|
|
17282
|
-
local firstElement1 = a[1]
|
|
17283
|
-
local firstElement2 = b[1]
|
|
17284
|
-
if firstElement1 == nil or firstElement1 == nil then
|
|
17285
|
-
error("Failed to two-dimensional sort since the first element of the first array was undefined.")
|
|
17286
|
-
end
|
|
17287
|
-
if firstElement2 == nil or firstElement2 == nil then
|
|
17288
|
-
error("Failed to two-dimensional sort since the first element of the second array was undefined.")
|
|
17289
|
-
end
|
|
17290
|
-
local elementType1 = type(firstElement1)
|
|
17291
|
-
local elementType2 = type(firstElement2)
|
|
17292
|
-
if elementType1 ~= elementType2 then
|
|
17293
|
-
error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
|
|
17294
|
-
end
|
|
17295
|
-
return ____exports.sortNormal(nil, firstElement1, firstElement2)
|
|
17296
|
-
end
|
|
17297
|
-
--- Helper function to sort an array in a stable way.
|
|
17298
|
-
--
|
|
17299
|
-
-- This is useful because by default, the transpiled `Array.sort` method from TSTL is not stable.
|
|
17300
|
-
--
|
|
17301
|
-
-- Under the hood, this uses the merge sort algorithm.
|
|
17302
|
-
function ____exports.stableSort(self, array, sortFunc)
|
|
17303
|
-
if sortFunc == nil then
|
|
17304
|
-
sortFunc = ____exports.sortNormal
|
|
17305
|
-
end
|
|
17306
|
-
if #array <= 1 then
|
|
17307
|
-
return array
|
|
17308
|
-
end
|
|
17309
|
-
local middleIndex = math.floor(#array / 2)
|
|
17310
|
-
local leftArray = __TS__ArraySlice(array, 0, middleIndex)
|
|
17311
|
-
local rightArray = __TS__ArraySlice(array, middleIndex)
|
|
17312
|
-
local sortedLeftArray = ____exports.stableSort(nil, leftArray, sortFunc)
|
|
17313
|
-
local sortedRightArray = ____exports.stableSort(nil, rightArray, sortFunc)
|
|
17314
|
-
local mergedArray = {}
|
|
17315
|
-
local leftIndex = 0
|
|
17316
|
-
local rightIndex = 0
|
|
17317
|
-
while leftIndex < #sortedLeftArray and rightIndex < #sortedRightArray do
|
|
17318
|
-
local left = sortedLeftArray[leftIndex + 1]
|
|
17319
|
-
local right = sortedRightArray[rightIndex + 1]
|
|
17320
|
-
local sortResult = sortFunc(nil, left, right)
|
|
17321
|
-
if sortResult == -1 or sortResult == 0 then
|
|
17322
|
-
mergedArray[#mergedArray + 1] = left
|
|
17323
|
-
leftIndex = leftIndex + 1
|
|
17324
|
-
else
|
|
17325
|
-
mergedArray[#mergedArray + 1] = right
|
|
17326
|
-
rightIndex = rightIndex + 1
|
|
17327
|
-
end
|
|
17328
|
-
end
|
|
17329
|
-
while leftIndex < #sortedLeftArray do
|
|
17330
|
-
local left = sortedLeftArray[leftIndex + 1]
|
|
17331
|
-
mergedArray[#mergedArray + 1] = left
|
|
17332
|
-
leftIndex = leftIndex + 1
|
|
17333
|
-
end
|
|
17334
|
-
while rightIndex < #sortedRightArray do
|
|
17335
|
-
local right = sortedRightArray[rightIndex + 1]
|
|
17336
|
-
mergedArray[#mergedArray + 1] = right
|
|
17337
|
-
rightIndex = rightIndex + 1
|
|
17338
|
-
end
|
|
17339
|
-
return mergedArray
|
|
17340
|
-
end
|
|
17341
|
-
return ____exports
|
|
17342
|
-
end,
|
|
17343
|
-
["types.WidenLiteral"] = function(...)
|
|
17344
|
-
local ____exports = {}
|
|
17345
|
-
return ____exports
|
|
17346
|
-
end,
|
|
17347
|
-
["core.cachedClasses"] = function(...)
|
|
17348
|
-
local ____exports = {}
|
|
17349
|
-
--- A cached version of the class returned from the `Game()` constructor.
|
|
17350
|
-
--
|
|
17351
|
-
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
17352
|
-
--
|
|
17353
|
-
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
17354
|
-
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
17355
|
-
____exports.game = Game()
|
|
17356
|
-
--- A cached version of the class returned from the `Isaac.GetItemConfig()` constructor.
|
|
17357
|
-
--
|
|
17358
|
-
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
17359
|
-
--
|
|
17360
|
-
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
17361
|
-
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
17362
|
-
____exports.itemConfig = Isaac.GetItemConfig()
|
|
17363
|
-
--- A cached version of the class returned from the `MusicManager()` constructor.
|
|
17364
|
-
--
|
|
17365
|
-
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
17366
|
-
--
|
|
17367
|
-
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
17368
|
-
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
17369
|
-
____exports.musicManager = MusicManager()
|
|
17370
|
-
--- A cached version of the class returned from the `SFXManager()` constructor.
|
|
17371
|
-
--
|
|
17372
|
-
-- Use this instead of invoking the constructor again for a miniscule performance increase.
|
|
17373
|
-
--
|
|
17374
|
-
-- Caching the results of this constructor is safe, but caching other classes (like `Level` or
|
|
17375
|
-
-- `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
17376
|
-
____exports.sfxManager = SFXManager()
|
|
17377
|
-
--- An object containing all 7 vanilla fonts that are pre-loaded and ready to use.
|
|
17378
|
-
--
|
|
17379
|
-
-- For more information on the vanilla fonts and to see what they look like, see:
|
|
17380
|
-
-- https://wofsauge.github.io/IsaacDocs/rep/tutorials/Tutorial-Rendertext.html
|
|
17381
|
-
____exports.fonts = {
|
|
17382
|
-
droid = Font(),
|
|
17383
|
-
pfTempestaSevenCondensed = Font(),
|
|
17384
|
-
teamMeatFont10 = Font(),
|
|
17385
|
-
teamMeatFont12 = Font(),
|
|
17386
|
-
teamMeatFont16Bold = Font(),
|
|
17387
|
-
terminus = Font(),
|
|
17388
|
-
upheaval = Font()
|
|
17389
|
-
}
|
|
17390
|
-
____exports.fonts.droid:Load("font/droid.fnt")
|
|
17391
|
-
____exports.fonts.pfTempestaSevenCondensed:Load("font/pftempestasevencondensed.fnt")
|
|
17392
|
-
____exports.fonts.teamMeatFont10:Load("font/teammeatfont10.fnt")
|
|
17393
|
-
____exports.fonts.teamMeatFont12:Load("font/teammeatfont12.fnt")
|
|
17394
|
-
____exports.fonts.teamMeatFont16Bold:Load("font/teammeatfont16bold.fnt")
|
|
17395
|
-
____exports.fonts.terminus:Load("font/terminus.fnt")
|
|
17396
|
-
____exports.fonts.upheaval:Load("font/upheaval.fnt")
|
|
17397
|
-
return ____exports
|
|
17398
|
-
end,
|
|
17399
|
-
["enums.private.SerializationBrand"] = function(...)
|
|
17400
|
-
local ____exports = {}
|
|
17401
|
-
--- During serialization, we write an arbitrary string key to the object with a value of an empty
|
|
17402
|
-
-- string. This is used during deserialization to instantiate the correct type of object.
|
|
17403
|
-
____exports.SerializationBrand = {}
|
|
17404
|
-
____exports.SerializationBrand.DEFAULT_MAP = "__TSTL_DEFAULT_MAP"
|
|
17405
|
-
____exports.SerializationBrand.MAP = "__TSTL_MAP"
|
|
17406
|
-
____exports.SerializationBrand.SET = "__TSTL_SET"
|
|
17407
|
-
____exports.SerializationBrand.BIT_SET_128 = "__BIT_SET_128"
|
|
17408
|
-
____exports.SerializationBrand.COLOR = "__COLOR"
|
|
17409
|
-
____exports.SerializationBrand.K_COLOR = "__K_COLOR"
|
|
17410
|
-
____exports.SerializationBrand.RNG = "__RNG"
|
|
17411
|
-
____exports.SerializationBrand.VECTOR = "__VECTOR"
|
|
17412
|
-
____exports.SerializationBrand.DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE"
|
|
17413
|
-
____exports.SerializationBrand.OBJECT_WITH_NUMBER_KEYS = "__TSTL_OBJECT_WITH_NUMBER_KEYS"
|
|
17414
|
-
____exports.SerializationBrand.TSTL_CLASS = "__TSTL_CLASS"
|
|
17415
|
-
return ____exports
|
|
17416
|
-
end,
|
|
17417
|
-
["types.ReadonlyRecord"] = function(...)
|
|
17418
|
-
local ____exports = {}
|
|
17419
|
-
return ____exports
|
|
17420
|
-
end,
|
|
17421
|
-
["functions.log"] = function(...)
|
|
17422
|
-
local ____exports = {}
|
|
17423
|
-
local ____types = require("functions.types")
|
|
17424
|
-
local isNumber = ____types.isNumber
|
|
17425
|
-
--- Helper function to get the name and the line number of the current calling function.
|
|
17426
|
-
--
|
|
17427
|
-
-- For this function to work properly, the "--luadebug" flag must be enabled. Otherwise, it will
|
|
17428
|
-
-- always return undefined.
|
|
17429
|
-
--
|
|
17430
|
-
-- @param levels Optional. The amount of levels to look backwards in the call stack. Default is 3
|
|
17431
|
-
-- (because the first level is this function, the second level is the calling
|
|
17432
|
-
-- function, and the third level is the parent of the calling function).
|
|
17433
|
-
function ____exports.getParentFunctionDescription(levels)
|
|
17434
|
-
if levels == nil then
|
|
17435
|
-
levels = 3
|
|
17436
|
-
end
|
|
17437
|
-
if debug ~= nil then
|
|
17438
|
-
local debugTable = debug.getinfo(levels)
|
|
17439
|
-
if debugTable ~= nil then
|
|
17440
|
-
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
17441
|
-
end
|
|
17442
|
-
end
|
|
17443
|
-
if SandboxGetParentFunctionDescription ~= nil then
|
|
17444
|
-
return SandboxGetParentFunctionDescription(levels)
|
|
17445
|
-
end
|
|
17446
|
-
return nil
|
|
17447
|
-
end
|
|
17448
|
-
--- Helper function to avoid typing out `Isaac.DebugString()`.
|
|
17449
|
-
--
|
|
17450
|
-
-- If you have the "--luadebug" launch flag turned on, then this function will also prepend the
|
|
17451
|
-
-- function name and the line number before the string, like this:
|
|
17452
|
-
--
|
|
17453
|
-
-- ```text
|
|
17454
|
-
-- [INFO] - Lua Debug: saveToDisk:42494 - The save data manager wrote data to the "save#.dat" file.
|
|
17455
|
-
-- ```
|
|
17456
|
-
--
|
|
17457
|
-
-- Subsequently, it is recommended that you turn on the "--luadebug" launch flag when developing
|
|
17458
|
-
-- your mod so that debugging becomes a little bit easier.
|
|
17459
|
-
--
|
|
17460
|
-
-- @param msg The message to log.
|
|
17461
|
-
-- @param includeParentFunction Optional. Whether to prefix the message with the function name and
|
|
17462
|
-
-- line number, as shown in the above example. Default is true.
|
|
17463
|
-
function ____exports.log(msg, includeParentFunction)
|
|
17464
|
-
if includeParentFunction == nil then
|
|
17465
|
-
includeParentFunction = true
|
|
17466
|
-
end
|
|
17467
|
-
if isNumber(nil, msg) then
|
|
17468
|
-
msg = tostring(msg)
|
|
17469
|
-
end
|
|
17470
|
-
local ____includeParentFunction_0
|
|
17471
|
-
if includeParentFunction then
|
|
17472
|
-
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
17473
|
-
else
|
|
17474
|
-
____includeParentFunction_0 = nil
|
|
17475
|
-
end
|
|
17476
|
-
local parentFunctionDescription = ____includeParentFunction_0
|
|
17477
|
-
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
17478
|
-
Isaac.DebugString(debugMsg)
|
|
17479
|
-
end
|
|
17480
|
-
--- Helper function to log a message to the "log.txt" file and to print it to the screen at the same
|
|
17481
|
-
-- time.
|
|
17482
|
-
function ____exports.logAndPrint(self, msg)
|
|
17483
|
-
____exports.log(msg)
|
|
17484
|
-
print(msg)
|
|
17485
|
-
end
|
|
17486
|
-
--- Helper function to log an error message and also print it to the console for better visibility.
|
|
17487
|
-
--
|
|
17488
|
-
-- This is useful in situations where using the `error` function would be dangerous (since it
|
|
17489
|
-
-- prevents all of the subsequent code in the callback from running).
|
|
17490
|
-
function ____exports.logError(msg)
|
|
17491
|
-
local errorMsg = "Error: " .. msg
|
|
17492
|
-
____exports.logAndPrint(nil, errorMsg)
|
|
17493
|
-
end
|
|
17494
|
-
return ____exports
|
|
17495
|
-
end,
|
|
17496
|
-
["functions.debugFunctions"] = function(...)
|
|
17497
|
-
local ____exports = {}
|
|
17498
|
-
local ____log = require("functions.log")
|
|
17499
|
-
local log = ____log.log
|
|
17500
|
-
--- Helper function to get the current time for benchmarking / profiling purposes.
|
|
17501
|
-
--
|
|
17502
|
-
-- The return value will either be in seconds or milliseconds, depending on if the "--luadebug" flag
|
|
17503
|
-
-- is turned on.
|
|
17504
|
-
--
|
|
17505
|
-
-- If the "--luadebug" flag is present, then this function will use the `socket.gettime` method,
|
|
17506
|
-
-- which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
|
|
17507
|
-
-- the more conventional `Isaac.GetTime` method, since it has one extra decimal point of precision.
|
|
17508
|
-
--
|
|
17509
|
-
-- If the "--luadebug" flag is not present, then this function will use the `Isaac.GetTime` method,
|
|
17510
|
-
-- which returns the number of milliseconds since the computer's operating system was started (e.g.
|
|
17511
|
-
-- "739454963").
|
|
17512
|
-
--
|
|
17513
|
-
-- @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
|
|
17514
|
-
-- Default is true. If set to false, the `Isaac.GetTime()` method will
|
|
17515
|
-
-- always be used.
|
|
17516
|
-
function ____exports.getTime(self, useSocketIfAvailable)
|
|
17517
|
-
if useSocketIfAvailable == nil then
|
|
17518
|
-
useSocketIfAvailable = true
|
|
17519
|
-
end
|
|
17520
|
-
if useSocketIfAvailable then
|
|
17521
|
-
if SandboxGetTime ~= nil then
|
|
17522
|
-
return SandboxGetTime()
|
|
17523
|
-
end
|
|
17524
|
-
if ____exports.isLuaDebugEnabled(nil) then
|
|
17525
|
-
local ok, requiredSocket = pcall(require, "socket")
|
|
17526
|
-
if ok then
|
|
17527
|
-
local socket = requiredSocket
|
|
17528
|
-
return socket.gettime()
|
|
17529
|
-
end
|
|
17530
|
-
end
|
|
17531
|
-
end
|
|
17532
|
-
return Isaac.GetTime()
|
|
17533
|
-
end
|
|
17534
|
-
--- Players can boot the game with an launch option called "--luadebug", which will enable additional
|
|
17535
|
-
-- functionality that is considered to be unsafe. For more information about this flag, see the
|
|
17536
|
-
-- wiki: https://bindingofisaacrebirth.fandom.com/wiki/Launch_Options
|
|
17537
|
-
--
|
|
17538
|
-
-- When this flag is enabled, the global environment will be slightly different. The differences are
|
|
17539
|
-
-- documented here: https://wofsauge.github.io/IsaacDocs/rep/Globals.html
|
|
17540
|
-
--
|
|
17541
|
-
-- This function uses the `package` global variable as a proxy to determine if the "--luadebug" flag
|
|
17542
|
-
-- is enabled.
|
|
17543
|
-
--
|
|
17544
|
-
-- Note that this function will return false if the Racing+ sandbox is enabled, even if the
|
|
17545
|
-
-- "--luadebug" flag is really turned on. If checking for this case is needed, check for the
|
|
17546
|
-
-- presence of the `sandboxGetTraceback` function.
|
|
17547
|
-
function ____exports.isLuaDebugEnabled(self)
|
|
17548
|
-
return _G.package ~= nil
|
|
17549
|
-
end
|
|
17550
|
-
--- Helper function to get the amount of elapsed time for benchmarking / profiling purposes.
|
|
17551
|
-
--
|
|
17552
|
-
-- For more information, see the documentation for the `getTime` helper function.
|
|
17553
|
-
--
|
|
17554
|
-
-- @param time The milliseconds (int) or fractional seconds (float).
|
|
17555
|
-
-- @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
|
|
17556
|
-
-- Default is true. If set to false, the `Isaac.GetTime()` method will
|
|
17557
|
-
-- always be used.
|
|
17558
|
-
function ____exports.getElapsedTimeSince(self, time, useSocketIfAvailable)
|
|
17559
|
-
if useSocketIfAvailable == nil then
|
|
17560
|
-
useSocketIfAvailable = true
|
|
17561
|
-
end
|
|
17562
|
-
return ____exports.getTime(nil, useSocketIfAvailable) - time
|
|
17563
|
-
end
|
|
17564
|
-
--- Helper function to get a stack trace.
|
|
17565
|
-
--
|
|
17566
|
-
-- This will only work if the `--luadebug` launch option is enabled. If it isn't, then a error
|
|
17567
|
-
-- string will be returned.
|
|
17568
|
-
function ____exports.getTraceback()
|
|
17569
|
-
if SandboxGetTraceback ~= nil then
|
|
17570
|
-
return SandboxGetTraceback()
|
|
17571
|
-
end
|
|
17572
|
-
if debug ~= nil then
|
|
17573
|
-
return debug.traceback()
|
|
17574
|
-
end
|
|
17575
|
-
return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
|
|
17576
|
-
end
|
|
17577
|
-
--- Helper function to log a stack trace to the "log.txt" file, similar to JavaScript's
|
|
17578
|
-
-- `console.trace` function.
|
|
17579
|
-
--
|
|
17580
|
-
-- This will only work if the `--luadebug` launch option is enabled. If it isn't, then a error
|
|
17581
|
-
-- string will be logged.
|
|
17582
|
-
function ____exports.traceback()
|
|
17583
|
-
local tracebackOutput = ____exports.getTraceback()
|
|
17584
|
-
log(tracebackOutput)
|
|
17585
|
-
end
|
|
17237
|
+
____exports.ButtonAction.PAUSE = 12
|
|
17238
|
+
____exports.ButtonAction[____exports.ButtonAction.PAUSE] = "PAUSE"
|
|
17239
|
+
____exports.ButtonAction.MAP = 13
|
|
17240
|
+
____exports.ButtonAction[____exports.ButtonAction.MAP] = "MAP"
|
|
17241
|
+
____exports.ButtonAction.MENU_CONFIRM = 14
|
|
17242
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_CONFIRM] = "MENU_CONFIRM"
|
|
17243
|
+
____exports.ButtonAction.MENU_BACK = 15
|
|
17244
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_BACK] = "MENU_BACK"
|
|
17245
|
+
____exports.ButtonAction.RESTART = 16
|
|
17246
|
+
____exports.ButtonAction[____exports.ButtonAction.RESTART] = "RESTART"
|
|
17247
|
+
____exports.ButtonAction.FULLSCREEN = 17
|
|
17248
|
+
____exports.ButtonAction[____exports.ButtonAction.FULLSCREEN] = "FULLSCREEN"
|
|
17249
|
+
____exports.ButtonAction.MUTE = 18
|
|
17250
|
+
____exports.ButtonAction[____exports.ButtonAction.MUTE] = "MUTE"
|
|
17251
|
+
____exports.ButtonAction.JOIN_MULTIPLAYER = 19
|
|
17252
|
+
____exports.ButtonAction[____exports.ButtonAction.JOIN_MULTIPLAYER] = "JOIN_MULTIPLAYER"
|
|
17253
|
+
____exports.ButtonAction.MENU_LEFT = 20
|
|
17254
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_LEFT] = "MENU_LEFT"
|
|
17255
|
+
____exports.ButtonAction.MENU_RIGHT = 21
|
|
17256
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_RIGHT] = "MENU_RIGHT"
|
|
17257
|
+
____exports.ButtonAction.MENU_UP = 22
|
|
17258
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_UP] = "MENU_UP"
|
|
17259
|
+
____exports.ButtonAction.MENU_DOWN = 23
|
|
17260
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_DOWN] = "MENU_DOWN"
|
|
17261
|
+
____exports.ButtonAction.MENU_LT = 24
|
|
17262
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_LT] = "MENU_LT"
|
|
17263
|
+
____exports.ButtonAction.MENU_RT = 25
|
|
17264
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_RT] = "MENU_RT"
|
|
17265
|
+
____exports.ButtonAction.MENU_TAB = 26
|
|
17266
|
+
____exports.ButtonAction[____exports.ButtonAction.MENU_TAB] = "MENU_TAB"
|
|
17267
|
+
____exports.ButtonAction.CONSOLE = 28
|
|
17268
|
+
____exports.ButtonAction[____exports.ButtonAction.CONSOLE] = "CONSOLE"
|
|
17586
17269
|
return ____exports
|
|
17587
17270
|
end,
|
|
17588
|
-
["
|
|
17271
|
+
["lua_modules.isaac-typescript-definitions.dist.enums.BrokenWatchState"] = function(...)
|
|
17589
17272
|
local ____exports = {}
|
|
17273
|
+
--- Used by the `Room.SetBrokenWatchState` method.
|
|
17274
|
+
____exports.BrokenWatchState = {}
|
|
17275
|
+
____exports.BrokenWatchState.NONE = 0
|
|
17276
|
+
____exports.BrokenWatchState[____exports.BrokenWatchState.NONE] = "NONE"
|
|
17277
|
+
____exports.BrokenWatchState.SLOW = 1
|
|
17278
|
+
____exports.BrokenWatchState[____exports.BrokenWatchState.SLOW] = "SLOW"
|
|
17279
|
+
____exports.BrokenWatchState.FAST = 2
|
|
17280
|
+
____exports.BrokenWatchState[____exports.BrokenWatchState.FAST] = "FAST"
|
|
17590
17281
|
return ____exports
|
|
17591
17282
|
end,
|
|
17592
|
-
["
|
|
17593
|
-
local ____lualib = require("lualib_bundle")
|
|
17594
|
-
local __TS__New = ____lualib.__TS__New
|
|
17595
|
-
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
17596
|
-
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
17283
|
+
["lua_modules.isaac-typescript-definitions.dist.enums.BackdropType"] = function(...)
|
|
17597
17284
|
local ____exports = {}
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
|
|
17614
|
-
|
|
17615
|
-
|
|
17616
|
-
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
17676
|
-
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
17698
|
-
|
|
17699
|
-
|
|
17700
|
-
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
17722
|
-
|
|
17723
|
-
|
|
17724
|
-
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
local playerPtrHash = GetPtrHash(player)
|
|
17733
|
-
local players = ____exports.getAllPlayers(nil)
|
|
17734
|
-
return __TS__ArrayFilter(
|
|
17735
|
-
players,
|
|
17736
|
-
function(____, otherPlayer) return GetPtrHash(otherPlayer) ~= playerPtrHash end
|
|
17737
|
-
)
|
|
17738
|
-
end
|
|
17739
|
-
--- Helper function to get the corresponding `EntityPlayer` object that corresponds to a
|
|
17740
|
-
-- `PlayerIndex`.
|
|
17741
|
-
function ____exports.getPlayerFromIndex(self, playerIndex)
|
|
17742
|
-
local players = ____exports.getAllPlayers(nil)
|
|
17743
|
-
return __TS__ArrayFind(
|
|
17744
|
-
players,
|
|
17745
|
-
function(____, player) return ____exports.getPlayerIndex(nil, player) == playerIndex end
|
|
17746
|
-
)
|
|
17747
|
-
end
|
|
17748
|
-
--- Helper function to return the index of this player with respect to the output of the
|
|
17749
|
-
-- `Isaac.GetPlayer` method.
|
|
17750
|
-
--
|
|
17751
|
-
-- Note that if you storing information about a player in a data structure, you never want to use
|
|
17752
|
-
-- this index; use the `getPlayerIndex` function instead.
|
|
17753
|
-
function ____exports.getPlayerIndexVanilla(self, playerToFind)
|
|
17754
|
-
local numPlayers = game:GetNumPlayers()
|
|
17755
|
-
local playerToFindHash = GetPtrHash(playerToFind)
|
|
17756
|
-
do
|
|
17757
|
-
local i = 0
|
|
17758
|
-
while i < numPlayers do
|
|
17759
|
-
local player = Isaac.GetPlayer(i)
|
|
17760
|
-
local playerHash = GetPtrHash(player)
|
|
17761
|
-
if playerHash == playerToFindHash then
|
|
17762
|
-
return i
|
|
17763
|
-
end
|
|
17764
|
-
i = i + 1
|
|
17765
|
-
end
|
|
17766
|
-
end
|
|
17767
|
-
return nil
|
|
17768
|
-
end
|
|
17769
|
-
--- Helper function to detect if a particular player is the Found Soul player provided by the
|
|
17770
|
-
-- trinket.
|
|
17771
|
-
function ____exports.isFoundSoul(self, player)
|
|
17772
|
-
return ____exports.isChildPlayer(nil, player) and player.Variant == PlayerVariant.COOP_BABY and player.SubType == BabySubType.FOUND_SOUL
|
|
17773
|
-
end
|
|
17285
|
+
____exports.BackdropType = {}
|
|
17286
|
+
____exports.BackdropType.BASEMENT = 1
|
|
17287
|
+
____exports.BackdropType[____exports.BackdropType.BASEMENT] = "BASEMENT"
|
|
17288
|
+
____exports.BackdropType.CELLAR = 2
|
|
17289
|
+
____exports.BackdropType[____exports.BackdropType.CELLAR] = "CELLAR"
|
|
17290
|
+
____exports.BackdropType.BURNING_BASEMENT = 3
|
|
17291
|
+
____exports.BackdropType[____exports.BackdropType.BURNING_BASEMENT] = "BURNING_BASEMENT"
|
|
17292
|
+
____exports.BackdropType.CAVES = 4
|
|
17293
|
+
____exports.BackdropType[____exports.BackdropType.CAVES] = "CAVES"
|
|
17294
|
+
____exports.BackdropType.CATACOMBS = 5
|
|
17295
|
+
____exports.BackdropType[____exports.BackdropType.CATACOMBS] = "CATACOMBS"
|
|
17296
|
+
____exports.BackdropType.FLOODED_CAVES = 6
|
|
17297
|
+
____exports.BackdropType[____exports.BackdropType.FLOODED_CAVES] = "FLOODED_CAVES"
|
|
17298
|
+
____exports.BackdropType.DEPTHS = 7
|
|
17299
|
+
____exports.BackdropType[____exports.BackdropType.DEPTHS] = "DEPTHS"
|
|
17300
|
+
____exports.BackdropType.NECROPOLIS = 8
|
|
17301
|
+
____exports.BackdropType[____exports.BackdropType.NECROPOLIS] = "NECROPOLIS"
|
|
17302
|
+
____exports.BackdropType.DANK_DEPTHS = 9
|
|
17303
|
+
____exports.BackdropType[____exports.BackdropType.DANK_DEPTHS] = "DANK_DEPTHS"
|
|
17304
|
+
____exports.BackdropType.WOMB = 10
|
|
17305
|
+
____exports.BackdropType[____exports.BackdropType.WOMB] = "WOMB"
|
|
17306
|
+
____exports.BackdropType.UTERO = 11
|
|
17307
|
+
____exports.BackdropType[____exports.BackdropType.UTERO] = "UTERO"
|
|
17308
|
+
____exports.BackdropType.SCARRED_WOMB = 12
|
|
17309
|
+
____exports.BackdropType[____exports.BackdropType.SCARRED_WOMB] = "SCARRED_WOMB"
|
|
17310
|
+
____exports.BackdropType.BLUE_WOMB = 13
|
|
17311
|
+
____exports.BackdropType[____exports.BackdropType.BLUE_WOMB] = "BLUE_WOMB"
|
|
17312
|
+
____exports.BackdropType.SHEOL = 14
|
|
17313
|
+
____exports.BackdropType[____exports.BackdropType.SHEOL] = "SHEOL"
|
|
17314
|
+
____exports.BackdropType.CATHEDRAL = 15
|
|
17315
|
+
____exports.BackdropType[____exports.BackdropType.CATHEDRAL] = "CATHEDRAL"
|
|
17316
|
+
____exports.BackdropType.DARK_ROOM = 16
|
|
17317
|
+
____exports.BackdropType[____exports.BackdropType.DARK_ROOM] = "DARK_ROOM"
|
|
17318
|
+
____exports.BackdropType.CHEST = 17
|
|
17319
|
+
____exports.BackdropType[____exports.BackdropType.CHEST] = "CHEST"
|
|
17320
|
+
____exports.BackdropType.MEGA_SATAN = 18
|
|
17321
|
+
____exports.BackdropType[____exports.BackdropType.MEGA_SATAN] = "MEGA_SATAN"
|
|
17322
|
+
____exports.BackdropType.LIBRARY = 19
|
|
17323
|
+
____exports.BackdropType[____exports.BackdropType.LIBRARY] = "LIBRARY"
|
|
17324
|
+
____exports.BackdropType.SHOP = 20
|
|
17325
|
+
____exports.BackdropType[____exports.BackdropType.SHOP] = "SHOP"
|
|
17326
|
+
____exports.BackdropType.CLEAN_BEDROOM = 21
|
|
17327
|
+
____exports.BackdropType[____exports.BackdropType.CLEAN_BEDROOM] = "CLEAN_BEDROOM"
|
|
17328
|
+
____exports.BackdropType.DIRTY_BEDROOM = 22
|
|
17329
|
+
____exports.BackdropType[____exports.BackdropType.DIRTY_BEDROOM] = "DIRTY_BEDROOM"
|
|
17330
|
+
____exports.BackdropType.SECRET = 23
|
|
17331
|
+
____exports.BackdropType[____exports.BackdropType.SECRET] = "SECRET"
|
|
17332
|
+
____exports.BackdropType.DICE = 24
|
|
17333
|
+
____exports.BackdropType[____exports.BackdropType.DICE] = "DICE"
|
|
17334
|
+
____exports.BackdropType.ARCADE = 25
|
|
17335
|
+
____exports.BackdropType[____exports.BackdropType.ARCADE] = "ARCADE"
|
|
17336
|
+
____exports.BackdropType.ERROR_ROOM = 26
|
|
17337
|
+
____exports.BackdropType[____exports.BackdropType.ERROR_ROOM] = "ERROR_ROOM"
|
|
17338
|
+
____exports.BackdropType.BLUE_WOMB_PASS = 27
|
|
17339
|
+
____exports.BackdropType[____exports.BackdropType.BLUE_WOMB_PASS] = "BLUE_WOMB_PASS"
|
|
17340
|
+
____exports.BackdropType.GREED_SHOP = 28
|
|
17341
|
+
____exports.BackdropType[____exports.BackdropType.GREED_SHOP] = "GREED_SHOP"
|
|
17342
|
+
____exports.BackdropType.DUNGEON = 29
|
|
17343
|
+
____exports.BackdropType[____exports.BackdropType.DUNGEON] = "DUNGEON"
|
|
17344
|
+
____exports.BackdropType.SACRIFICE = 30
|
|
17345
|
+
____exports.BackdropType[____exports.BackdropType.SACRIFICE] = "SACRIFICE"
|
|
17346
|
+
____exports.BackdropType.DOWNPOUR = 31
|
|
17347
|
+
____exports.BackdropType[____exports.BackdropType.DOWNPOUR] = "DOWNPOUR"
|
|
17348
|
+
____exports.BackdropType.MINES = 32
|
|
17349
|
+
____exports.BackdropType[____exports.BackdropType.MINES] = "MINES"
|
|
17350
|
+
____exports.BackdropType.MAUSOLEUM = 33
|
|
17351
|
+
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM] = "MAUSOLEUM"
|
|
17352
|
+
____exports.BackdropType.CORPSE = 34
|
|
17353
|
+
____exports.BackdropType[____exports.BackdropType.CORPSE] = "CORPSE"
|
|
17354
|
+
____exports.BackdropType.PLANETARIUM = 35
|
|
17355
|
+
____exports.BackdropType[____exports.BackdropType.PLANETARIUM] = "PLANETARIUM"
|
|
17356
|
+
____exports.BackdropType.DOWNPOUR_ENTRANCE = 36
|
|
17357
|
+
____exports.BackdropType[____exports.BackdropType.DOWNPOUR_ENTRANCE] = "DOWNPOUR_ENTRANCE"
|
|
17358
|
+
____exports.BackdropType.MINES_ENTRANCE = 37
|
|
17359
|
+
____exports.BackdropType[____exports.BackdropType.MINES_ENTRANCE] = "MINES_ENTRANCE"
|
|
17360
|
+
____exports.BackdropType.MAUSOLEUM_ENTRANCE = 38
|
|
17361
|
+
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_ENTRANCE] = "MAUSOLEUM_ENTRANCE"
|
|
17362
|
+
____exports.BackdropType.CORPSE_ENTRANCE = 39
|
|
17363
|
+
____exports.BackdropType[____exports.BackdropType.CORPSE_ENTRANCE] = "CORPSE_ENTRANCE"
|
|
17364
|
+
____exports.BackdropType.MAUSOLEUM_2 = 40
|
|
17365
|
+
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_2] = "MAUSOLEUM_2"
|
|
17366
|
+
____exports.BackdropType.MAUSOLEUM_3 = 41
|
|
17367
|
+
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_3] = "MAUSOLEUM_3"
|
|
17368
|
+
____exports.BackdropType.MAUSOLEUM_4 = 42
|
|
17369
|
+
____exports.BackdropType[____exports.BackdropType.MAUSOLEUM_4] = "MAUSOLEUM_4"
|
|
17370
|
+
____exports.BackdropType.CORPSE_2 = 43
|
|
17371
|
+
____exports.BackdropType[____exports.BackdropType.CORPSE_2] = "CORPSE_2"
|
|
17372
|
+
____exports.BackdropType.CORPSE_3 = 44
|
|
17373
|
+
____exports.BackdropType[____exports.BackdropType.CORPSE_3] = "CORPSE_3"
|
|
17374
|
+
____exports.BackdropType.DROSS = 45
|
|
17375
|
+
____exports.BackdropType[____exports.BackdropType.DROSS] = "DROSS"
|
|
17376
|
+
____exports.BackdropType.ASHPIT = 46
|
|
17377
|
+
____exports.BackdropType[____exports.BackdropType.ASHPIT] = "ASHPIT"
|
|
17378
|
+
____exports.BackdropType.GEHENNA = 47
|
|
17379
|
+
____exports.BackdropType[____exports.BackdropType.GEHENNA] = "GEHENNA"
|
|
17380
|
+
____exports.BackdropType.MORTIS = 48
|
|
17381
|
+
____exports.BackdropType[____exports.BackdropType.MORTIS] = "MORTIS"
|
|
17382
|
+
____exports.BackdropType.ISAACS_BEDROOM = 49
|
|
17383
|
+
____exports.BackdropType[____exports.BackdropType.ISAACS_BEDROOM] = "ISAACS_BEDROOM"
|
|
17384
|
+
____exports.BackdropType.HALLWAY = 50
|
|
17385
|
+
____exports.BackdropType[____exports.BackdropType.HALLWAY] = "HALLWAY"
|
|
17386
|
+
____exports.BackdropType.MOMS_BEDROOM = 51
|
|
17387
|
+
____exports.BackdropType[____exports.BackdropType.MOMS_BEDROOM] = "MOMS_BEDROOM"
|
|
17388
|
+
____exports.BackdropType.CLOSET = 52
|
|
17389
|
+
____exports.BackdropType[____exports.BackdropType.CLOSET] = "CLOSET"
|
|
17390
|
+
____exports.BackdropType.CLOSET_B = 53
|
|
17391
|
+
____exports.BackdropType[____exports.BackdropType.CLOSET_B] = "CLOSET_B"
|
|
17392
|
+
____exports.BackdropType.DOGMA = 54
|
|
17393
|
+
____exports.BackdropType[____exports.BackdropType.DOGMA] = "DOGMA"
|
|
17394
|
+
____exports.BackdropType.DUNGEON_GIDEON = 55
|
|
17395
|
+
____exports.BackdropType[____exports.BackdropType.DUNGEON_GIDEON] = "DUNGEON_GIDEON"
|
|
17396
|
+
____exports.BackdropType.DUNGEON_ROTGUT = 56
|
|
17397
|
+
____exports.BackdropType[____exports.BackdropType.DUNGEON_ROTGUT] = "DUNGEON_ROTGUT"
|
|
17398
|
+
____exports.BackdropType.DUNGEON_BEAST = 57
|
|
17399
|
+
____exports.BackdropType[____exports.BackdropType.DUNGEON_BEAST] = "DUNGEON_BEAST"
|
|
17400
|
+
____exports.BackdropType.MINES_SHAFT = 58
|
|
17401
|
+
____exports.BackdropType[____exports.BackdropType.MINES_SHAFT] = "MINES_SHAFT"
|
|
17402
|
+
____exports.BackdropType.ASHPIT_SHAFT = 59
|
|
17403
|
+
____exports.BackdropType[____exports.BackdropType.ASHPIT_SHAFT] = "ASHPIT_SHAFT"
|
|
17404
|
+
____exports.BackdropType.DARK_CLOSET = 60
|
|
17405
|
+
____exports.BackdropType[____exports.BackdropType.DARK_CLOSET] = "DARK_CLOSET"
|
|
17406
|
+
return ____exports
|
|
17407
|
+
end,
|
|
17408
|
+
["lua_modules.isaac-typescript-definitions.dist.enums.ActiveSlot"] = function(...)
|
|
17409
|
+
local ____exports = {}
|
|
17410
|
+
____exports.ActiveSlot = {}
|
|
17411
|
+
____exports.ActiveSlot.PRIMARY = 0
|
|
17412
|
+
____exports.ActiveSlot[____exports.ActiveSlot.PRIMARY] = "PRIMARY"
|
|
17413
|
+
____exports.ActiveSlot.SECONDARY = 1
|
|
17414
|
+
____exports.ActiveSlot[____exports.ActiveSlot.SECONDARY] = "SECONDARY"
|
|
17415
|
+
____exports.ActiveSlot.POCKET = 2
|
|
17416
|
+
____exports.ActiveSlot[____exports.ActiveSlot.POCKET] = "POCKET"
|
|
17417
|
+
____exports.ActiveSlot.POCKET_SINGLE_USE = 3
|
|
17418
|
+
____exports.ActiveSlot[____exports.ActiveSlot.POCKET_SINGLE_USE] = "POCKET_SINGLE_USE"
|
|
17774
17419
|
return ____exports
|
|
17775
17420
|
end,
|
|
17776
17421
|
["functions.utils"] = function(...)
|
|
@@ -18670,6 +18315,149 @@ function ____exports.getRandomInt(self, min, max, seedOrRNG, exceptions)
|
|
|
18670
18315
|
until not exceptionsSet:has(randomInt)
|
|
18671
18316
|
return randomInt
|
|
18672
18317
|
end
|
|
18318
|
+
return ____exports
|
|
18319
|
+
end,
|
|
18320
|
+
["functions.sort"] = function(...)
|
|
18321
|
+
local ____lualib = require("lualib_bundle")
|
|
18322
|
+
local __TS__ArraySlice = ____lualib.__TS__ArraySlice
|
|
18323
|
+
local ____exports = {}
|
|
18324
|
+
local ____types = require("functions.types")
|
|
18325
|
+
local isNumber = ____types.isNumber
|
|
18326
|
+
local isString = ____types.isString
|
|
18327
|
+
local isTable = ____types.isTable
|
|
18328
|
+
function ____exports.sortNormal(self, a, b)
|
|
18329
|
+
if not isNumber(nil, a) and not isString(nil, a) then
|
|
18330
|
+
error("Failed to normal sort since the first value was not a number or string and was instead: " .. type(a))
|
|
18331
|
+
end
|
|
18332
|
+
if not isNumber(nil, b) and not isString(nil, b) then
|
|
18333
|
+
error("Failed to normal sort since the second value was not a number or string and was instead: " .. type(b))
|
|
18334
|
+
end
|
|
18335
|
+
if a < b then
|
|
18336
|
+
return -1
|
|
18337
|
+
end
|
|
18338
|
+
if a > b then
|
|
18339
|
+
return 1
|
|
18340
|
+
end
|
|
18341
|
+
return 0
|
|
18342
|
+
end
|
|
18343
|
+
--- Helper function to sort an array of objects by one of the object keys.
|
|
18344
|
+
--
|
|
18345
|
+
-- For example:
|
|
18346
|
+
--
|
|
18347
|
+
-- ```ts
|
|
18348
|
+
-- const myArray = [
|
|
18349
|
+
-- {
|
|
18350
|
+
-- name: "alice",
|
|
18351
|
+
-- age: 30,
|
|
18352
|
+
-- },
|
|
18353
|
+
-- {
|
|
18354
|
+
-- name: "bob",
|
|
18355
|
+
-- age: 20,
|
|
18356
|
+
-- },
|
|
18357
|
+
-- ];
|
|
18358
|
+
-- myArray.sort(sortObjectArrayByKey("age"));
|
|
18359
|
+
-- ```
|
|
18360
|
+
function ____exports.sortObjectArrayByKey(self, key)
|
|
18361
|
+
return function(____, a, b)
|
|
18362
|
+
if not isTable(nil, a) then
|
|
18363
|
+
error((("Failed to sort an object array by the key of \"" .. key) .. "\" since the first element was not a table and was instead: ") .. type(a))
|
|
18364
|
+
end
|
|
18365
|
+
if not isTable(nil, b) then
|
|
18366
|
+
error(((("Failed to sort an object array by the key of \"" .. key) .. "\" since the second element was not a table and was instead: ") .. type(b)) .. ".")
|
|
18367
|
+
end
|
|
18368
|
+
local aValue = a[key]
|
|
18369
|
+
local bValue = b[key]
|
|
18370
|
+
return ____exports.sortNormal(nil, aValue, bValue)
|
|
18371
|
+
end
|
|
18372
|
+
end
|
|
18373
|
+
--- Helper function to sort a two-dimensional array by the first element.
|
|
18374
|
+
--
|
|
18375
|
+
-- For example:
|
|
18376
|
+
--
|
|
18377
|
+
-- ```ts
|
|
18378
|
+
-- const myArray = [[1, 2], [2, 3], [3, 4]];
|
|
18379
|
+
-- myArray.sort(sortTwoDimensionalArray);
|
|
18380
|
+
-- ```
|
|
18381
|
+
--
|
|
18382
|
+
-- This function also properly handles when the array elements are strings or numbers (instead of
|
|
18383
|
+
-- another array).
|
|
18384
|
+
--
|
|
18385
|
+
-- From:
|
|
18386
|
+
-- https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
|
|
18387
|
+
function ____exports.sortTwoDimensionalArray(self, a, b)
|
|
18388
|
+
local aType = type(a)
|
|
18389
|
+
local bType = type(b)
|
|
18390
|
+
if aType ~= bType then
|
|
18391
|
+
error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(a)) .. " & ") .. tostring(b)) .. " (") .. aType) .. " & ") .. bType) .. ")")
|
|
18392
|
+
end
|
|
18393
|
+
if aType == "string" or aType == "number" then
|
|
18394
|
+
return ____exports.sortNormal(nil, a, b)
|
|
18395
|
+
end
|
|
18396
|
+
if aType ~= "table" then
|
|
18397
|
+
error("Failed to two-dimensional sort since the first element was not a string, number, or table.")
|
|
18398
|
+
end
|
|
18399
|
+
if bType ~= "table" then
|
|
18400
|
+
error("Failed to two-dimensional sort since the second element was not a string, number, or table.")
|
|
18401
|
+
end
|
|
18402
|
+
local firstElement1 = a[1]
|
|
18403
|
+
local firstElement2 = b[1]
|
|
18404
|
+
if firstElement1 == nil or firstElement1 == nil then
|
|
18405
|
+
error("Failed to two-dimensional sort since the first element of the first array was undefined.")
|
|
18406
|
+
end
|
|
18407
|
+
if firstElement2 == nil or firstElement2 == nil then
|
|
18408
|
+
error("Failed to two-dimensional sort since the first element of the second array was undefined.")
|
|
18409
|
+
end
|
|
18410
|
+
local elementType1 = type(firstElement1)
|
|
18411
|
+
local elementType2 = type(firstElement2)
|
|
18412
|
+
if elementType1 ~= elementType2 then
|
|
18413
|
+
error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
|
|
18414
|
+
end
|
|
18415
|
+
return ____exports.sortNormal(nil, firstElement1, firstElement2)
|
|
18416
|
+
end
|
|
18417
|
+
--- Helper function to sort an array in a stable way.
|
|
18418
|
+
--
|
|
18419
|
+
-- This is useful because by default, the transpiled `Array.sort` method from TSTL is not stable.
|
|
18420
|
+
--
|
|
18421
|
+
-- Under the hood, this uses the merge sort algorithm.
|
|
18422
|
+
function ____exports.stableSort(self, array, sortFunc)
|
|
18423
|
+
if sortFunc == nil then
|
|
18424
|
+
sortFunc = ____exports.sortNormal
|
|
18425
|
+
end
|
|
18426
|
+
if #array <= 1 then
|
|
18427
|
+
return array
|
|
18428
|
+
end
|
|
18429
|
+
local middleIndex = math.floor(#array / 2)
|
|
18430
|
+
local leftArray = __TS__ArraySlice(array, 0, middleIndex)
|
|
18431
|
+
local rightArray = __TS__ArraySlice(array, middleIndex)
|
|
18432
|
+
local sortedLeftArray = ____exports.stableSort(nil, leftArray, sortFunc)
|
|
18433
|
+
local sortedRightArray = ____exports.stableSort(nil, rightArray, sortFunc)
|
|
18434
|
+
local mergedArray = {}
|
|
18435
|
+
local leftIndex = 0
|
|
18436
|
+
local rightIndex = 0
|
|
18437
|
+
while leftIndex < #sortedLeftArray and rightIndex < #sortedRightArray do
|
|
18438
|
+
local left = sortedLeftArray[leftIndex + 1]
|
|
18439
|
+
local right = sortedRightArray[rightIndex + 1]
|
|
18440
|
+
local sortResult = sortFunc(nil, left, right)
|
|
18441
|
+
if sortResult == -1 or sortResult == 0 then
|
|
18442
|
+
mergedArray[#mergedArray + 1] = left
|
|
18443
|
+
leftIndex = leftIndex + 1
|
|
18444
|
+
else
|
|
18445
|
+
mergedArray[#mergedArray + 1] = right
|
|
18446
|
+
rightIndex = rightIndex + 1
|
|
18447
|
+
end
|
|
18448
|
+
end
|
|
18449
|
+
while leftIndex < #sortedLeftArray do
|
|
18450
|
+
local left = sortedLeftArray[leftIndex + 1]
|
|
18451
|
+
mergedArray[#mergedArray + 1] = left
|
|
18452
|
+
leftIndex = leftIndex + 1
|
|
18453
|
+
end
|
|
18454
|
+
while rightIndex < #sortedRightArray do
|
|
18455
|
+
local right = sortedRightArray[rightIndex + 1]
|
|
18456
|
+
mergedArray[#mergedArray + 1] = right
|
|
18457
|
+
rightIndex = rightIndex + 1
|
|
18458
|
+
end
|
|
18459
|
+
return mergedArray
|
|
18460
|
+
end
|
|
18673
18461
|
return ____exports
|
|
18674
18462
|
end,
|
|
18675
18463
|
["functions.array"] = function(...)
|
|
@@ -19274,6 +19062,8 @@ return ____exports
|
|
|
19274
19062
|
end,
|
|
19275
19063
|
["functions.enums"] = function(...)
|
|
19276
19064
|
local ____lualib = require("lualib_bundle")
|
|
19065
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
19066
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
19277
19067
|
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
19278
19068
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
19279
19069
|
local __TS__ArrayToSorted = ____lualib.__TS__ArrayToSorted
|
|
@@ -19310,14 +19100,19 @@ local iRange = ____utils.iRange
|
|
|
19310
19100
|
-- For a more in depth explanation, see:
|
|
19311
19101
|
-- https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
19312
19102
|
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
19313
|
-
local
|
|
19314
|
-
|
|
19315
|
-
|
|
19316
|
-
|
|
19103
|
+
local entries = __TS__ObjectEntries(transpiledEnum)
|
|
19104
|
+
local numberEntries = __TS__ArrayFilter(
|
|
19105
|
+
entries,
|
|
19106
|
+
function(____, ____bindingPattern0)
|
|
19107
|
+
local value
|
|
19108
|
+
local _key = ____bindingPattern0[1]
|
|
19109
|
+
value = ____bindingPattern0[2]
|
|
19110
|
+
return type(value) == "number"
|
|
19317
19111
|
end
|
|
19318
|
-
|
|
19112
|
+
)
|
|
19113
|
+
local valuesToReturn = #numberEntries > 0 and numberEntries or entries
|
|
19319
19114
|
__TS__ArraySort(
|
|
19320
|
-
|
|
19115
|
+
valuesToReturn,
|
|
19321
19116
|
function(____, ____bindingPattern0, ____bindingPattern1)
|
|
19322
19117
|
local value1
|
|
19323
19118
|
local _key1 = ____bindingPattern0[1]
|
|
@@ -19328,7 +19123,7 @@ function ____exports.getEnumEntries(self, transpiledEnum)
|
|
|
19328
19123
|
return value1 < value2 and -1 or (value1 > value2 and 1 or 0)
|
|
19329
19124
|
end
|
|
19330
19125
|
)
|
|
19331
|
-
return
|
|
19126
|
+
return valuesToReturn
|
|
19332
19127
|
end
|
|
19333
19128
|
--- TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
|
|
19334
19129
|
-- Thus, when you iterate over them, you will get both the names of the enums and the values of the
|
|
@@ -19527,6 +19322,275 @@ end
|
|
|
19527
19322
|
-- `satisfies` operator with the `Record` type instead.
|
|
19528
19323
|
function ____exports.validateInterfaceMatchesEnum(self)
|
|
19529
19324
|
end
|
|
19325
|
+
return ____exports
|
|
19326
|
+
end,
|
|
19327
|
+
["cachedEnumValues"] = function(...)
|
|
19328
|
+
local ____exports = {}
|
|
19329
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
19330
|
+
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
19331
|
+
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
19332
|
+
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
19333
|
+
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
19334
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
19335
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
19336
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
19337
|
+
local GridEntityXMLType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityXMLType
|
|
19338
|
+
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
19339
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
19340
|
+
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
19341
|
+
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
19342
|
+
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
19343
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
19344
|
+
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
19345
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
19346
|
+
local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
|
|
19347
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
19348
|
+
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
19349
|
+
local ____HealthType = require("enums.HealthType")
|
|
19350
|
+
local HealthType = ____HealthType.HealthType
|
|
19351
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
19352
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
19353
|
+
local ____PlayerStat = require("enums.PlayerStat")
|
|
19354
|
+
local PlayerStat = ____PlayerStat.PlayerStat
|
|
19355
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
19356
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
19357
|
+
local ____enums = require("functions.enums")
|
|
19358
|
+
local getEnumValues = ____enums.getEnumValues
|
|
19359
|
+
____exports.ACTIVE_SLOT_VALUES = getEnumValues(nil, ActiveSlot)
|
|
19360
|
+
____exports.BOSS_ID_VALUES = getEnumValues(nil, BossID)
|
|
19361
|
+
____exports.CACHE_FLAG_VALUES = getEnumValues(nil, CacheFlag)
|
|
19362
|
+
____exports.CONTROLLER_INDEX_VALUES = getEnumValues(nil, ControllerIndex)
|
|
19363
|
+
____exports.DOOR_SLOT_FLAG_VALUES = getEnumValues(nil, DoorSlotFlag)
|
|
19364
|
+
____exports.DOOR_SLOT_VALUES = getEnumValues(nil, DoorSlot)
|
|
19365
|
+
____exports.GRID_ENTITY_TYPE_VALUES = getEnumValues(nil, GridEntityType)
|
|
19366
|
+
____exports.GRID_ENTITY_XML_TYPE_VALUES = getEnumValues(nil, GridEntityXMLType)
|
|
19367
|
+
____exports.MOD_CALLBACK_CUSTOM_VALUES = getEnumValues(nil, ModCallbackCustom)
|
|
19368
|
+
____exports.ITEM_CONFIG_TAG_VALUES = getEnumValues(nil, ItemConfigTag)
|
|
19369
|
+
____exports.ITEM_CONFIG_CARD_TYPE_VALUES = getEnumValues(nil, ItemConfigCardType)
|
|
19370
|
+
____exports.ITEM_POOL_TYPE_VALUES = getEnumValues(nil, ItemPoolType)
|
|
19371
|
+
____exports.KEYBOARD_VALUES = getEnumValues(nil, Keyboard)
|
|
19372
|
+
____exports.HEALTH_TYPE_VALUES = getEnumValues(nil, HealthType)
|
|
19373
|
+
____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
|
|
19374
|
+
____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
|
|
19375
|
+
____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
19376
|
+
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
19377
|
+
____exports.SEED_EFFECTS = getEnumValues(nil, SeedEffect)
|
|
19378
|
+
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
19379
|
+
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
19380
|
+
____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
|
|
19381
|
+
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
19382
|
+
return ____exports
|
|
19383
|
+
end,
|
|
19384
|
+
["enums.AmbushType"] = function(...)
|
|
19385
|
+
local ____exports = {}
|
|
19386
|
+
--- This is used by the `POST_AMBUSH_STARTED` and `POST_AMBUSH_FINISHED` custom callbacks.
|
|
19387
|
+
____exports.AmbushType = {}
|
|
19388
|
+
____exports.AmbushType.CHALLENGE_ROOM = 0
|
|
19389
|
+
____exports.AmbushType[____exports.AmbushType.CHALLENGE_ROOM] = "CHALLENGE_ROOM"
|
|
19390
|
+
____exports.AmbushType.BOSS_RUSH = 1
|
|
19391
|
+
____exports.AmbushType[____exports.AmbushType.BOSS_RUSH] = "BOSS_RUSH"
|
|
19392
|
+
return ____exports
|
|
19393
|
+
end,
|
|
19394
|
+
["enums.SlotDestructionType"] = function(...)
|
|
19395
|
+
local ____exports = {}
|
|
19396
|
+
--- This is used in the `POST_SLOT_DESTROYED` custom callback.
|
|
19397
|
+
____exports.SlotDestructionType = {}
|
|
19398
|
+
____exports.SlotDestructionType.NORMAL = 0
|
|
19399
|
+
____exports.SlotDestructionType[____exports.SlotDestructionType.NORMAL] = "NORMAL"
|
|
19400
|
+
____exports.SlotDestructionType.COLLECTIBLE_PAYOUT = 1
|
|
19401
|
+
____exports.SlotDestructionType[____exports.SlotDestructionType.COLLECTIBLE_PAYOUT] = "COLLECTIBLE_PAYOUT"
|
|
19402
|
+
return ____exports
|
|
19403
|
+
end,
|
|
19404
|
+
["types.PickingUpItem"] = function(...)
|
|
19405
|
+
local ____lualib = require("lualib_bundle")
|
|
19406
|
+
local __TS__New = ____lualib.__TS__New
|
|
19407
|
+
local ____exports = {}
|
|
19408
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
19409
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
19410
|
+
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
19411
|
+
local ____ReadonlySet = require("types.ReadonlySet")
|
|
19412
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
19413
|
+
local DEFAULT_ITEM_TYPE = ItemType.NULL
|
|
19414
|
+
local DEFAULT_SUB_TYPE = CollectibleType.NULL
|
|
19415
|
+
function ____exports.newPickingUpItem(self)
|
|
19416
|
+
return {itemType = DEFAULT_ITEM_TYPE, subType = DEFAULT_SUB_TYPE}
|
|
19417
|
+
end
|
|
19418
|
+
function ____exports.resetPickingUpItem(self, pickingUpItem)
|
|
19419
|
+
pickingUpItem.itemType = DEFAULT_ITEM_TYPE
|
|
19420
|
+
pickingUpItem.subType = DEFAULT_SUB_TYPE
|
|
19421
|
+
end
|
|
19422
|
+
local COLLECTIBLE_ITEM_TYPES = __TS__New(ReadonlySet, {ItemType.PASSIVE, ItemType.ACTIVE, ItemType.FAMILIAR})
|
|
19423
|
+
--- Helper function to narrow the type of `PickingUpItem`.
|
|
19424
|
+
function ____exports.isPickingUpItemNull(self, pickingUpItem)
|
|
19425
|
+
return pickingUpItem.itemType == ItemType.NULL
|
|
19426
|
+
end
|
|
19427
|
+
--- Helper function to narrow the type of `PickingUpItem`.
|
|
19428
|
+
function ____exports.isPickingUpItemCollectible(self, pickingUpItem)
|
|
19429
|
+
return COLLECTIBLE_ITEM_TYPES:has(pickingUpItem.itemType)
|
|
19430
|
+
end
|
|
19431
|
+
--- Helper function to narrow the type of `PickingUpItem`.
|
|
19432
|
+
function ____exports.isPickingUpItemTrinket(self, pickingUpItem)
|
|
19433
|
+
return pickingUpItem.itemType == ItemType.TRINKET
|
|
19434
|
+
end
|
|
19435
|
+
return ____exports
|
|
19436
|
+
end,
|
|
19437
|
+
["types.PossibleStatType"] = function(...)
|
|
19438
|
+
local ____exports = {}
|
|
19439
|
+
return ____exports
|
|
19440
|
+
end,
|
|
19441
|
+
["shouldFire"] = function(...)
|
|
19442
|
+
local ____exports = {}
|
|
19443
|
+
function ____exports.shouldFireAmbush(self, fireArgs, optionalArgs)
|
|
19444
|
+
local ambushType = table.unpack(fireArgs)
|
|
19445
|
+
local callbackAmbushType = table.unpack(optionalArgs)
|
|
19446
|
+
return callbackAmbushType == nil or callbackAmbushType == ambushType
|
|
19447
|
+
end
|
|
19448
|
+
function ____exports.shouldFireBomb(self, fireArgs, optionalArgs)
|
|
19449
|
+
local bomb = table.unpack(fireArgs)
|
|
19450
|
+
local callbackBombVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19451
|
+
return (callbackBombVariant == nil or callbackBombVariant == bomb.Variant) and (callbackSubType == nil or callbackSubType == bomb.SubType)
|
|
19452
|
+
end
|
|
19453
|
+
function ____exports.shouldFireBoolean(self, fireArgs, optionalArgs)
|
|
19454
|
+
local fireArg = table.unpack(fireArgs)
|
|
19455
|
+
local optionalArg = table.unpack(optionalArgs)
|
|
19456
|
+
return optionalArg == nil or optionalArg == fireArg
|
|
19457
|
+
end
|
|
19458
|
+
function ____exports.shouldFireCollectibleType(self, fireArgs, optionalArgs)
|
|
19459
|
+
local _player, collectibleType = table.unpack(fireArgs)
|
|
19460
|
+
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
19461
|
+
return callbackCollectibleType == nil or callbackCollectibleType == collectibleType
|
|
19462
|
+
end
|
|
19463
|
+
function ____exports.shouldFireDoor(self, fireArgs, optionalArgs)
|
|
19464
|
+
local door = table.unpack(fireArgs)
|
|
19465
|
+
local callbackDoorVariant = table.unpack(optionalArgs)
|
|
19466
|
+
local doorVariant = door:GetVariant()
|
|
19467
|
+
return callbackDoorVariant == nil or callbackDoorVariant == doorVariant
|
|
19468
|
+
end
|
|
19469
|
+
function ____exports.shouldFireEffect(self, fireArgs, optionalArgs)
|
|
19470
|
+
local effect = table.unpack(fireArgs)
|
|
19471
|
+
local callbackEffectVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19472
|
+
return (callbackEffectVariant == nil or callbackEffectVariant == effect.Variant) and (callbackSubType == nil or callbackSubType == effect.SubType)
|
|
19473
|
+
end
|
|
19474
|
+
function ____exports.shouldFireEntity(self, fireArgs, optionalArgs)
|
|
19475
|
+
local entity = table.unpack(fireArgs)
|
|
19476
|
+
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19477
|
+
return (callbackEntityType == nil or callbackEntityType == entity.Type) and (callbackVariant == nil or callbackVariant == entity.Variant) and (callbackSubType == nil or callbackSubType == entity.SubType)
|
|
19478
|
+
end
|
|
19479
|
+
function ____exports.shouldFireFamiliar(self, fireArgs, optionalArgs)
|
|
19480
|
+
local familiar = table.unpack(fireArgs)
|
|
19481
|
+
local callbackFamiliarVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19482
|
+
return (callbackFamiliarVariant == nil or callbackFamiliarVariant == familiar.Variant) and (callbackSubType == nil or callbackSubType == familiar.SubType)
|
|
19483
|
+
end
|
|
19484
|
+
function ____exports.shouldFireGridEntity(self, fireArgs, optionalArgs)
|
|
19485
|
+
local gridEntity = table.unpack(fireArgs)
|
|
19486
|
+
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs)
|
|
19487
|
+
local gridEntityType = gridEntity:GetType()
|
|
19488
|
+
local variant = gridEntity:GetVariant()
|
|
19489
|
+
return (callbackGridEntityType == nil or callbackGridEntityType == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
19490
|
+
end
|
|
19491
|
+
function ____exports.shouldFireGridEntityCustom(self, fireArgs, optionalArgs)
|
|
19492
|
+
local _gridEntity, gridEntityTypeCustom = table.unpack(fireArgs)
|
|
19493
|
+
local callbackGridEntityTypeCustom = table.unpack(optionalArgs)
|
|
19494
|
+
return callbackGridEntityTypeCustom == nil or callbackGridEntityTypeCustom == gridEntityTypeCustom
|
|
19495
|
+
end
|
|
19496
|
+
function ____exports.shouldFireItemPickup(self, fireArgs, optionalArgs)
|
|
19497
|
+
local _player, pickingUpItem = table.unpack(fireArgs)
|
|
19498
|
+
local callbackItemType, callbackSubtype = table.unpack(optionalArgs)
|
|
19499
|
+
return (callbackItemType == nil or callbackItemType == pickingUpItem.itemType) and (callbackSubtype == nil or callbackSubtype == pickingUpItem.subType)
|
|
19500
|
+
end
|
|
19501
|
+
function ____exports.shouldFireKnife(self, fireArgs, optionalArgs)
|
|
19502
|
+
local knife = table.unpack(fireArgs)
|
|
19503
|
+
local callbackKnifeVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19504
|
+
return (callbackKnifeVariant == nil or callbackKnifeVariant == knife.Variant) and (callbackSubType == nil or callbackSubType == knife.SubType)
|
|
19505
|
+
end
|
|
19506
|
+
function ____exports.shouldFireLaser(self, fireArgs, optionalArgs)
|
|
19507
|
+
local laser = table.unpack(fireArgs)
|
|
19508
|
+
local callbackLaserVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19509
|
+
return (callbackLaserVariant == nil or callbackLaserVariant == laser.Variant) and (callbackSubType == nil or callbackSubType == laser.SubType)
|
|
19510
|
+
end
|
|
19511
|
+
function ____exports.shouldFireLevel(self, fireArgs, optionalArgs)
|
|
19512
|
+
local stage, stageType = table.unpack(fireArgs)
|
|
19513
|
+
local callbackStage, callbackStageType = table.unpack(optionalArgs)
|
|
19514
|
+
return (callbackStage == nil or callbackStage == stage) and (callbackStageType == nil or callbackStageType == stageType)
|
|
19515
|
+
end
|
|
19516
|
+
function ____exports.shouldFireNPC(self, fireArgs, optionalArgs)
|
|
19517
|
+
local npc = table.unpack(fireArgs)
|
|
19518
|
+
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19519
|
+
return (callbackEntityType == nil or callbackEntityType == npc.Type) and (callbackVariant == nil or callbackVariant == npc.Variant) and (callbackSubType == nil or callbackSubType == npc.SubType)
|
|
19520
|
+
end
|
|
19521
|
+
function ____exports.shouldFirePickup(self, fireArgs, optionalArgs)
|
|
19522
|
+
local pickup = table.unpack(fireArgs)
|
|
19523
|
+
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs)
|
|
19524
|
+
return (callbackPickupVariant == nil or callbackPickupVariant == pickup.Variant) and (callbackPickupSubType == nil or callbackPickupSubType == pickup.SubType)
|
|
19525
|
+
end
|
|
19526
|
+
function ____exports.shouldFirePit(self, fireArgs, optionalArgs)
|
|
19527
|
+
local pit = table.unpack(fireArgs)
|
|
19528
|
+
local callbackPitVariant = table.unpack(optionalArgs)
|
|
19529
|
+
local pitVariant = pit:GetVariant()
|
|
19530
|
+
return callbackPitVariant == nil or callbackPitVariant == pitVariant
|
|
19531
|
+
end
|
|
19532
|
+
function ____exports.shouldFirePlayer(self, fireArgs, optionalArgs)
|
|
19533
|
+
local player = table.unpack(fireArgs)
|
|
19534
|
+
local callbackPlayerVariant, callbackCharacter = table.unpack(optionalArgs)
|
|
19535
|
+
local character = player:GetPlayerType()
|
|
19536
|
+
return (callbackPlayerVariant == nil or callbackPlayerVariant == player.Variant) and (callbackCharacter == nil or callbackCharacter == character)
|
|
19537
|
+
end
|
|
19538
|
+
function ____exports.shouldFirePoop(self, fireArgs, optionalArgs)
|
|
19539
|
+
local poop = table.unpack(fireArgs)
|
|
19540
|
+
local callbackPoopGridEntityVariant = table.unpack(optionalArgs)
|
|
19541
|
+
local poopGridEntityVariant = poop:GetVariant()
|
|
19542
|
+
return callbackPoopGridEntityVariant == nil or callbackPoopGridEntityVariant == poopGridEntityVariant
|
|
19543
|
+
end
|
|
19544
|
+
function ____exports.shouldFirePressurePlate(self, fireArgs, optionalArgs)
|
|
19545
|
+
local pressurePlate = table.unpack(fireArgs)
|
|
19546
|
+
local callbackPressurePlateVariant = table.unpack(optionalArgs)
|
|
19547
|
+
local pressurePlateVariant = pressurePlate:GetVariant()
|
|
19548
|
+
return callbackPressurePlateVariant == nil or callbackPressurePlateVariant == pressurePlateVariant
|
|
19549
|
+
end
|
|
19550
|
+
function ____exports.shouldFireProjectile(self, fireArgs, optionalArgs)
|
|
19551
|
+
local projectile = table.unpack(fireArgs)
|
|
19552
|
+
local callbackProjectileVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19553
|
+
return (callbackProjectileVariant == nil or callbackProjectileVariant == projectile.Variant) and (callbackSubType == nil or callbackSubType == projectile.SubType)
|
|
19554
|
+
end
|
|
19555
|
+
function ____exports.shouldFireRock(self, fireArgs, optionalArgs)
|
|
19556
|
+
local rock = table.unpack(fireArgs)
|
|
19557
|
+
local callbackGridEntity, callbackVariant = table.unpack(optionalArgs)
|
|
19558
|
+
local gridEntityType = rock:GetType()
|
|
19559
|
+
local variant = rock:GetVariant()
|
|
19560
|
+
return (callbackGridEntity == nil or callbackGridEntity == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
19561
|
+
end
|
|
19562
|
+
function ____exports.shouldFireRoom(self, fireArgs, optionalArgs)
|
|
19563
|
+
local roomType = table.unpack(fireArgs)
|
|
19564
|
+
local callbackRoomType = table.unpack(optionalArgs)
|
|
19565
|
+
return callbackRoomType == nil or callbackRoomType == roomType
|
|
19566
|
+
end
|
|
19567
|
+
function ____exports.shouldFireSlot(self, fireArgs, optionalArgs)
|
|
19568
|
+
local slot = table.unpack(fireArgs)
|
|
19569
|
+
local callbackSlotVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19570
|
+
return (callbackSlotVariant == nil or callbackSlotVariant == slot.Variant) and (callbackSubType == nil or callbackSubType == slot.SubType)
|
|
19571
|
+
end
|
|
19572
|
+
function ____exports.shouldFireSpikes(self, fireArgs, optionalArgs)
|
|
19573
|
+
local spikes = table.unpack(fireArgs)
|
|
19574
|
+
local callbackVariant = table.unpack(optionalArgs)
|
|
19575
|
+
local variant = spikes:GetVariant()
|
|
19576
|
+
return callbackVariant == nil or callbackVariant == variant
|
|
19577
|
+
end
|
|
19578
|
+
function ____exports.shouldFireTNT(self, fireArgs, optionalArgs)
|
|
19579
|
+
local tnt = table.unpack(fireArgs)
|
|
19580
|
+
local callbackVariant = table.unpack(optionalArgs)
|
|
19581
|
+
local variant = tnt:GetVariant()
|
|
19582
|
+
return callbackVariant == nil or callbackVariant == variant
|
|
19583
|
+
end
|
|
19584
|
+
function ____exports.shouldFireTear(self, fireArgs, optionalArgs)
|
|
19585
|
+
local tear = table.unpack(fireArgs)
|
|
19586
|
+
local callbackTearVariant, callbackSubType = table.unpack(optionalArgs)
|
|
19587
|
+
return (callbackTearVariant == nil or callbackTearVariant == tear.Variant) and (callbackSubType == nil or callbackSubType == tear.SubType)
|
|
19588
|
+
end
|
|
19589
|
+
function ____exports.shouldFireTrinketType(self, fireArgs, optionalArgs)
|
|
19590
|
+
local _player, trinketType = table.unpack(fireArgs)
|
|
19591
|
+
local callbackTrinketType = table.unpack(optionalArgs)
|
|
19592
|
+
return callbackTrinketType == nil or callbackTrinketType == trinketType
|
|
19593
|
+
end
|
|
19530
19594
|
return ____exports
|
|
19531
19595
|
end,
|
|
19532
19596
|
["interfaces.PlayerStats"] = function(...)
|
|
@@ -23155,63 +23219,6 @@ function PostDiceRoomActivated.prototype.____constructor(self)
|
|
|
23155
23219
|
end
|
|
23156
23220
|
self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, self.postEffectUpdateDiceFloor, {EffectVariant.DICE_FLOOR}}}
|
|
23157
23221
|
end
|
|
23158
|
-
return ____exports
|
|
23159
|
-
end,
|
|
23160
|
-
["arrays.cachedEnumValues"] = function(...)
|
|
23161
|
-
local ____exports = {}
|
|
23162
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
23163
|
-
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
23164
|
-
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
23165
|
-
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
23166
|
-
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
23167
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
23168
|
-
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
23169
|
-
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
23170
|
-
local GridEntityXMLType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityXMLType
|
|
23171
|
-
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
23172
|
-
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
23173
|
-
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
23174
|
-
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
23175
|
-
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
23176
|
-
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
23177
|
-
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
23178
|
-
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
23179
|
-
local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
|
|
23180
|
-
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
23181
|
-
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
23182
|
-
local ____HealthType = require("enums.HealthType")
|
|
23183
|
-
local HealthType = ____HealthType.HealthType
|
|
23184
|
-
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
23185
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
23186
|
-
local ____PlayerStat = require("enums.PlayerStat")
|
|
23187
|
-
local PlayerStat = ____PlayerStat.PlayerStat
|
|
23188
|
-
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
23189
|
-
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
23190
|
-
local ____enums = require("functions.enums")
|
|
23191
|
-
local getEnumValues = ____enums.getEnumValues
|
|
23192
|
-
____exports.ACTIVE_SLOT_VALUES = getEnumValues(nil, ActiveSlot)
|
|
23193
|
-
____exports.BOSS_ID_VALUES = getEnumValues(nil, BossID)
|
|
23194
|
-
____exports.CACHE_FLAG_VALUES = getEnumValues(nil, CacheFlag)
|
|
23195
|
-
____exports.CONTROLLER_INDEX_VALUES = getEnumValues(nil, ControllerIndex)
|
|
23196
|
-
____exports.DOOR_SLOT_FLAG_VALUES = getEnumValues(nil, DoorSlotFlag)
|
|
23197
|
-
____exports.DOOR_SLOT_VALUES = getEnumValues(nil, DoorSlot)
|
|
23198
|
-
____exports.GRID_ENTITY_TYPE_VALUES = getEnumValues(nil, GridEntityType)
|
|
23199
|
-
____exports.GRID_ENTITY_XML_TYPE_VALUES = getEnumValues(nil, GridEntityXMLType)
|
|
23200
|
-
____exports.MOD_CALLBACK_CUSTOM_VALUES = getEnumValues(nil, ModCallbackCustom)
|
|
23201
|
-
____exports.ITEM_CONFIG_TAG_VALUES = getEnumValues(nil, ItemConfigTag)
|
|
23202
|
-
____exports.ITEM_CONFIG_CARD_TYPE_VALUES = getEnumValues(nil, ItemConfigCardType)
|
|
23203
|
-
____exports.ITEM_POOL_TYPE_VALUES = getEnumValues(nil, ItemPoolType)
|
|
23204
|
-
____exports.KEYBOARD_VALUES = getEnumValues(nil, Keyboard)
|
|
23205
|
-
____exports.HEALTH_TYPE_VALUES = getEnumValues(nil, HealthType)
|
|
23206
|
-
____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
|
|
23207
|
-
____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
|
|
23208
|
-
____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
23209
|
-
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
23210
|
-
____exports.SEED_EFFECTS = getEnumValues(nil, SeedEffect)
|
|
23211
|
-
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
23212
|
-
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
23213
|
-
____exports.PLAYER_STAT_VALUES = getEnumValues(nil, PlayerStat)
|
|
23214
|
-
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
23215
23222
|
return ____exports
|
|
23216
23223
|
end,
|
|
23217
23224
|
["objects.doorSlotFlagToDoorSlot"] = function(...)
|
|
@@ -23608,7 +23615,7 @@ local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
|
23608
23615
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
23609
23616
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
23610
23617
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
23611
|
-
local ____cachedEnumValues = require("
|
|
23618
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
23612
23619
|
local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
|
|
23613
23620
|
local DOOR_SLOT_VALUES = ____cachedEnumValues.DOOR_SLOT_VALUES
|
|
23614
23621
|
local ____cachedClasses = require("core.cachedClasses")
|
|
@@ -28031,7 +28038,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
28031
28038
|
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
28032
28039
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
28033
28040
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
28034
|
-
local ____cachedEnumValues = require("
|
|
28041
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
28035
28042
|
local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
|
|
28036
28043
|
local ____cachedClasses = require("core.cachedClasses")
|
|
28037
28044
|
local game = ____cachedClasses.game
|
|
@@ -29372,7 +29379,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
29372
29379
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
29373
29380
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
29374
29381
|
local SuckerVariant = ____isaac_2Dtypescript_2Ddefinitions.SuckerVariant
|
|
29375
|
-
local ____cachedEnumValues = require("
|
|
29382
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
29376
29383
|
local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
|
|
29377
29384
|
local ____cachedClasses = require("core.cachedClasses")
|
|
29378
29385
|
local game = ____cachedClasses.game
|
|
@@ -29583,7 +29590,7 @@ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
|
29583
29590
|
local Controller = ____isaac_2Dtypescript_2Ddefinitions.Controller
|
|
29584
29591
|
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
29585
29592
|
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
29586
|
-
local ____cachedEnumValues = require("
|
|
29593
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
29587
29594
|
local CONTROLLER_INDEX_VALUES = ____cachedEnumValues.CONTROLLER_INDEX_VALUES
|
|
29588
29595
|
local ____keyboardToStringMap = require("maps.keyboardToStringMap")
|
|
29589
29596
|
local KEYBOARD_TO_STRING_MAP = ____keyboardToStringMap.KEYBOARD_TO_STRING_MAP
|
|
@@ -29794,7 +29801,7 @@ local __TS__Iterator = ____lualib.__TS__Iterator
|
|
|
29794
29801
|
local ____exports = {}
|
|
29795
29802
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
29796
29803
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
29797
|
-
local ____cachedEnumValues = require("
|
|
29804
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
29798
29805
|
local KEYBOARD_VALUES = ____cachedEnumValues.KEYBOARD_VALUES
|
|
29799
29806
|
local ____input = require("functions.input")
|
|
29800
29807
|
local isKeyboardPressed = ____input.isKeyboardPressed
|
|
@@ -31348,7 +31355,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
31348
31355
|
local Set = ____lualib.Set
|
|
31349
31356
|
local __TS__New = ____lualib.__TS__New
|
|
31350
31357
|
local ____exports = {}
|
|
31351
|
-
local ____cachedEnumValues = require("
|
|
31358
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
31352
31359
|
local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
|
|
31353
31360
|
local ____cachedClasses = require("core.cachedClasses")
|
|
31354
31361
|
local game = ____cachedClasses.game
|
|
@@ -33204,7 +33211,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
33204
33211
|
local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
|
|
33205
33212
|
local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
|
|
33206
33213
|
local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
|
|
33207
|
-
local ____cachedEnumValues = require("
|
|
33214
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
33208
33215
|
local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
|
|
33209
33216
|
local ____cachedClasses = require("core.cachedClasses")
|
|
33210
33217
|
local game = ____cachedClasses.game
|
|
@@ -35691,7 +35698,7 @@ local __TS__New = ____lualib.__TS__New
|
|
|
35691
35698
|
local __TS__Class = ____lualib.__TS__Class
|
|
35692
35699
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
35693
35700
|
local ____exports = {}
|
|
35694
|
-
local ____cachedEnumValues = require("
|
|
35701
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
35695
35702
|
local HEALTH_TYPE_VALUES = ____cachedEnumValues.HEALTH_TYPE_VALUES
|
|
35696
35703
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
35697
35704
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
@@ -35997,7 +36004,7 @@ local __TS__Class = ____lualib.__TS__Class
|
|
|
35997
36004
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
35998
36005
|
local ____exports = {}
|
|
35999
36006
|
local statEquals
|
|
36000
|
-
local ____cachedEnumValues = require("
|
|
36007
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
36001
36008
|
local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
|
|
36002
36009
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
36003
36010
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
@@ -38218,7 +38225,7 @@ local __TS__New = ____lualib.__TS__New
|
|
|
38218
38225
|
local __TS__Class = ____lualib.__TS__Class
|
|
38219
38226
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
38220
38227
|
local ____exports = {}
|
|
38221
|
-
local ____cachedEnumValues = require("
|
|
38228
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
38222
38229
|
local PLAYER_FORM_VALUES = ____cachedEnumValues.PLAYER_FORM_VALUES
|
|
38223
38230
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
38224
38231
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
@@ -38637,7 +38644,7 @@ local ____exports = {}
|
|
|
38637
38644
|
local HORSE_PILL_COLOR_ADJUSTMENT
|
|
38638
38645
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
38639
38646
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
38640
|
-
local ____cachedEnumValues = require("
|
|
38647
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
38641
38648
|
local PILL_COLOR_VALUES = ____cachedEnumValues.PILL_COLOR_VALUES
|
|
38642
38649
|
local ____cachedClasses = require("core.cachedClasses")
|
|
38643
38650
|
local game = ____cachedClasses.game
|
|
@@ -38814,7 +38821,7 @@ local CardType = ____isaac_2Dtypescript_2Ddefinitions.CardType
|
|
|
38814
38821
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
38815
38822
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
38816
38823
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
38817
|
-
local ____cachedEnumValues = require("
|
|
38824
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
38818
38825
|
local POCKET_ITEM_SLOT_VALUES = ____cachedEnumValues.POCKET_ITEM_SLOT_VALUES
|
|
38819
38826
|
local ____PocketItemType = require("enums.PocketItemType")
|
|
38820
38827
|
local PocketItemType = ____PocketItemType.PocketItemType
|
|
@@ -40139,7 +40146,7 @@ return ____exports
|
|
|
40139
40146
|
local ____lualib = require("lualib_bundle")
|
|
40140
40147
|
local __TS__New = ____lualib.__TS__New
|
|
40141
40148
|
local ____exports = {}
|
|
40142
|
-
local ____cachedEnumValues = require("
|
|
40149
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
40143
40150
|
local MOD_CALLBACK_CUSTOM_VALUES = ____cachedEnumValues.MOD_CALLBACK_CUSTOM_VALUES
|
|
40144
40151
|
local cc = require("callbackClasses")
|
|
40145
40152
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
@@ -40299,6 +40306,8 @@ return ____exports
|
|
|
40299
40306
|
end,
|
|
40300
40307
|
["decorators"] = function(...)
|
|
40301
40308
|
local ____exports = {}
|
|
40309
|
+
local ____tstlClass = require("functions.tstlClass")
|
|
40310
|
+
local getTSTLClassName = ____tstlClass.getTSTLClassName
|
|
40302
40311
|
____exports.EXPORTED_METHOD_NAMES_KEY = "__exportedMethodNames"
|
|
40303
40312
|
--- A decorator function that signifies that the decorated class method should be added to the
|
|
40304
40313
|
-- `ModUpgraded` object.
|
|
@@ -40306,10 +40315,15 @@ ____exports.EXPORTED_METHOD_NAMES_KEY = "__exportedMethodNames"
|
|
|
40306
40315
|
-- This is only meant to be used internally.
|
|
40307
40316
|
function ____exports.Exported(self, target, propertyKey)
|
|
40308
40317
|
local constructor = target.constructor
|
|
40309
|
-
if
|
|
40310
|
-
|
|
40318
|
+
if constructor == nil then
|
|
40319
|
+
local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
|
|
40320
|
+
error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods.")
|
|
40311
40321
|
end
|
|
40312
40322
|
local exportedMethodNames = constructor[____exports.EXPORTED_METHOD_NAMES_KEY]
|
|
40323
|
+
if exportedMethodNames == nil then
|
|
40324
|
+
exportedMethodNames = {}
|
|
40325
|
+
constructor[____exports.EXPORTED_METHOD_NAMES_KEY] = exportedMethodNames
|
|
40326
|
+
end
|
|
40313
40327
|
exportedMethodNames[#exportedMethodNames + 1] = propertyKey
|
|
40314
40328
|
end
|
|
40315
40329
|
return ____exports
|
|
@@ -40329,7 +40343,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
40329
40343
|
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
40330
40344
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
40331
40345
|
local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
|
|
40332
|
-
local ____cachedEnumValues = require("
|
|
40346
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
40333
40347
|
local SEED_EFFECTS = ____cachedEnumValues.SEED_EFFECTS
|
|
40334
40348
|
local ____cachedClasses = require("core.cachedClasses")
|
|
40335
40349
|
local game = ____cachedClasses.game
|
|
@@ -41750,7 +41764,7 @@ return ____exports
|
|
|
41750
41764
|
local ____lualib = require("lualib_bundle")
|
|
41751
41765
|
local __TS__New = ____lualib.__TS__New
|
|
41752
41766
|
local ____exports = {}
|
|
41753
|
-
local ____cachedEnumValues = require("
|
|
41767
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
41754
41768
|
local SERIALIZATION_BRAND_VALUES = ____cachedEnumValues.SERIALIZATION_BRAND_VALUES
|
|
41755
41769
|
local ____types = require("functions.types")
|
|
41756
41770
|
local isString = ____types.isString
|
|
@@ -44161,7 +44175,7 @@ local ____exports = {}
|
|
|
44161
44175
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
44162
44176
|
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
44163
44177
|
local UseFlag = ____isaac_2Dtypescript_2Ddefinitions.UseFlag
|
|
44164
|
-
local ____cachedEnumValues = require("
|
|
44178
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
44165
44179
|
local POCKET_ITEM_SLOT_VALUES = ____cachedEnumValues.POCKET_ITEM_SLOT_VALUES
|
|
44166
44180
|
local ____cachedClasses = require("core.cachedClasses")
|
|
44167
44181
|
local itemConfig = ____cachedClasses.itemConfig
|
|
@@ -44703,7 +44717,7 @@ local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardTy
|
|
|
44703
44717
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
44704
44718
|
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
44705
44719
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
44706
|
-
local ____cachedEnumValues = require("
|
|
44720
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
44707
44721
|
local CACHE_FLAG_VALUES = ____cachedEnumValues.CACHE_FLAG_VALUES
|
|
44708
44722
|
local ITEM_CONFIG_CARD_TYPE_VALUES = ____cachedEnumValues.ITEM_CONFIG_CARD_TYPE_VALUES
|
|
44709
44723
|
local ITEM_CONFIG_TAG_VALUES = ____cachedEnumValues.ITEM_CONFIG_TAG_VALUES
|
|
@@ -45384,7 +45398,7 @@ local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
|
45384
45398
|
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
45385
45399
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
45386
45400
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
45387
|
-
local ____cachedEnumValues = require("
|
|
45401
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
45388
45402
|
local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
|
|
45389
45403
|
local ____ISCFeature = require("enums.ISCFeature")
|
|
45390
45404
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
@@ -47553,7 +47567,7 @@ return ____exports
|
|
|
47553
47567
|
end,
|
|
47554
47568
|
["functions.sound"] = function(...)
|
|
47555
47569
|
local ____exports = {}
|
|
47556
|
-
local ____cachedEnumValues = require("
|
|
47570
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
47557
47571
|
local SOUND_EFFECT_VALUES = ____cachedEnumValues.SOUND_EFFECT_VALUES
|
|
47558
47572
|
local ____cachedClasses = require("core.cachedClasses")
|
|
47559
47573
|
local game = ____cachedClasses.game
|
|
@@ -50101,7 +50115,7 @@ local ____exports = {}
|
|
|
50101
50115
|
local checkEndTopStreakText, trackMapInputPressed, checkStartBottomStreakText, checkEndBottomStreakText, renderStreakText, UI_STREAK_ANIMATION_END_FRAMES, TEXT_STAY_FRAME, TEXT_OUT_FRAME, STREAK_TEXT_BOTTOM_Y_OFFSET, NUM_RENDER_FRAMES_MAP_HELD_BEFORE_STREAK_TEXT, TEXT_IN_ADJUSTMENTS, TEXT_OUT_ADJUSTMENTS, TEXT_IN_SCALES, TEXT_OUT_SCALES
|
|
50102
50116
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
50103
50117
|
local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
50104
|
-
local ____cachedEnumValues = require("
|
|
50118
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
50105
50119
|
local CONTROLLER_INDEX_VALUES = ____cachedEnumValues.CONTROLLER_INDEX_VALUES
|
|
50106
50120
|
local ____cachedClasses = require("core.cachedClasses")
|
|
50107
50121
|
local fonts = ____cachedClasses.fonts
|
|
@@ -50749,7 +50763,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
50749
50763
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
50750
50764
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
50751
50765
|
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
50752
|
-
local ____cachedEnumValues = require("
|
|
50766
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
50753
50767
|
local BOSS_ID_VALUES = ____cachedEnumValues.BOSS_ID_VALUES
|
|
50754
50768
|
local ____storyBosses = require("functions.storyBosses")
|
|
50755
50769
|
local isStoryBossID = ____storyBosses.isStoryBossID
|
|
@@ -53786,7 +53800,7 @@ local getVanillaWallGridIndexSetForRectangleRoomShape
|
|
|
53786
53800
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
53787
53801
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
53788
53802
|
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
53789
|
-
local ____cachedEnumValues = require("
|
|
53803
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
53790
53804
|
local ROOM_SHAPE_VALUES = ____cachedEnumValues.ROOM_SHAPE_VALUES
|
|
53791
53805
|
local ____cachedClasses = require("core.cachedClasses")
|
|
53792
53806
|
local game = ____cachedClasses.game
|
|
@@ -54782,7 +54796,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
54782
54796
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
54783
54797
|
local PitfallVariant = ____isaac_2Dtypescript_2Ddefinitions.PitfallVariant
|
|
54784
54798
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
54785
|
-
local ____cachedEnumValues = require("
|
|
54799
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
54786
54800
|
local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
|
|
54787
54801
|
local ____cachedClasses = require("core.cachedClasses")
|
|
54788
54802
|
local game = ____cachedClasses.game
|
|
@@ -58228,7 +58242,7 @@ local __TS__New = ____lualib.__TS__New
|
|
|
58228
58242
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
58229
58243
|
local ____exports = {}
|
|
58230
58244
|
local getItemPoolJSON
|
|
58231
|
-
local ____cachedEnumValues = require("
|
|
58245
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
58232
58246
|
local ITEM_POOL_TYPE_VALUES = ____cachedEnumValues.ITEM_POOL_TYPE_VALUES
|
|
58233
58247
|
local itemPoolsJSON = require("data.itempools")
|
|
58234
58248
|
local ____types = require("functions.types")
|
|
@@ -58275,7 +58289,7 @@ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
|
|
|
58275
58289
|
local ____exports = {}
|
|
58276
58290
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
58277
58291
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
58278
|
-
local ____cachedEnumValues = require("
|
|
58292
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
58279
58293
|
local ITEM_POOL_TYPE_VALUES = ____cachedEnumValues.ITEM_POOL_TYPE_VALUES
|
|
58280
58294
|
local ____cachedClasses = require("core.cachedClasses")
|
|
58281
58295
|
local game = ____cachedClasses.game
|
|
@@ -60278,7 +60292,7 @@ local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
|
60278
60292
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
60279
60293
|
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
60280
60294
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
60281
|
-
local ____cachedEnumValues = require("
|
|
60295
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
60282
60296
|
local GRID_ENTITY_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_TYPE_VALUES
|
|
60283
60297
|
local ____cachedClasses = require("core.cachedClasses")
|
|
60284
60298
|
local game = ____cachedClasses.game
|
|
@@ -64959,10 +64973,12 @@ function ____exports.PriorityCallback(self, modCallback, priority, ...)
|
|
|
64959
64973
|
local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
|
|
64960
64974
|
error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods, because the \"Mod\" object is not present before the class is instantiated.")
|
|
64961
64975
|
end
|
|
64962
|
-
|
|
64963
|
-
|
|
64976
|
+
local key = MOD_FEATURE_CALLBACKS_KEY
|
|
64977
|
+
local callbackTuples = constructor[key]
|
|
64978
|
+
if callbackTuples == nil then
|
|
64979
|
+
callbackTuples = {}
|
|
64980
|
+
constructor[key] = callbackTuples
|
|
64964
64981
|
end
|
|
64965
|
-
local callbackTuples = constructor[MOD_FEATURE_CALLBACKS_KEY]
|
|
64966
64982
|
callbackTuples[#callbackTuples + 1] = callbackTuple
|
|
64967
64983
|
end
|
|
64968
64984
|
end
|
|
@@ -64982,10 +64998,12 @@ function ____exports.PriorityCallbackCustom(self, modCallbackCustom, priority, .
|
|
|
64982
64998
|
local tstlClassName = getTSTLClassName(nil, target) or "Unknown"
|
|
64983
64999
|
error(("Failed to get the constructor for class \"" .. tstlClassName) .. "\". Did you decorate a static method? You can only decorate non-static class methods, because the \"Mod\" object is not present before the class is instantiated.")
|
|
64984
65000
|
end
|
|
64985
|
-
|
|
64986
|
-
|
|
65001
|
+
local key = MOD_FEATURE_CUSTOM_CALLBACKS_KEY
|
|
65002
|
+
local callbackTuples = constructor[key]
|
|
65003
|
+
if callbackTuples == nil then
|
|
65004
|
+
callbackTuples = {}
|
|
65005
|
+
constructor[key] = callbackTuples
|
|
64987
65006
|
end
|
|
64988
|
-
local callbackTuples = constructor[MOD_FEATURE_CUSTOM_CALLBACKS_KEY]
|
|
64989
65007
|
callbackTuples[#callbackTuples + 1] = callbackTuple
|
|
64990
65008
|
end
|
|
64991
65009
|
end
|
|
@@ -65659,7 +65677,7 @@ local ____exports = {}
|
|
|
65659
65677
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
65660
65678
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
65661
65679
|
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
65662
|
-
local ____cachedEnumValues = require("
|
|
65680
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
65663
65681
|
local DOOR_SLOT_VALUES = ____cachedEnumValues.DOOR_SLOT_VALUES
|
|
65664
65682
|
local ____cachedClasses = require("core.cachedClasses")
|
|
65665
65683
|
local game = ____cachedClasses.game
|
|
@@ -66132,7 +66150,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
66132
66150
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
66133
66151
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
66134
66152
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
66135
|
-
local ____cachedEnumValues = require("
|
|
66153
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
66136
66154
|
local TRINKET_SLOT_VALUES = ____cachedEnumValues.TRINKET_SLOT_VALUES
|
|
66137
66155
|
local ____cachedClasses = require("core.cachedClasses")
|
|
66138
66156
|
local itemConfig = ____cachedClasses.itemConfig
|
|
@@ -66368,7 +66386,7 @@ local ____exports = {}
|
|
|
66368
66386
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
66369
66387
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
66370
66388
|
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
66371
|
-
local ____cachedEnumValues = require("
|
|
66389
|
+
local ____cachedEnumValues = require("cachedEnumValues")
|
|
66372
66390
|
local PLAYER_FORM_VALUES = ____cachedEnumValues.PLAYER_FORM_VALUES
|
|
66373
66391
|
local ____transformationNames = require("objects.transformationNames")
|
|
66374
66392
|
local TRANSFORMATION_NAMES = ____transformationNames.TRANSFORMATION_NAMES
|