isaacscript-common 29.4.0 → 29.5.1
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/index.rollup.d.ts +57 -117
- package/dist/isaacscript-common.lua +1555 -1581
- package/dist/src/callbackClasses.d.ts +1 -1
- package/dist/src/callbackClasses.d.ts.map +1 -1
- package/dist/src/callbackClasses.lua +5 -5
- package/dist/src/callbacks.d.ts +21 -21
- package/dist/src/callbacks.lua +1 -1
- package/dist/src/classes/callbacks/PostGameEndFilter.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGameEndFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGameEndFilter.lua +23 -0
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts +4 -0
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts +6 -2
- package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventCollectibleRotation.lua +39 -28
- package/dist/src/enums/ModCallbackCustom.d.ts +33 -38
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +22 -22
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +2 -2
- package/dist/src/functions/collectibles.d.ts +0 -52
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +0 -68
- package/dist/src/functions/playerIndex.d.ts +3 -3
- package/dist/src/functions/playerIndex.lua +3 -3
- package/dist/src/functions/rooms.d.ts +7 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +5 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +4 -4
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/src/shouldFire.d.ts +0 -1
- package/dist/src/shouldFire.d.ts.map +1 -1
- package/dist/src/shouldFire.lua +0 -5
- package/package.json +2 -2
- package/src/callbackClasses.ts +1 -1
- package/src/callbacks.ts +1 -1
- package/src/classes/callbacks/PostGameEndFilter.ts +22 -0
- package/src/classes/features/other/PickupIndexCreation.ts +4 -0
- package/src/classes/features/other/PreventCollectibleRotation.ts +58 -50
- package/src/enums/ModCallbackCustom.ts +14 -19
- package/src/features.ts +7 -5
- package/src/functions/collectibles.ts +0 -79
- package/src/functions/playerIndex.ts +3 -3
- package/src/functions/rooms.ts +7 -0
- package/src/index.ts +0 -1
- package/src/interfaces/private/AddCallbackParametersCustom.ts +5 -5
- package/src/shouldFire.ts +0 -13
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +0 -15
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +0 -1
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +0 -36
- package/dist/src/types/CollectibleIndex.d.ts +0 -18
- package/dist/src/types/CollectibleIndex.d.ts.map +0 -1
- package/dist/src/types/CollectibleIndex.lua +0 -2
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +0 -44
- package/src/types/CollectibleIndex.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 29.
|
|
3
|
+
isaacscript-common 29.5.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -2542,48 +2542,48 @@ ____exports.ModCallbackCustom.POST_BONE_SWING = 11
|
|
|
2542
2542
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_BONE_SWING] = "POST_BONE_SWING"
|
|
2543
2543
|
____exports.ModCallbackCustom.POST_COLLECTIBLE_EMPTY = 12
|
|
2544
2544
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_COLLECTIBLE_EMPTY] = "POST_COLLECTIBLE_EMPTY"
|
|
2545
|
-
____exports.ModCallbackCustom.
|
|
2546
|
-
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_COLLECTIBLE_INIT_FIRST] = "POST_COLLECTIBLE_INIT_FIRST"
|
|
2547
|
-
____exports.ModCallbackCustom.POST_CURSED_TELEPORT = 14
|
|
2545
|
+
____exports.ModCallbackCustom.POST_CURSED_TELEPORT = 13
|
|
2548
2546
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_CURSED_TELEPORT] = "POST_CURSED_TELEPORT"
|
|
2549
|
-
____exports.ModCallbackCustom.POST_CUSTOM_REVIVE =
|
|
2547
|
+
____exports.ModCallbackCustom.POST_CUSTOM_REVIVE = 14
|
|
2550
2548
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_CUSTOM_REVIVE] = "POST_CUSTOM_REVIVE"
|
|
2551
|
-
____exports.ModCallbackCustom.POST_DICE_ROOM_ACTIVATED =
|
|
2549
|
+
____exports.ModCallbackCustom.POST_DICE_ROOM_ACTIVATED = 15
|
|
2552
2550
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_DICE_ROOM_ACTIVATED] = "POST_DICE_ROOM_ACTIVATED"
|
|
2553
|
-
____exports.ModCallbackCustom.POST_DOOR_RENDER =
|
|
2551
|
+
____exports.ModCallbackCustom.POST_DOOR_RENDER = 16
|
|
2554
2552
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_DOOR_RENDER] = "POST_DOOR_RENDER"
|
|
2555
|
-
____exports.ModCallbackCustom.POST_DOOR_UPDATE =
|
|
2553
|
+
____exports.ModCallbackCustom.POST_DOOR_UPDATE = 17
|
|
2556
2554
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_DOOR_UPDATE] = "POST_DOOR_UPDATE"
|
|
2557
|
-
____exports.ModCallbackCustom.POST_EFFECT_INIT_FILTER =
|
|
2555
|
+
____exports.ModCallbackCustom.POST_EFFECT_INIT_FILTER = 18
|
|
2558
2556
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_EFFECT_INIT_FILTER] = "POST_EFFECT_INIT_FILTER"
|
|
2559
|
-
____exports.ModCallbackCustom.POST_EFFECT_INIT_LATE =
|
|
2557
|
+
____exports.ModCallbackCustom.POST_EFFECT_INIT_LATE = 19
|
|
2560
2558
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_EFFECT_INIT_LATE] = "POST_EFFECT_INIT_LATE"
|
|
2561
|
-
____exports.ModCallbackCustom.POST_EFFECT_RENDER_FILTER =
|
|
2559
|
+
____exports.ModCallbackCustom.POST_EFFECT_RENDER_FILTER = 20
|
|
2562
2560
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_EFFECT_RENDER_FILTER] = "POST_EFFECT_RENDER_FILTER"
|
|
2563
|
-
____exports.ModCallbackCustom.POST_EFFECT_STATE_CHANGED =
|
|
2561
|
+
____exports.ModCallbackCustom.POST_EFFECT_STATE_CHANGED = 21
|
|
2564
2562
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_EFFECT_STATE_CHANGED] = "POST_EFFECT_STATE_CHANGED"
|
|
2565
|
-
____exports.ModCallbackCustom.POST_EFFECT_UPDATE_FILTER =
|
|
2563
|
+
____exports.ModCallbackCustom.POST_EFFECT_UPDATE_FILTER = 22
|
|
2566
2564
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_EFFECT_UPDATE_FILTER] = "POST_EFFECT_UPDATE_FILTER"
|
|
2567
|
-
____exports.ModCallbackCustom.POST_ENTITY_KILL_FILTER =
|
|
2565
|
+
____exports.ModCallbackCustom.POST_ENTITY_KILL_FILTER = 23
|
|
2568
2566
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_ENTITY_KILL_FILTER] = "POST_ENTITY_KILL_FILTER"
|
|
2569
|
-
____exports.ModCallbackCustom.POST_ESAU_JR =
|
|
2567
|
+
____exports.ModCallbackCustom.POST_ESAU_JR = 24
|
|
2570
2568
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_ESAU_JR] = "POST_ESAU_JR"
|
|
2571
|
-
____exports.ModCallbackCustom.POST_FAMILIAR_INIT_FILTER =
|
|
2569
|
+
____exports.ModCallbackCustom.POST_FAMILIAR_INIT_FILTER = 25
|
|
2572
2570
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FAMILIAR_INIT_FILTER] = "POST_FAMILIAR_INIT_FILTER"
|
|
2573
|
-
____exports.ModCallbackCustom.POST_FAMILIAR_INIT_LATE =
|
|
2571
|
+
____exports.ModCallbackCustom.POST_FAMILIAR_INIT_LATE = 26
|
|
2574
2572
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FAMILIAR_INIT_LATE] = "POST_FAMILIAR_INIT_LATE"
|
|
2575
|
-
____exports.ModCallbackCustom.POST_FAMILIAR_RENDER_FILTER =
|
|
2573
|
+
____exports.ModCallbackCustom.POST_FAMILIAR_RENDER_FILTER = 27
|
|
2576
2574
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FAMILIAR_RENDER_FILTER] = "POST_FAMILIAR_RENDER_FILTER"
|
|
2577
|
-
____exports.ModCallbackCustom.POST_FAMILIAR_STATE_CHANGED =
|
|
2575
|
+
____exports.ModCallbackCustom.POST_FAMILIAR_STATE_CHANGED = 28
|
|
2578
2576
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FAMILIAR_STATE_CHANGED] = "POST_FAMILIAR_STATE_CHANGED"
|
|
2579
|
-
____exports.ModCallbackCustom.POST_FAMILIAR_UPDATE_FILTER =
|
|
2577
|
+
____exports.ModCallbackCustom.POST_FAMILIAR_UPDATE_FILTER = 29
|
|
2580
2578
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FAMILIAR_UPDATE_FILTER] = "POST_FAMILIAR_UPDATE_FILTER"
|
|
2581
|
-
____exports.ModCallbackCustom.POST_FIRST_ESAU_JR =
|
|
2579
|
+
____exports.ModCallbackCustom.POST_FIRST_ESAU_JR = 30
|
|
2582
2580
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FIRST_ESAU_JR] = "POST_FIRST_ESAU_JR"
|
|
2583
|
-
____exports.ModCallbackCustom.POST_FIRST_FLIP =
|
|
2581
|
+
____exports.ModCallbackCustom.POST_FIRST_FLIP = 31
|
|
2584
2582
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FIRST_FLIP] = "POST_FIRST_FLIP"
|
|
2585
|
-
____exports.ModCallbackCustom.POST_FLIP =
|
|
2583
|
+
____exports.ModCallbackCustom.POST_FLIP = 32
|
|
2586
2584
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_FLIP] = "POST_FLIP"
|
|
2585
|
+
____exports.ModCallbackCustom.POST_GAME_END_FILTER = 33
|
|
2586
|
+
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_GAME_END_FILTER] = "POST_GAME_END_FILTER"
|
|
2587
2587
|
____exports.ModCallbackCustom.POST_GAME_STARTED_REORDERED = 34
|
|
2588
2588
|
____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_GAME_STARTED_REORDERED] = "POST_GAME_STARTED_REORDERED"
|
|
2589
2589
|
____exports.ModCallbackCustom.POST_GAME_STARTED_REORDERED_LAST = 35
|
|
@@ -7094,6 +7094,11 @@ return ____exports
|
|
|
7094
7094
|
end,
|
|
7095
7095
|
["lua_modules.isaac-typescript-definitions.dist.src.enums.GridRoom"] = function(...)
|
|
7096
7096
|
local ____exports = {}
|
|
7097
|
+
--- Most rooms have a grid index corresponding to their position on the level layout grid. Valid grid
|
|
7098
|
+
-- indexes range from 0 through 168 (because the grid is 13x13). However, some rooms are not part of
|
|
7099
|
+
-- the level layout grid. For off-grid rooms, they are assigned special negative integers that
|
|
7100
|
+
-- correspond to what kind of room they are. This enum contains all of the special negative values
|
|
7101
|
+
-- that exist.
|
|
7097
7102
|
____exports.GridRoom = {}
|
|
7098
7103
|
____exports.GridRoom.DEVIL = -1
|
|
7099
7104
|
____exports.GridRoom[____exports.GridRoom.DEVIL] = "DEVIL"
|
|
@@ -15358,11 +15363,6 @@ function ____exports.shouldFireBoolean(self, fireArgs, optionalArgs)
|
|
|
15358
15363
|
local optionalArg = table.unpack(optionalArgs)
|
|
15359
15364
|
return optionalArg == nil or optionalArg == fireArg
|
|
15360
15365
|
end
|
|
15361
|
-
function ____exports.shouldFireCollectible(self, fireArgs, optionalArgs)
|
|
15362
|
-
local collectible = table.unpack(fireArgs)
|
|
15363
|
-
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
15364
|
-
return callbackCollectibleType == nil or callbackCollectibleType == collectible.SubType
|
|
15365
|
-
end
|
|
15366
15366
|
function ____exports.shouldFireCollectibleType(self, fireArgs, optionalArgs)
|
|
15367
15367
|
local _player, collectibleType = table.unpack(fireArgs)
|
|
15368
15368
|
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
@@ -18591,6 +18591,455 @@ function PostCollectibleEmpty.prototype.collectibleTypeChanged(self, collectible
|
|
|
18591
18591
|
self:fire(collectible, oldCollectibleType)
|
|
18592
18592
|
end
|
|
18593
18593
|
end
|
|
18594
|
+
return ____exports
|
|
18595
|
+
end,
|
|
18596
|
+
["src.functions.playerDataStructures"] = function(...)
|
|
18597
|
+
local ____lualib = require("lualib_bundle")
|
|
18598
|
+
local Map = ____lualib.Map
|
|
18599
|
+
local Set = ____lualib.Set
|
|
18600
|
+
local ____exports = {}
|
|
18601
|
+
local ____playerIndex = require("src.functions.playerIndex")
|
|
18602
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
18603
|
+
function ____exports.mapSetPlayer(self, map, player, value)
|
|
18604
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18605
|
+
map:set(playerIndex, value)
|
|
18606
|
+
end
|
|
18607
|
+
function ____exports.defaultMapGetPlayer(self, map, player, ...)
|
|
18608
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18609
|
+
return map:getAndSetDefault(playerIndex, ...)
|
|
18610
|
+
end
|
|
18611
|
+
function ____exports.defaultMapSetPlayer(self, map, player, value)
|
|
18612
|
+
____exports.mapSetPlayer(nil, map, player, value)
|
|
18613
|
+
end
|
|
18614
|
+
function ____exports.mapDeletePlayer(self, map, player)
|
|
18615
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18616
|
+
return map:delete(playerIndex)
|
|
18617
|
+
end
|
|
18618
|
+
function ____exports.mapGetPlayer(self, map, player)
|
|
18619
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18620
|
+
return map:get(playerIndex)
|
|
18621
|
+
end
|
|
18622
|
+
function ____exports.mapHasPlayer(self, map, player)
|
|
18623
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18624
|
+
return map:has(playerIndex)
|
|
18625
|
+
end
|
|
18626
|
+
function ____exports.setAddPlayer(self, set, player)
|
|
18627
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18628
|
+
return set:add(playerIndex)
|
|
18629
|
+
end
|
|
18630
|
+
function ____exports.setDeletePlayer(self, set, player)
|
|
18631
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18632
|
+
return set:delete(playerIndex)
|
|
18633
|
+
end
|
|
18634
|
+
function ____exports.setHasPlayer(self, set, player)
|
|
18635
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
18636
|
+
return set:has(playerIndex)
|
|
18637
|
+
end
|
|
18638
|
+
return ____exports
|
|
18639
|
+
end,
|
|
18640
|
+
["src.arrays.cachedEnumValues"] = function(...)
|
|
18641
|
+
local ____exports = {}
|
|
18642
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18643
|
+
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
18644
|
+
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
18645
|
+
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
18646
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
18647
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
18648
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
18649
|
+
local GridEntityXMLType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityXMLType
|
|
18650
|
+
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
18651
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
18652
|
+
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
18653
|
+
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
18654
|
+
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
18655
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
18656
|
+
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
18657
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
18658
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
18659
|
+
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
18660
|
+
local ____HealthType = require("src.enums.HealthType")
|
|
18661
|
+
local HealthType = ____HealthType.HealthType
|
|
18662
|
+
local ____SerializationBrand = require("src.enums.private.SerializationBrand")
|
|
18663
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
18664
|
+
local ____StatType = require("src.enums.StatType")
|
|
18665
|
+
local StatType = ____StatType.StatType
|
|
18666
|
+
local ____enums = require("src.functions.enums")
|
|
18667
|
+
local getEnumValues = ____enums.getEnumValues
|
|
18668
|
+
____exports.ACTIVE_SLOT_VALUES = getEnumValues(nil, ActiveSlot)
|
|
18669
|
+
____exports.CACHE_FLAG_VALUES = getEnumValues(nil, CacheFlag)
|
|
18670
|
+
____exports.CONTROLLER_INDEX_VALUES = getEnumValues(nil, ControllerIndex)
|
|
18671
|
+
____exports.DOOR_SLOT_FLAG_VALUES = getEnumValues(nil, DoorSlotFlag)
|
|
18672
|
+
____exports.DOOR_SLOT_VALUES = getEnumValues(nil, DoorSlot)
|
|
18673
|
+
____exports.GRID_ENTITY_TYPE_VALUES = getEnumValues(nil, GridEntityType)
|
|
18674
|
+
____exports.GRID_ENTITY_XML_TYPE_VALUES = getEnumValues(nil, GridEntityXMLType)
|
|
18675
|
+
____exports.ITEM_CONFIG_TAG_VALUES = getEnumValues(nil, ItemConfigTag)
|
|
18676
|
+
____exports.ITEM_CONFIG_CARD_TYPE_VALUES = getEnumValues(nil, ItemConfigCardType)
|
|
18677
|
+
____exports.ITEM_POOL_TYPE_VALUES = getEnumValues(nil, ItemPoolType)
|
|
18678
|
+
____exports.KEYBOARD_VALUES = getEnumValues(nil, Keyboard)
|
|
18679
|
+
____exports.HEALTH_TYPE_VALUES = getEnumValues(nil, HealthType)
|
|
18680
|
+
____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
|
|
18681
|
+
____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
|
|
18682
|
+
____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
18683
|
+
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
18684
|
+
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
18685
|
+
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
18686
|
+
____exports.STAT_TYPE_VALUES = getEnumValues(nil, StatType)
|
|
18687
|
+
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
18688
|
+
return ____exports
|
|
18689
|
+
end,
|
|
18690
|
+
["src.objects.characterDamageMultipliers"] = function(...)
|
|
18691
|
+
local ____exports = {}
|
|
18692
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18693
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18694
|
+
____exports.CHARACTER_DAMAGE_MULTIPLIERS = {
|
|
18695
|
+
[PlayerType.POSSESSOR] = 1,
|
|
18696
|
+
[PlayerType.ISAAC] = 1,
|
|
18697
|
+
[PlayerType.MAGDALENE] = 1,
|
|
18698
|
+
[PlayerType.CAIN] = 1.2,
|
|
18699
|
+
[PlayerType.JUDAS] = 1.35,
|
|
18700
|
+
[PlayerType.BLUE_BABY] = 1.05,
|
|
18701
|
+
[PlayerType.EVE] = 0.75,
|
|
18702
|
+
[PlayerType.SAMSON] = 1,
|
|
18703
|
+
[PlayerType.AZAZEL] = 1.5,
|
|
18704
|
+
[PlayerType.LAZARUS] = 1,
|
|
18705
|
+
[PlayerType.EDEN] = 1,
|
|
18706
|
+
[PlayerType.LOST] = 1,
|
|
18707
|
+
[PlayerType.LAZARUS_2] = 1.4,
|
|
18708
|
+
[PlayerType.DARK_JUDAS] = 2,
|
|
18709
|
+
[PlayerType.LILITH] = 1,
|
|
18710
|
+
[PlayerType.KEEPER] = 1.2,
|
|
18711
|
+
[PlayerType.APOLLYON] = 1,
|
|
18712
|
+
[PlayerType.FORGOTTEN] = 1.5,
|
|
18713
|
+
[PlayerType.SOUL] = 1,
|
|
18714
|
+
[PlayerType.BETHANY] = 1,
|
|
18715
|
+
[PlayerType.JACOB] = 1,
|
|
18716
|
+
[PlayerType.ESAU] = 1,
|
|
18717
|
+
[PlayerType.ISAAC_B] = 1,
|
|
18718
|
+
[PlayerType.MAGDALENE_B] = 0.75,
|
|
18719
|
+
[PlayerType.CAIN_B] = 1,
|
|
18720
|
+
[PlayerType.JUDAS_B] = 1,
|
|
18721
|
+
[PlayerType.BLUE_BABY_B] = 1,
|
|
18722
|
+
[PlayerType.EVE_B] = 1.2,
|
|
18723
|
+
[PlayerType.SAMSON_B] = 1,
|
|
18724
|
+
[PlayerType.AZAZEL_B] = 1.5,
|
|
18725
|
+
[PlayerType.LAZARUS_B] = 1,
|
|
18726
|
+
[PlayerType.EDEN_B] = 1,
|
|
18727
|
+
[PlayerType.LOST_B] = 1.3,
|
|
18728
|
+
[PlayerType.LILITH_B] = 1,
|
|
18729
|
+
[PlayerType.KEEPER_B] = 1,
|
|
18730
|
+
[PlayerType.APOLLYON_B] = 1,
|
|
18731
|
+
[PlayerType.FORGOTTEN_B] = 1.5,
|
|
18732
|
+
[PlayerType.BETHANY_B] = 1,
|
|
18733
|
+
[PlayerType.JACOB_B] = 1,
|
|
18734
|
+
[PlayerType.LAZARUS_2_B] = 1.5,
|
|
18735
|
+
[PlayerType.JACOB_2_B] = 1,
|
|
18736
|
+
[PlayerType.SOUL_B] = 1
|
|
18737
|
+
}
|
|
18738
|
+
return ____exports
|
|
18739
|
+
end,
|
|
18740
|
+
["src.objects.characterNames"] = function(...)
|
|
18741
|
+
local ____exports = {}
|
|
18742
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18743
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18744
|
+
____exports.CHARACTER_NAMES = {
|
|
18745
|
+
[PlayerType.POSSESSOR] = "Possessor",
|
|
18746
|
+
[PlayerType.ISAAC] = "Isaac",
|
|
18747
|
+
[PlayerType.MAGDALENE] = "Magdalene",
|
|
18748
|
+
[PlayerType.CAIN] = "Cain",
|
|
18749
|
+
[PlayerType.JUDAS] = "Judas",
|
|
18750
|
+
[PlayerType.BLUE_BABY] = "Blue Baby",
|
|
18751
|
+
[PlayerType.EVE] = "Eve",
|
|
18752
|
+
[PlayerType.SAMSON] = "Samson",
|
|
18753
|
+
[PlayerType.AZAZEL] = "Azazel",
|
|
18754
|
+
[PlayerType.LAZARUS] = "Lazarus",
|
|
18755
|
+
[PlayerType.EDEN] = "Eden",
|
|
18756
|
+
[PlayerType.LOST] = "The Lost",
|
|
18757
|
+
[PlayerType.LAZARUS_2] = "Lazarus II",
|
|
18758
|
+
[PlayerType.DARK_JUDAS] = "Dark Judas",
|
|
18759
|
+
[PlayerType.LILITH] = "Lilith",
|
|
18760
|
+
[PlayerType.KEEPER] = "Keeper",
|
|
18761
|
+
[PlayerType.APOLLYON] = "Apollyon",
|
|
18762
|
+
[PlayerType.FORGOTTEN] = "The Forgotten",
|
|
18763
|
+
[PlayerType.SOUL] = "The Soul",
|
|
18764
|
+
[PlayerType.BETHANY] = "Bethany",
|
|
18765
|
+
[PlayerType.JACOB] = "Jacob",
|
|
18766
|
+
[PlayerType.ESAU] = "Esau",
|
|
18767
|
+
[PlayerType.ISAAC_B] = "Tainted Isaac",
|
|
18768
|
+
[PlayerType.MAGDALENE_B] = "Tainted Magdalene",
|
|
18769
|
+
[PlayerType.CAIN_B] = "Tainted Cain",
|
|
18770
|
+
[PlayerType.JUDAS_B] = "Tainted Judas",
|
|
18771
|
+
[PlayerType.BLUE_BABY_B] = "Tainted Blue Baby",
|
|
18772
|
+
[PlayerType.EVE_B] = "Tainted Eve",
|
|
18773
|
+
[PlayerType.SAMSON_B] = "Tainted Samson",
|
|
18774
|
+
[PlayerType.AZAZEL_B] = "Tainted Azazel",
|
|
18775
|
+
[PlayerType.LAZARUS_B] = "Tainted Lazarus",
|
|
18776
|
+
[PlayerType.EDEN_B] = "Tainted Eden",
|
|
18777
|
+
[PlayerType.LOST_B] = "Tainted Lost",
|
|
18778
|
+
[PlayerType.LILITH_B] = "Tainted Lilith",
|
|
18779
|
+
[PlayerType.KEEPER_B] = "Tainted Keeper",
|
|
18780
|
+
[PlayerType.APOLLYON_B] = "Tainted Apollyon",
|
|
18781
|
+
[PlayerType.FORGOTTEN_B] = "Tainted Forgotten",
|
|
18782
|
+
[PlayerType.BETHANY_B] = "Tainted Bethany",
|
|
18783
|
+
[PlayerType.JACOB_B] = "Tainted Jacob",
|
|
18784
|
+
[PlayerType.LAZARUS_2_B] = "Dead Tainted Lazarus",
|
|
18785
|
+
[PlayerType.JACOB_2_B] = "Dead Tainted Jacob",
|
|
18786
|
+
[PlayerType.SOUL_B] = "Tainted Soul"
|
|
18787
|
+
}
|
|
18788
|
+
return ____exports
|
|
18789
|
+
end,
|
|
18790
|
+
["src.objects.characterStartingCollectibles"] = function(...)
|
|
18791
|
+
local ____exports = {}
|
|
18792
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18793
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
18794
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18795
|
+
____exports.CHARACTER_STARTING_COLLECTIBLES = {
|
|
18796
|
+
[PlayerType.POSSESSOR] = {},
|
|
18797
|
+
[PlayerType.ISAAC] = {CollectibleType.D6},
|
|
18798
|
+
[PlayerType.MAGDALENE] = {CollectibleType.YUM_HEART},
|
|
18799
|
+
[PlayerType.CAIN] = {CollectibleType.LUCKY_FOOT},
|
|
18800
|
+
[PlayerType.JUDAS] = {CollectibleType.BOOK_OF_BELIAL},
|
|
18801
|
+
[PlayerType.BLUE_BABY] = {CollectibleType.POOP},
|
|
18802
|
+
[PlayerType.EVE] = {CollectibleType.DEAD_BIRD, CollectibleType.WHORE_OF_BABYLON, CollectibleType.RAZOR_BLADE},
|
|
18803
|
+
[PlayerType.SAMSON] = {CollectibleType.BLOODY_LUST},
|
|
18804
|
+
[PlayerType.AZAZEL] = {},
|
|
18805
|
+
[PlayerType.LAZARUS] = {CollectibleType.ANEMIC},
|
|
18806
|
+
[PlayerType.EDEN] = {},
|
|
18807
|
+
[PlayerType.LOST] = {CollectibleType.ETERNAL_D6},
|
|
18808
|
+
[PlayerType.LAZARUS_2] = {CollectibleType.ANEMIC},
|
|
18809
|
+
[PlayerType.DARK_JUDAS] = {},
|
|
18810
|
+
[PlayerType.LILITH] = {CollectibleType.BOX_OF_FRIENDS, CollectibleType.CAMBION_CONCEPTION},
|
|
18811
|
+
[PlayerType.KEEPER] = {CollectibleType.WOODEN_NICKEL},
|
|
18812
|
+
[PlayerType.APOLLYON] = {CollectibleType.VOID},
|
|
18813
|
+
[PlayerType.FORGOTTEN] = {},
|
|
18814
|
+
[PlayerType.SOUL] = {},
|
|
18815
|
+
[PlayerType.BETHANY] = {CollectibleType.BOOK_OF_VIRTUES},
|
|
18816
|
+
[PlayerType.JACOB] = {},
|
|
18817
|
+
[PlayerType.ESAU] = {},
|
|
18818
|
+
[PlayerType.ISAAC_B] = {},
|
|
18819
|
+
[PlayerType.MAGDALENE_B] = {CollectibleType.YUM_HEART},
|
|
18820
|
+
[PlayerType.CAIN_B] = {CollectibleType.BAG_OF_CRAFTING},
|
|
18821
|
+
[PlayerType.JUDAS_B] = {CollectibleType.DARK_ARTS},
|
|
18822
|
+
[PlayerType.BLUE_BABY_B] = {CollectibleType.HOLD},
|
|
18823
|
+
[PlayerType.EVE_B] = {CollectibleType.SUMPTORIUM},
|
|
18824
|
+
[PlayerType.SAMSON_B] = {},
|
|
18825
|
+
[PlayerType.AZAZEL_B] = {},
|
|
18826
|
+
[PlayerType.LAZARUS_B] = {CollectibleType.FLIP},
|
|
18827
|
+
[PlayerType.EDEN_B] = {},
|
|
18828
|
+
[PlayerType.LOST_B] = {},
|
|
18829
|
+
[PlayerType.LILITH_B] = {},
|
|
18830
|
+
[PlayerType.KEEPER_B] = {},
|
|
18831
|
+
[PlayerType.APOLLYON_B] = {CollectibleType.ABYSS},
|
|
18832
|
+
[PlayerType.FORGOTTEN_B] = {},
|
|
18833
|
+
[PlayerType.BETHANY_B] = {CollectibleType.LEMEGETON},
|
|
18834
|
+
[PlayerType.JACOB_B] = {CollectibleType.ANIMA_SOLA},
|
|
18835
|
+
[PlayerType.LAZARUS_2_B] = {CollectibleType.FLIP},
|
|
18836
|
+
[PlayerType.JACOB_2_B] = {CollectibleType.ANIMA_SOLA},
|
|
18837
|
+
[PlayerType.SOUL_B] = {}
|
|
18838
|
+
}
|
|
18839
|
+
return ____exports
|
|
18840
|
+
end,
|
|
18841
|
+
["src.sets.charactersThatStartWithAnActiveItemSet"] = function(...)
|
|
18842
|
+
local ____lualib = require("lualib_bundle")
|
|
18843
|
+
local __TS__New = ____lualib.__TS__New
|
|
18844
|
+
local ____exports = {}
|
|
18845
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18846
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18847
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18848
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18849
|
+
____exports.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = __TS__New(ReadonlySet, {
|
|
18850
|
+
PlayerType.ISAAC,
|
|
18851
|
+
PlayerType.MAGDALENE,
|
|
18852
|
+
PlayerType.JUDAS,
|
|
18853
|
+
PlayerType.BLUE_BABY,
|
|
18854
|
+
PlayerType.EVE,
|
|
18855
|
+
PlayerType.EDEN,
|
|
18856
|
+
PlayerType.LOST,
|
|
18857
|
+
PlayerType.LILITH,
|
|
18858
|
+
PlayerType.KEEPER,
|
|
18859
|
+
PlayerType.APOLLYON,
|
|
18860
|
+
PlayerType.EDEN_B
|
|
18861
|
+
})
|
|
18862
|
+
return ____exports
|
|
18863
|
+
end,
|
|
18864
|
+
["src.sets.charactersWithBlackHeartFromEternalHeartSet"] = function(...)
|
|
18865
|
+
local ____lualib = require("lualib_bundle")
|
|
18866
|
+
local __TS__New = ____lualib.__TS__New
|
|
18867
|
+
local ____exports = {}
|
|
18868
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18869
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18870
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18871
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18872
|
+
____exports.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = __TS__New(ReadonlySet, {PlayerType.DARK_JUDAS, PlayerType.JUDAS_B})
|
|
18873
|
+
return ____exports
|
|
18874
|
+
end,
|
|
18875
|
+
["src.sets.charactersWithFreeDevilDealsSet"] = function(...)
|
|
18876
|
+
local ____lualib = require("lualib_bundle")
|
|
18877
|
+
local __TS__New = ____lualib.__TS__New
|
|
18878
|
+
local ____exports = {}
|
|
18879
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18880
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18881
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18882
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18883
|
+
____exports.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = __TS__New(ReadonlySet, {PlayerType.LOST, PlayerType.LOST_B, PlayerType.JACOB_2_B})
|
|
18884
|
+
return ____exports
|
|
18885
|
+
end,
|
|
18886
|
+
["src.sets.charactersWithNoRedHeartsSet"] = function(...)
|
|
18887
|
+
local ____lualib = require("lualib_bundle")
|
|
18888
|
+
local __TS__New = ____lualib.__TS__New
|
|
18889
|
+
local ____exports = {}
|
|
18890
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18891
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18892
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18893
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18894
|
+
____exports.CHARACTERS_WITH_NO_RED_HEARTS_SET = __TS__New(ReadonlySet, {
|
|
18895
|
+
PlayerType.BLUE_BABY,
|
|
18896
|
+
PlayerType.LOST,
|
|
18897
|
+
PlayerType.DARK_JUDAS,
|
|
18898
|
+
PlayerType.JUDAS_B,
|
|
18899
|
+
PlayerType.BLUE_BABY_B,
|
|
18900
|
+
PlayerType.LOST_B,
|
|
18901
|
+
PlayerType.FORGOTTEN_B,
|
|
18902
|
+
PlayerType.BETHANY_B
|
|
18903
|
+
})
|
|
18904
|
+
return ____exports
|
|
18905
|
+
end,
|
|
18906
|
+
["src.sets.charactersWithNoSoulHeartsSet"] = function(...)
|
|
18907
|
+
local ____lualib = require("lualib_bundle")
|
|
18908
|
+
local __TS__New = ____lualib.__TS__New
|
|
18909
|
+
local ____exports = {}
|
|
18910
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18911
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18912
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18913
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18914
|
+
____exports.CHARACTERS_WITH_NO_SOUL_HEARTS_SET = __TS__New(ReadonlySet, {
|
|
18915
|
+
PlayerType.LOST,
|
|
18916
|
+
PlayerType.KEEPER,
|
|
18917
|
+
PlayerType.BETHANY,
|
|
18918
|
+
PlayerType.LOST_B,
|
|
18919
|
+
PlayerType.KEEPER_B
|
|
18920
|
+
})
|
|
18921
|
+
return ____exports
|
|
18922
|
+
end,
|
|
18923
|
+
["src.sets.lostStyleCharactersSet"] = function(...)
|
|
18924
|
+
local ____lualib = require("lualib_bundle")
|
|
18925
|
+
local __TS__New = ____lualib.__TS__New
|
|
18926
|
+
local ____exports = {}
|
|
18927
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18928
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18929
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18930
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18931
|
+
____exports.LOST_STYLE_CHARACTERS_SET = __TS__New(ReadonlySet, {
|
|
18932
|
+
PlayerType.LOST,
|
|
18933
|
+
PlayerType.SOUL,
|
|
18934
|
+
PlayerType.LOST_B,
|
|
18935
|
+
PlayerType.JACOB_2_B,
|
|
18936
|
+
PlayerType.SOUL_B
|
|
18937
|
+
})
|
|
18938
|
+
return ____exports
|
|
18939
|
+
end,
|
|
18940
|
+
["src.functions.characters"] = function(...)
|
|
18941
|
+
local ____lualib = require("lualib_bundle")
|
|
18942
|
+
local __TS__New = ____lualib.__TS__New
|
|
18943
|
+
local ____exports = {}
|
|
18944
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
18945
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
18946
|
+
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
18947
|
+
local LAST_VANILLA_CHARACTER = ____constantsFirstLast.LAST_VANILLA_CHARACTER
|
|
18948
|
+
local ____characterDamageMultipliers = require("src.objects.characterDamageMultipliers")
|
|
18949
|
+
local CHARACTER_DAMAGE_MULTIPLIERS = ____characterDamageMultipliers.CHARACTER_DAMAGE_MULTIPLIERS
|
|
18950
|
+
local ____characterNames = require("src.objects.characterNames")
|
|
18951
|
+
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
18952
|
+
local ____characterStartingCollectibles = require("src.objects.characterStartingCollectibles")
|
|
18953
|
+
local CHARACTER_STARTING_COLLECTIBLES = ____characterStartingCollectibles.CHARACTER_STARTING_COLLECTIBLES
|
|
18954
|
+
local ____charactersThatStartWithAnActiveItemSet = require("src.sets.charactersThatStartWithAnActiveItemSet")
|
|
18955
|
+
local CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = ____charactersThatStartWithAnActiveItemSet.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET
|
|
18956
|
+
local ____charactersWithBlackHeartFromEternalHeartSet = require("src.sets.charactersWithBlackHeartFromEternalHeartSet")
|
|
18957
|
+
local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = ____charactersWithBlackHeartFromEternalHeartSet.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET
|
|
18958
|
+
local ____charactersWithFreeDevilDealsSet = require("src.sets.charactersWithFreeDevilDealsSet")
|
|
18959
|
+
local CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = ____charactersWithFreeDevilDealsSet.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET
|
|
18960
|
+
local ____charactersWithNoRedHeartsSet = require("src.sets.charactersWithNoRedHeartsSet")
|
|
18961
|
+
local CHARACTERS_WITH_NO_RED_HEARTS_SET = ____charactersWithNoRedHeartsSet.CHARACTERS_WITH_NO_RED_HEARTS_SET
|
|
18962
|
+
local ____charactersWithNoSoulHeartsSet = require("src.sets.charactersWithNoSoulHeartsSet")
|
|
18963
|
+
local CHARACTERS_WITH_NO_SOUL_HEARTS_SET = ____charactersWithNoSoulHeartsSet.CHARACTERS_WITH_NO_SOUL_HEARTS_SET
|
|
18964
|
+
local ____lostStyleCharactersSet = require("src.sets.lostStyleCharactersSet")
|
|
18965
|
+
local LOST_STYLE_CHARACTERS_SET = ____lostStyleCharactersSet.LOST_STYLE_CHARACTERS_SET
|
|
18966
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18967
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
18968
|
+
function ____exports.isModdedCharacter(self, character)
|
|
18969
|
+
return not ____exports.isVanillaCharacter(nil, character)
|
|
18970
|
+
end
|
|
18971
|
+
function ____exports.isVanillaCharacter(self, character)
|
|
18972
|
+
return character <= LAST_VANILLA_CHARACTER
|
|
18973
|
+
end
|
|
18974
|
+
local FLYING_CHARACTERS = __TS__New(ReadonlySet, {
|
|
18975
|
+
PlayerType.AZAZEL,
|
|
18976
|
+
PlayerType.LOST,
|
|
18977
|
+
PlayerType.SOUL,
|
|
18978
|
+
PlayerType.LOST_B,
|
|
18979
|
+
PlayerType.JACOB_2_B,
|
|
18980
|
+
PlayerType.SOUL_B
|
|
18981
|
+
})
|
|
18982
|
+
function ____exports.characterCanHaveRedHearts(self, character)
|
|
18983
|
+
return not CHARACTERS_WITH_NO_RED_HEARTS_SET:has(character)
|
|
18984
|
+
end
|
|
18985
|
+
function ____exports.characterCanHaveSoulHearts(self, character)
|
|
18986
|
+
return not CHARACTERS_WITH_NO_SOUL_HEARTS_SET:has(character)
|
|
18987
|
+
end
|
|
18988
|
+
function ____exports.characterCanTakeFreeDevilDeals(self, character)
|
|
18989
|
+
return CHARACTERS_WITH_FREE_DEVIL_DEALS_SET:has(character)
|
|
18990
|
+
end
|
|
18991
|
+
function ____exports.characterGetsBlackHeartFromEternalHeart(self, character)
|
|
18992
|
+
return CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET:has(character)
|
|
18993
|
+
end
|
|
18994
|
+
function ____exports.characterStartsWithActiveItem(self, character)
|
|
18995
|
+
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET:has(character)
|
|
18996
|
+
end
|
|
18997
|
+
function ____exports.getCharacterDamageMultiplier(self, character, hasWhoreOfBabylon)
|
|
18998
|
+
if hasWhoreOfBabylon == nil then
|
|
18999
|
+
hasWhoreOfBabylon = false
|
|
19000
|
+
end
|
|
19001
|
+
if character == PlayerType.EVE and hasWhoreOfBabylon then
|
|
19002
|
+
return 1
|
|
19003
|
+
end
|
|
19004
|
+
return CHARACTER_DAMAGE_MULTIPLIERS[character]
|
|
19005
|
+
end
|
|
19006
|
+
function ____exports.getCharacterDeathAnimationName(self, character)
|
|
19007
|
+
if LOST_STYLE_CHARACTERS_SET:has(character) then
|
|
19008
|
+
return "LostDeath"
|
|
19009
|
+
end
|
|
19010
|
+
if character == PlayerType.FORGOTTEN_B then
|
|
19011
|
+
return "ForgottenDeath"
|
|
19012
|
+
end
|
|
19013
|
+
return "Death"
|
|
19014
|
+
end
|
|
19015
|
+
function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
19016
|
+
if character == PlayerType.KEEPER then
|
|
19017
|
+
return 3
|
|
19018
|
+
end
|
|
19019
|
+
if character == PlayerType.FORGOTTEN then
|
|
19020
|
+
return 6
|
|
19021
|
+
end
|
|
19022
|
+
if character == PlayerType.SOUL then
|
|
19023
|
+
return 6
|
|
19024
|
+
end
|
|
19025
|
+
if character == PlayerType.KEEPER_B then
|
|
19026
|
+
return 2
|
|
19027
|
+
end
|
|
19028
|
+
return 12
|
|
19029
|
+
end
|
|
19030
|
+
function ____exports.getCharacterName(self, character)
|
|
19031
|
+
if ____exports.isModdedCharacter(nil, character) then
|
|
19032
|
+
return "Unknown"
|
|
19033
|
+
end
|
|
19034
|
+
return CHARACTER_NAMES[character]
|
|
19035
|
+
end
|
|
19036
|
+
function ____exports.getCharacterStartingCollectibles(self, character)
|
|
19037
|
+
return CHARACTER_STARTING_COLLECTIBLES[character]
|
|
19038
|
+
end
|
|
19039
|
+
function ____exports.isFlyingCharacter(self, player)
|
|
19040
|
+
local character = player:GetPlayerType()
|
|
19041
|
+
return FLYING_CHARACTERS:has(character)
|
|
19042
|
+
end
|
|
18594
19043
|
return ____exports
|
|
18595
19044
|
end,
|
|
18596
19045
|
["src.types.ReadonlyMap"] = function(...)
|
|
@@ -20080,10 +20529,6 @@ ____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = __TS__New(ReadonlySet, {
|
|
|
20080
20529
|
CollectibleType.DEATH_CERTIFICATE,
|
|
20081
20530
|
CollectibleType.R_KEY
|
|
20082
20531
|
})
|
|
20083
|
-
return ____exports
|
|
20084
|
-
end,
|
|
20085
|
-
["src.types.CollectibleIndex"] = function(...)
|
|
20086
|
-
local ____exports = {}
|
|
20087
20532
|
return ____exports
|
|
20088
20533
|
end,
|
|
20089
20534
|
["src.sets.entitiesWithArmorSet"] = function(...)
|
|
@@ -20723,863 +21168,116 @@ function ____exports.isTrinket(self, pickup)
|
|
|
20723
21168
|
end
|
|
20724
21169
|
return ____exports
|
|
20725
21170
|
end,
|
|
20726
|
-
["src.
|
|
20727
|
-
local ____exports = {}
|
|
20728
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20729
|
-
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
20730
|
-
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
20731
|
-
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
20732
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20733
|
-
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
20734
|
-
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
20735
|
-
local GridEntityXMLType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityXMLType
|
|
20736
|
-
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
20737
|
-
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
20738
|
-
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
20739
|
-
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
20740
|
-
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
20741
|
-
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
20742
|
-
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
20743
|
-
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
20744
|
-
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
20745
|
-
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
20746
|
-
local ____HealthType = require("src.enums.HealthType")
|
|
20747
|
-
local HealthType = ____HealthType.HealthType
|
|
20748
|
-
local ____SerializationBrand = require("src.enums.private.SerializationBrand")
|
|
20749
|
-
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
20750
|
-
local ____StatType = require("src.enums.StatType")
|
|
20751
|
-
local StatType = ____StatType.StatType
|
|
20752
|
-
local ____enums = require("src.functions.enums")
|
|
20753
|
-
local getEnumValues = ____enums.getEnumValues
|
|
20754
|
-
____exports.ACTIVE_SLOT_VALUES = getEnumValues(nil, ActiveSlot)
|
|
20755
|
-
____exports.CACHE_FLAG_VALUES = getEnumValues(nil, CacheFlag)
|
|
20756
|
-
____exports.CONTROLLER_INDEX_VALUES = getEnumValues(nil, ControllerIndex)
|
|
20757
|
-
____exports.DOOR_SLOT_FLAG_VALUES = getEnumValues(nil, DoorSlotFlag)
|
|
20758
|
-
____exports.DOOR_SLOT_VALUES = getEnumValues(nil, DoorSlot)
|
|
20759
|
-
____exports.GRID_ENTITY_TYPE_VALUES = getEnumValues(nil, GridEntityType)
|
|
20760
|
-
____exports.GRID_ENTITY_XML_TYPE_VALUES = getEnumValues(nil, GridEntityXMLType)
|
|
20761
|
-
____exports.ITEM_CONFIG_TAG_VALUES = getEnumValues(nil, ItemConfigTag)
|
|
20762
|
-
____exports.ITEM_CONFIG_CARD_TYPE_VALUES = getEnumValues(nil, ItemConfigCardType)
|
|
20763
|
-
____exports.ITEM_POOL_TYPE_VALUES = getEnumValues(nil, ItemPoolType)
|
|
20764
|
-
____exports.KEYBOARD_VALUES = getEnumValues(nil, Keyboard)
|
|
20765
|
-
____exports.HEALTH_TYPE_VALUES = getEnumValues(nil, HealthType)
|
|
20766
|
-
____exports.PILL_COLOR_VALUES = getEnumValues(nil, PillColor)
|
|
20767
|
-
____exports.PLAYER_FORM_VALUES = getEnumValues(nil, PlayerForm)
|
|
20768
|
-
____exports.POCKET_ITEM_SLOT_VALUES = getEnumValues(nil, PocketItemSlot)
|
|
20769
|
-
____exports.ROOM_SHAPE_VALUES = getEnumValues(nil, RoomShape)
|
|
20770
|
-
____exports.SERIALIZATION_BRAND_VALUES = getEnumValues(nil, SerializationBrand)
|
|
20771
|
-
____exports.SOUND_EFFECT_VALUES = getEnumValues(nil, SoundEffect)
|
|
20772
|
-
____exports.STAT_TYPE_VALUES = getEnumValues(nil, StatType)
|
|
20773
|
-
____exports.TRINKET_SLOT_VALUES = getEnumValues(nil, TrinketSlot)
|
|
20774
|
-
return ____exports
|
|
20775
|
-
end,
|
|
20776
|
-
["src.objects.doorSlotFlagToDoorSlot"] = function(...)
|
|
20777
|
-
local ____exports = {}
|
|
20778
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20779
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20780
|
-
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
20781
|
-
____exports.DEFAULT_DOOR_SLOT = DoorSlot.NO_DOOR_SLOT
|
|
20782
|
-
____exports.DOOR_SLOT_FLAG_TO_DOOR_SLOT = {
|
|
20783
|
-
[DoorSlotFlag.LEFT_0] = DoorSlot.LEFT_0,
|
|
20784
|
-
[DoorSlotFlag.UP_0] = DoorSlot.UP_0,
|
|
20785
|
-
[DoorSlotFlag.RIGHT_0] = DoorSlot.RIGHT_0,
|
|
20786
|
-
[DoorSlotFlag.DOWN_0] = DoorSlot.DOWN_0,
|
|
20787
|
-
[DoorSlotFlag.LEFT_1] = DoorSlot.LEFT_1,
|
|
20788
|
-
[DoorSlotFlag.UP_1] = DoorSlot.UP_1,
|
|
20789
|
-
[DoorSlotFlag.RIGHT_1] = DoorSlot.RIGHT_1,
|
|
20790
|
-
[DoorSlotFlag.DOWN_1] = DoorSlot.DOWN_1
|
|
20791
|
-
}
|
|
20792
|
-
return ____exports
|
|
20793
|
-
end,
|
|
20794
|
-
["src.objects.doorSlotToDirection"] = function(...)
|
|
20795
|
-
local ____exports = {}
|
|
20796
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20797
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
20798
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20799
|
-
____exports.DOOR_SLOT_TO_DIRECTION = {
|
|
20800
|
-
[DoorSlot.NO_DOOR_SLOT] = Direction.NO_DIRECTION,
|
|
20801
|
-
[DoorSlot.LEFT_0] = Direction.LEFT,
|
|
20802
|
-
[DoorSlot.UP_0] = Direction.UP,
|
|
20803
|
-
[DoorSlot.RIGHT_0] = Direction.RIGHT,
|
|
20804
|
-
[DoorSlot.DOWN_0] = Direction.DOWN,
|
|
20805
|
-
[DoorSlot.LEFT_1] = Direction.LEFT,
|
|
20806
|
-
[DoorSlot.UP_1] = Direction.UP,
|
|
20807
|
-
[DoorSlot.RIGHT_1] = Direction.RIGHT,
|
|
20808
|
-
[DoorSlot.DOWN_1] = Direction.DOWN
|
|
20809
|
-
}
|
|
20810
|
-
return ____exports
|
|
20811
|
-
end,
|
|
20812
|
-
["src.objects.doorSlotToDoorSlotFlag"] = function(...)
|
|
20813
|
-
local ____exports = {}
|
|
20814
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20815
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20816
|
-
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
20817
|
-
local DoorSlotFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlagZero
|
|
20818
|
-
____exports.DOOR_SLOT_TO_DOOR_SLOT_FLAG = {
|
|
20819
|
-
[DoorSlot.NO_DOOR_SLOT] = DoorSlotFlagZero,
|
|
20820
|
-
[DoorSlot.LEFT_0] = DoorSlotFlag.LEFT_0,
|
|
20821
|
-
[DoorSlot.UP_0] = DoorSlotFlag.UP_0,
|
|
20822
|
-
[DoorSlot.RIGHT_0] = DoorSlotFlag.RIGHT_0,
|
|
20823
|
-
[DoorSlot.DOWN_0] = DoorSlotFlag.DOWN_0,
|
|
20824
|
-
[DoorSlot.LEFT_1] = DoorSlotFlag.LEFT_1,
|
|
20825
|
-
[DoorSlot.UP_1] = DoorSlotFlag.UP_1,
|
|
20826
|
-
[DoorSlot.RIGHT_1] = DoorSlotFlag.RIGHT_1,
|
|
20827
|
-
[DoorSlot.DOWN_1] = DoorSlotFlag.DOWN_1
|
|
20828
|
-
}
|
|
20829
|
-
return ____exports
|
|
20830
|
-
end,
|
|
20831
|
-
["src.objects.oppositeDoorSlots"] = function(...)
|
|
20832
|
-
local ____exports = {}
|
|
20833
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20834
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20835
|
-
____exports.OPPOSITE_DOOR_SLOTS = {
|
|
20836
|
-
[DoorSlot.NO_DOOR_SLOT] = nil,
|
|
20837
|
-
[DoorSlot.LEFT_0] = DoorSlot.RIGHT_0,
|
|
20838
|
-
[DoorSlot.UP_0] = DoorSlot.DOWN_0,
|
|
20839
|
-
[DoorSlot.RIGHT_0] = DoorSlot.LEFT_0,
|
|
20840
|
-
[DoorSlot.DOWN_0] = DoorSlot.UP_0,
|
|
20841
|
-
[DoorSlot.LEFT_1] = DoorSlot.RIGHT_1,
|
|
20842
|
-
[DoorSlot.UP_1] = DoorSlot.DOWN_1,
|
|
20843
|
-
[DoorSlot.RIGHT_1] = DoorSlot.LEFT_1,
|
|
20844
|
-
[DoorSlot.DOWN_1] = DoorSlot.UP_1
|
|
20845
|
-
}
|
|
20846
|
-
return ____exports
|
|
20847
|
-
end,
|
|
20848
|
-
["src.objects.roomShapeToDoorSlotCoordinates"] = function(...)
|
|
20849
|
-
local ____exports = {}
|
|
20850
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20851
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20852
|
-
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
20853
|
-
____exports.ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES = {
|
|
20854
|
-
[RoomShape.SHAPE_1x1] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.UP_0] = {6, -1}, [DoorSlot.RIGHT_0] = {13, 3}, [DoorSlot.DOWN_0] = {6, 7}},
|
|
20855
|
-
[RoomShape.IH] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.RIGHT_0] = {13, 3}},
|
|
20856
|
-
[RoomShape.IV] = {[DoorSlot.UP_0] = {6, -1}, [DoorSlot.DOWN_0] = {6, 7}},
|
|
20857
|
-
[RoomShape.SHAPE_1x2] = {
|
|
20858
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20859
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20860
|
-
[DoorSlot.RIGHT_0] = {13, 3},
|
|
20861
|
-
[DoorSlot.DOWN_0] = {6, 14},
|
|
20862
|
-
[DoorSlot.LEFT_1] = {-1, 10},
|
|
20863
|
-
[DoorSlot.RIGHT_1] = {13, 10}
|
|
20864
|
-
},
|
|
20865
|
-
[RoomShape.IIV] = {[DoorSlot.UP_0] = {6, -1}, [DoorSlot.DOWN_0] = {6, 14}},
|
|
20866
|
-
[RoomShape.SHAPE_2x1] = {
|
|
20867
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20868
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20869
|
-
[DoorSlot.RIGHT_0] = {26, 3},
|
|
20870
|
-
[DoorSlot.DOWN_0] = {6, 7},
|
|
20871
|
-
[DoorSlot.UP_1] = {19, -1},
|
|
20872
|
-
[DoorSlot.DOWN_1] = {19, 7}
|
|
20873
|
-
},
|
|
20874
|
-
[RoomShape.IIH] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.RIGHT_0] = {26, 3}},
|
|
20875
|
-
[RoomShape.SHAPE_2x2] = {
|
|
20876
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20877
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20878
|
-
[DoorSlot.RIGHT_0] = {26, 3},
|
|
20879
|
-
[DoorSlot.DOWN_0] = {6, 14},
|
|
20880
|
-
[DoorSlot.LEFT_1] = {-1, 10},
|
|
20881
|
-
[DoorSlot.UP_1] = {19, -1},
|
|
20882
|
-
[DoorSlot.RIGHT_1] = {26, 10},
|
|
20883
|
-
[DoorSlot.DOWN_1] = {19, 14}
|
|
20884
|
-
},
|
|
20885
|
-
[RoomShape.LTL] = {
|
|
20886
|
-
[DoorSlot.LEFT_0] = {12, 3},
|
|
20887
|
-
[DoorSlot.UP_0] = {6, 6},
|
|
20888
|
-
[DoorSlot.RIGHT_0] = {26, 3},
|
|
20889
|
-
[DoorSlot.DOWN_0] = {6, 14},
|
|
20890
|
-
[DoorSlot.LEFT_1] = {-1, 10},
|
|
20891
|
-
[DoorSlot.UP_1] = {19, -1},
|
|
20892
|
-
[DoorSlot.RIGHT_1] = {26, 10},
|
|
20893
|
-
[DoorSlot.DOWN_1] = {19, 14}
|
|
20894
|
-
},
|
|
20895
|
-
[RoomShape.LTR] = {
|
|
20896
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20897
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20898
|
-
[DoorSlot.RIGHT_0] = {13, 3},
|
|
20899
|
-
[DoorSlot.DOWN_0] = {6, 14},
|
|
20900
|
-
[DoorSlot.LEFT_1] = {-1, 10},
|
|
20901
|
-
[DoorSlot.UP_1] = {19, 6},
|
|
20902
|
-
[DoorSlot.RIGHT_1] = {26, 10},
|
|
20903
|
-
[DoorSlot.DOWN_1] = {19, 14}
|
|
20904
|
-
},
|
|
20905
|
-
[RoomShape.LBL] = {
|
|
20906
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20907
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20908
|
-
[DoorSlot.RIGHT_0] = {26, 3},
|
|
20909
|
-
[DoorSlot.DOWN_0] = {6, 7},
|
|
20910
|
-
[DoorSlot.LEFT_1] = {12, 10},
|
|
20911
|
-
[DoorSlot.UP_1] = {19, -1},
|
|
20912
|
-
[DoorSlot.RIGHT_1] = {26, 10},
|
|
20913
|
-
[DoorSlot.DOWN_1] = {19, 14}
|
|
20914
|
-
},
|
|
20915
|
-
[RoomShape.LBR] = {
|
|
20916
|
-
[DoorSlot.LEFT_0] = {-1, 3},
|
|
20917
|
-
[DoorSlot.UP_0] = {6, -1},
|
|
20918
|
-
[DoorSlot.RIGHT_0] = {26, 3},
|
|
20919
|
-
[DoorSlot.DOWN_0] = {6, 14},
|
|
20920
|
-
[DoorSlot.LEFT_1] = {-1, 10},
|
|
20921
|
-
[DoorSlot.UP_1] = {19, -1},
|
|
20922
|
-
[DoorSlot.RIGHT_1] = {13, 10},
|
|
20923
|
-
[DoorSlot.DOWN_1] = {19, 7}
|
|
20924
|
-
}
|
|
20925
|
-
}
|
|
20926
|
-
return ____exports
|
|
20927
|
-
end,
|
|
20928
|
-
["src.objects.roomShapeToDoorSlots"] = function(...)
|
|
20929
|
-
local ____lualib = require("lualib_bundle")
|
|
20930
|
-
local __TS__New = ____lualib.__TS__New
|
|
20931
|
-
local ____exports = {}
|
|
20932
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
20933
|
-
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
20934
|
-
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
20935
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
20936
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
20937
|
-
local ALL_DOOR_SLOTS_SET = __TS__New(ReadonlySet, {
|
|
20938
|
-
DoorSlot.LEFT_0,
|
|
20939
|
-
DoorSlot.UP_0,
|
|
20940
|
-
DoorSlot.RIGHT_0,
|
|
20941
|
-
DoorSlot.DOWN_0,
|
|
20942
|
-
DoorSlot.LEFT_1,
|
|
20943
|
-
DoorSlot.UP_1,
|
|
20944
|
-
DoorSlot.RIGHT_1,
|
|
20945
|
-
DoorSlot.DOWN_1
|
|
20946
|
-
})
|
|
20947
|
-
____exports.ROOM_SHAPE_TO_DOOR_SLOTS = {
|
|
20948
|
-
[RoomShape.SHAPE_1x1] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.UP_0, DoorSlot.RIGHT_0, DoorSlot.DOWN_0}),
|
|
20949
|
-
[RoomShape.IH] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.RIGHT_0}),
|
|
20950
|
-
[RoomShape.IV] = __TS__New(ReadonlySet, {DoorSlot.UP_0, DoorSlot.DOWN_0}),
|
|
20951
|
-
[RoomShape.SHAPE_1x2] = __TS__New(ReadonlySet, {
|
|
20952
|
-
DoorSlot.LEFT_0,
|
|
20953
|
-
DoorSlot.UP_0,
|
|
20954
|
-
DoorSlot.RIGHT_0,
|
|
20955
|
-
DoorSlot.DOWN_0,
|
|
20956
|
-
DoorSlot.LEFT_1,
|
|
20957
|
-
DoorSlot.RIGHT_1
|
|
20958
|
-
}),
|
|
20959
|
-
[RoomShape.IIV] = __TS__New(ReadonlySet, {DoorSlot.UP_0, DoorSlot.DOWN_0}),
|
|
20960
|
-
[RoomShape.SHAPE_2x1] = __TS__New(ReadonlySet, {
|
|
20961
|
-
DoorSlot.LEFT_0,
|
|
20962
|
-
DoorSlot.UP_0,
|
|
20963
|
-
DoorSlot.RIGHT_0,
|
|
20964
|
-
DoorSlot.DOWN_0,
|
|
20965
|
-
DoorSlot.UP_1,
|
|
20966
|
-
DoorSlot.DOWN_1
|
|
20967
|
-
}),
|
|
20968
|
-
[RoomShape.IIH] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.RIGHT_0}),
|
|
20969
|
-
[RoomShape.SHAPE_2x2] = ALL_DOOR_SLOTS_SET,
|
|
20970
|
-
[RoomShape.LTL] = ALL_DOOR_SLOTS_SET,
|
|
20971
|
-
[RoomShape.LTR] = ALL_DOOR_SLOTS_SET,
|
|
20972
|
-
[RoomShape.LBL] = ALL_DOOR_SLOTS_SET,
|
|
20973
|
-
[RoomShape.LBR] = ALL_DOOR_SLOTS_SET
|
|
20974
|
-
}
|
|
20975
|
-
return ____exports
|
|
20976
|
-
end,
|
|
20977
|
-
["src.functions.bitwise"] = function(...)
|
|
20978
|
-
local ____lualib = require("lualib_bundle")
|
|
20979
|
-
local __TS__ParseInt = ____lualib.__TS__ParseInt
|
|
20980
|
-
local __TS__NumberToString = ____lualib.__TS__NumberToString
|
|
20981
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
20982
|
-
local __TS__ArrayUnshift = ____lualib.__TS__ArrayUnshift
|
|
20983
|
-
local ____exports = {}
|
|
20984
|
-
local ____flag = require("src.functions.flag")
|
|
20985
|
-
local addFlag = ____flag.addFlag
|
|
20986
|
-
function ____exports.arrayToBitFlags(self, array)
|
|
20987
|
-
local flags = 0
|
|
20988
|
-
for ____, flag in ipairs(array) do
|
|
20989
|
-
flags = addFlag(nil, flags, flag)
|
|
20990
|
-
end
|
|
20991
|
-
return flags
|
|
20992
|
-
end
|
|
20993
|
-
function ____exports.convertBinaryToDecimal(self, bits)
|
|
20994
|
-
local bitsString = table.concat(bits, "")
|
|
20995
|
-
return __TS__ParseInt(bitsString, 2)
|
|
20996
|
-
end
|
|
20997
|
-
function ____exports.convertDecimalToBinary(self, number, minLength)
|
|
20998
|
-
local bits = {}
|
|
20999
|
-
local bitsString = __TS__NumberToString(number, 2)
|
|
21000
|
-
for ____, bitString in __TS__Iterator(bitsString) do
|
|
21001
|
-
local bit = tonumber(bitString)
|
|
21002
|
-
if bit == nil then
|
|
21003
|
-
error("Failed to convert the following number to binary: " .. tostring(number))
|
|
21004
|
-
end
|
|
21005
|
-
bits[#bits + 1] = bit
|
|
21006
|
-
end
|
|
21007
|
-
if minLength ~= nil then
|
|
21008
|
-
while #bits < minLength do
|
|
21009
|
-
__TS__ArrayUnshift(bits, 0)
|
|
21010
|
-
end
|
|
21011
|
-
end
|
|
21012
|
-
return bits
|
|
21013
|
-
end
|
|
21014
|
-
function ____exports.countSetBits(self, n)
|
|
21015
|
-
local count = 0
|
|
21016
|
-
while n > 0 do
|
|
21017
|
-
n = n & n - 1
|
|
21018
|
-
count = count + 1
|
|
21019
|
-
end
|
|
21020
|
-
return count
|
|
21021
|
-
end
|
|
21022
|
-
function ____exports.getKBitOfN(self, k, n)
|
|
21023
|
-
return n >> k & 1
|
|
21024
|
-
end
|
|
21025
|
-
function ____exports.getNumBitsOfN(self, n)
|
|
21026
|
-
local numBits = 0
|
|
21027
|
-
while n > 0 do
|
|
21028
|
-
numBits = numBits + 1
|
|
21029
|
-
n = n >> 1
|
|
21030
|
-
end
|
|
21031
|
-
return numBits
|
|
21032
|
-
end
|
|
21033
|
-
function ____exports.setToBitFlags(self, set)
|
|
21034
|
-
local flags = 0
|
|
21035
|
-
for ____, flag in __TS__Iterator(set:values()) do
|
|
21036
|
-
flags = addFlag(nil, flags, flag)
|
|
21037
|
-
end
|
|
21038
|
-
return flags
|
|
21039
|
-
end
|
|
21040
|
-
return ____exports
|
|
21041
|
-
end,
|
|
21042
|
-
["src.functions.doors"] = function(...)
|
|
21043
|
-
local ____lualib = require("lualib_bundle")
|
|
21044
|
-
local Set = ____lualib.Set
|
|
21045
|
-
local __TS__Spread = ____lualib.__TS__Spread
|
|
21046
|
-
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
21047
|
-
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
21048
|
-
local __TS__New = ____lualib.__TS__New
|
|
21049
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
21050
|
-
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
21051
|
-
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
21052
|
-
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
21171
|
+
["src.functions.collectibles"] = function(...)
|
|
21053
21172
|
local ____exports = {}
|
|
21173
|
+
local initQuestionMarkSprite, getCollectibleTypeFromArg
|
|
21054
21174
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21055
|
-
local
|
|
21056
|
-
local
|
|
21057
|
-
local
|
|
21058
|
-
local
|
|
21059
|
-
local
|
|
21060
|
-
local
|
|
21061
|
-
local
|
|
21062
|
-
local
|
|
21063
|
-
local
|
|
21175
|
+
local CollectibleSpriteLayer = ____isaac_2Dtypescript_2Ddefinitions.CollectibleSpriteLayer
|
|
21176
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
21177
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
21178
|
+
local ItemConfigChargeType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigChargeType
|
|
21179
|
+
local ItemConfigTagZero = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTagZero
|
|
21180
|
+
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
21181
|
+
local PickupPrice = ____isaac_2Dtypescript_2Ddefinitions.PickupPrice
|
|
21182
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
21183
|
+
local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
|
|
21064
21184
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
21065
21185
|
local game = ____cachedClasses.game
|
|
21186
|
+
local itemConfig = ____cachedClasses.itemConfig
|
|
21066
21187
|
local ____constants = require("src.core.constants")
|
|
21067
|
-
local
|
|
21068
|
-
local
|
|
21069
|
-
local
|
|
21070
|
-
local
|
|
21071
|
-
local
|
|
21072
|
-
local
|
|
21073
|
-
local
|
|
21074
|
-
local
|
|
21075
|
-
local
|
|
21076
|
-
local
|
|
21077
|
-
local
|
|
21078
|
-
local
|
|
21079
|
-
local
|
|
21080
|
-
local
|
|
21081
|
-
local
|
|
21082
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
21083
|
-
local ____bitwise = require("src.functions.bitwise")
|
|
21084
|
-
local arrayToBitFlags = ____bitwise.arrayToBitFlags
|
|
21085
|
-
local ____direction = require("src.functions.direction")
|
|
21086
|
-
local directionToVector = ____direction.directionToVector
|
|
21188
|
+
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
21189
|
+
local DEFAULT_ITEM_POOL_TYPE = ____constants.DEFAULT_ITEM_POOL_TYPE
|
|
21190
|
+
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
21191
|
+
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
21192
|
+
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
21193
|
+
local ____collectibleDescriptionMap = require("src.maps.collectibleDescriptionMap")
|
|
21194
|
+
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
21195
|
+
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
21196
|
+
local ____collectibleTypeToNameMap = require("src.maps.collectibleTypeToNameMap")
|
|
21197
|
+
local COLLECTIBLE_TYPE_TO_NAME_MAP = ____collectibleTypeToNameMap.COLLECTIBLE_TYPE_TO_NAME_MAP
|
|
21198
|
+
local DEFAULT_COLLECTIBLE_NAME = ____collectibleTypeToNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
21199
|
+
local ____singleUseActiveCollectibleTypesSet = require("src.sets.singleUseActiveCollectibleTypesSet")
|
|
21200
|
+
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
21201
|
+
local ____entities = require("src.functions.entities")
|
|
21202
|
+
local getEntityID = ____entities.getEntityID
|
|
21087
21203
|
local ____flag = require("src.functions.flag")
|
|
21088
21204
|
local hasFlag = ____flag.hasFlag
|
|
21089
|
-
local
|
|
21090
|
-
local
|
|
21205
|
+
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
21206
|
+
local isCollectible = ____pickupVariants.isCollectible
|
|
21207
|
+
local ____sprites = require("src.functions.sprites")
|
|
21208
|
+
local clearSprite = ____sprites.clearSprite
|
|
21209
|
+
local spriteEquals = ____sprites.spriteEquals
|
|
21091
21210
|
local ____types = require("src.functions.types")
|
|
21092
|
-
local
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
return
|
|
21101
|
-
end
|
|
21102
|
-
function ____exports.getDoorSlotsForRoomShape(self, roomShape)
|
|
21103
|
-
return ROOM_SHAPE_TO_DOOR_SLOTS[roomShape]
|
|
21211
|
+
local isNumber = ____types.isNumber
|
|
21212
|
+
local ____utils = require("src.functions.utils")
|
|
21213
|
+
local iRange = ____utils.iRange
|
|
21214
|
+
function initQuestionMarkSprite(self)
|
|
21215
|
+
local sprite = Sprite()
|
|
21216
|
+
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
21217
|
+
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
21218
|
+
sprite:LoadGraphics()
|
|
21219
|
+
return sprite
|
|
21104
21220
|
end
|
|
21105
|
-
function ____exports.
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
local roomTypesSet = __TS__New(ReadonlySet, roomTypes)
|
|
21110
|
-
local possibleDoorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
21111
|
-
local doors = {}
|
|
21112
|
-
for ____, doorSlot in __TS__Iterator(possibleDoorSlots) do
|
|
21113
|
-
do
|
|
21114
|
-
local door = room:GetDoor(doorSlot)
|
|
21115
|
-
if door == nil then
|
|
21116
|
-
goto __continue25
|
|
21117
|
-
end
|
|
21118
|
-
local gridEntityType = door:GetType()
|
|
21119
|
-
if gridEntityType ~= GridEntityType.DOOR then
|
|
21120
|
-
goto __continue25
|
|
21121
|
-
end
|
|
21122
|
-
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
21123
|
-
doors[#doors + 1] = door
|
|
21124
|
-
end
|
|
21125
|
-
end
|
|
21126
|
-
::__continue25::
|
|
21221
|
+
function ____exports.clearCollectibleSprite(self, collectible)
|
|
21222
|
+
if not isCollectible(nil, collectible) then
|
|
21223
|
+
local entityID = getEntityID(nil, collectible)
|
|
21224
|
+
error("The \"clearCollectibleSprite\" function was given a non-collectible: " .. entityID)
|
|
21127
21225
|
end
|
|
21128
|
-
|
|
21129
|
-
end
|
|
21130
|
-
function ____exports.isBlueWombDoor(self, door)
|
|
21131
|
-
return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
|
|
21226
|
+
____exports.setCollectibleSprite(nil, collectible, nil)
|
|
21132
21227
|
end
|
|
21133
|
-
function ____exports.
|
|
21134
|
-
return
|
|
21228
|
+
function ____exports.isVanillaCollectibleType(self, collectibleType)
|
|
21229
|
+
return collectibleType <= LAST_VANILLA_COLLECTIBLE_TYPE
|
|
21135
21230
|
end
|
|
21136
|
-
function ____exports.
|
|
21137
|
-
|
|
21138
|
-
|
|
21139
|
-
|
|
21231
|
+
function ____exports.setCollectibleEmpty(self, collectible)
|
|
21232
|
+
if not isCollectible(nil, collectible) then
|
|
21233
|
+
local entityID = getEntityID(nil, collectible)
|
|
21234
|
+
error("The \"setCollectibleEmpty\" function was given a non-collectible: " .. entityID)
|
|
21235
|
+
end
|
|
21236
|
+
collectible.SubType = CollectibleType.NULL
|
|
21237
|
+
____exports.clearCollectibleSprite(nil, collectible)
|
|
21140
21238
|
end
|
|
21141
|
-
function ____exports.
|
|
21142
|
-
|
|
21143
|
-
|
|
21239
|
+
function ____exports.setCollectibleSprite(self, collectible, pngPath)
|
|
21240
|
+
if not isCollectible(nil, collectible) then
|
|
21241
|
+
local entityID = getEntityID(nil, collectible)
|
|
21242
|
+
error("The \"setCollectibleSprite\" function was given a non-collectible: " .. entityID)
|
|
21243
|
+
end
|
|
21244
|
+
local sprite = collectible:GetSprite()
|
|
21245
|
+
if pngPath == nil then
|
|
21246
|
+
clearSprite(nil, sprite, CollectibleSpriteLayer.HEAD, CollectibleSpriteLayer.ITEM_SHADOW)
|
|
21247
|
+
else
|
|
21248
|
+
sprite:ReplaceSpritesheet(CollectibleSpriteLayer.HEAD, pngPath)
|
|
21249
|
+
sprite:LoadGraphics()
|
|
21250
|
+
end
|
|
21144
21251
|
end
|
|
21145
|
-
function ____exports.
|
|
21146
|
-
|
|
21147
|
-
|
|
21148
|
-
|
|
21252
|
+
function ____exports.setCollectibleSubType(self, collectible, newCollectibleType)
|
|
21253
|
+
if not isCollectible(nil, collectible) then
|
|
21254
|
+
local entityID = getEntityID(nil, collectible)
|
|
21255
|
+
error("The \"setCollectibleSubType\" function was given a non-collectible: " .. entityID)
|
|
21256
|
+
end
|
|
21257
|
+
if newCollectibleType == CollectibleType.NULL then
|
|
21258
|
+
____exports.setCollectibleEmpty(nil, collectible)
|
|
21259
|
+
return
|
|
21149
21260
|
end
|
|
21261
|
+
collectible:Morph(
|
|
21262
|
+
EntityType.PICKUP,
|
|
21263
|
+
PickupVariant.COLLECTIBLE,
|
|
21264
|
+
newCollectibleType,
|
|
21265
|
+
true,
|
|
21266
|
+
true,
|
|
21267
|
+
true
|
|
21268
|
+
)
|
|
21150
21269
|
end
|
|
21151
|
-
function
|
|
21152
|
-
|
|
21153
|
-
|
|
21270
|
+
function getCollectibleTypeFromArg(self, collectibleOrCollectibleType, functionName)
|
|
21271
|
+
if isNumber(nil, collectibleOrCollectibleType) then
|
|
21272
|
+
local collectibleType = collectibleOrCollectibleType
|
|
21273
|
+
return collectibleType
|
|
21274
|
+
end
|
|
21275
|
+
local collectible = collectibleOrCollectibleType
|
|
21276
|
+
if not isCollectible(nil, collectible) then
|
|
21277
|
+
local entityID = getEntityID(nil, collectible)
|
|
21278
|
+
error((("The \"" .. functionName) .. "\" function was given a non-collectible: ") .. entityID)
|
|
21154
21279
|
end
|
|
21155
|
-
|
|
21156
|
-
function ____exports.closeDoorFast(self, door)
|
|
21157
|
-
door.State = DoorState.CLOSED
|
|
21158
|
-
local sprite = door:GetSprite()
|
|
21159
|
-
sprite:Play("Closed", true)
|
|
21160
|
-
end
|
|
21161
|
-
function ____exports.doorSlotFlagToDoorSlot(self, doorSlotFlag)
|
|
21162
|
-
local doorSlot = DOOR_SLOT_FLAG_TO_DOOR_SLOT[doorSlotFlag]
|
|
21163
|
-
return doorSlot == nil and DEFAULT_DOOR_SLOT or doorSlot
|
|
21164
|
-
end
|
|
21165
|
-
function ____exports.doorSlotFlagsToDoorSlots(self, doorSlotFlags)
|
|
21166
|
-
local doorSlots = {}
|
|
21167
|
-
for ____, doorSlotFlag in ipairs(DOOR_SLOT_FLAG_VALUES) do
|
|
21168
|
-
if hasFlag(nil, doorSlotFlags, doorSlotFlag) then
|
|
21169
|
-
local doorSlot = ____exports.doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
21170
|
-
doorSlots[#doorSlots + 1] = doorSlot
|
|
21171
|
-
end
|
|
21172
|
-
end
|
|
21173
|
-
return doorSlots
|
|
21174
|
-
end
|
|
21175
|
-
function ____exports.doorSlotToDoorSlotFlag(self, doorSlot)
|
|
21176
|
-
return DOOR_SLOT_TO_DOOR_SLOT_FLAG[doorSlot]
|
|
21177
|
-
end
|
|
21178
|
-
function ____exports.doorSlotsToDoorSlotFlags(self, doorSlots)
|
|
21179
|
-
local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
|
|
21180
|
-
local doorSlotFlagArray = __TS__ArrayMap(
|
|
21181
|
-
doorSlotArray,
|
|
21182
|
-
function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
|
|
21183
|
-
)
|
|
21184
|
-
return arrayToBitFlags(nil, doorSlotFlagArray)
|
|
21185
|
-
end
|
|
21186
|
-
function ____exports.getAngelRoomDoor(self)
|
|
21187
|
-
local angelRoomDoors = ____exports.getDoors(nil, RoomType.ANGEL)
|
|
21188
|
-
local ____temp_0
|
|
21189
|
-
if #angelRoomDoors == 0 then
|
|
21190
|
-
____temp_0 = nil
|
|
21191
|
-
else
|
|
21192
|
-
____temp_0 = angelRoomDoors[1]
|
|
21193
|
-
end
|
|
21194
|
-
return ____temp_0
|
|
21195
|
-
end
|
|
21196
|
-
function ____exports.getBlueWombDoor(self)
|
|
21197
|
-
local doors = ____exports.getDoors(nil)
|
|
21198
|
-
return __TS__ArrayFind(
|
|
21199
|
-
doors,
|
|
21200
|
-
function(____, door) return ____exports.isBlueWombDoor(nil, door) end
|
|
21201
|
-
)
|
|
21202
|
-
end
|
|
21203
|
-
function ____exports.getDevilRoomDoor(self)
|
|
21204
|
-
local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
|
|
21205
|
-
local ____temp_1
|
|
21206
|
-
if #devilRoomDoors == 0 then
|
|
21207
|
-
____temp_1 = nil
|
|
21208
|
-
else
|
|
21209
|
-
____temp_1 = devilRoomDoors[1]
|
|
21210
|
-
end
|
|
21211
|
-
return ____temp_1
|
|
21212
|
-
end
|
|
21213
|
-
function ____exports.getDevilRoomOrAngelRoomDoor(self)
|
|
21214
|
-
local devilRoomOrAngelRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL, RoomType.ANGEL)
|
|
21215
|
-
local ____temp_2
|
|
21216
|
-
if #devilRoomOrAngelRoomDoors == 0 then
|
|
21217
|
-
____temp_2 = nil
|
|
21218
|
-
else
|
|
21219
|
-
____temp_2 = devilRoomOrAngelRoomDoors[1]
|
|
21220
|
-
end
|
|
21221
|
-
return ____temp_2
|
|
21222
|
-
end
|
|
21223
|
-
function ____exports.getDoorEnterPosition(self, door)
|
|
21224
|
-
local offset = ____exports.getDoorSlotEnterPositionOffset(nil, door.Slot)
|
|
21225
|
-
return door.Position + offset
|
|
21226
|
-
end
|
|
21227
|
-
function ____exports.getDoorSlotEnterPosition(self, doorSlot)
|
|
21228
|
-
local room = game:GetRoom()
|
|
21229
|
-
local position = room:GetDoorSlotPosition(doorSlot)
|
|
21230
|
-
local offset = ____exports.getDoorSlotEnterPositionOffset(nil, doorSlot)
|
|
21231
|
-
return position + offset
|
|
21232
|
-
end
|
|
21233
|
-
function ____exports.getDoorsToRoomIndex(self, ...)
|
|
21234
|
-
local roomGridIndex = {...}
|
|
21235
|
-
local roomGridIndexesSet = __TS__New(ReadonlySet, roomGridIndex)
|
|
21236
|
-
local doors = ____exports.getDoors(nil)
|
|
21237
|
-
return __TS__ArrayFilter(
|
|
21238
|
-
doors,
|
|
21239
|
-
function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
|
|
21240
|
-
)
|
|
21241
|
-
end
|
|
21242
|
-
function ____exports.getOppositeDoorSlot(self, doorSlot)
|
|
21243
|
-
return OPPOSITE_DOOR_SLOTS[doorSlot]
|
|
21244
|
-
end
|
|
21245
|
-
function ____exports.getRepentanceDoor(self)
|
|
21246
|
-
local doors = ____exports.getDoors(nil)
|
|
21247
|
-
return __TS__ArrayFind(
|
|
21248
|
-
doors,
|
|
21249
|
-
function(____, door) return ____exports.isRepentanceDoor(nil, door) end
|
|
21250
|
-
)
|
|
21251
|
-
end
|
|
21252
|
-
function ____exports.getRoomShapeDoorSlot(self, roomShape, x, y)
|
|
21253
|
-
local doorSlotCoordinates = ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES[roomShape]
|
|
21254
|
-
for ____, ____value in ipairs(__TS__ObjectEntries(doorSlotCoordinates)) do
|
|
21255
|
-
local doorSlotString = ____value[1]
|
|
21256
|
-
local coordinates = ____value[2]
|
|
21257
|
-
local doorSlot = tonumber(doorSlotString)
|
|
21258
|
-
local doorX, doorY = table.unpack(coordinates)
|
|
21259
|
-
if x == doorX and y == doorY then
|
|
21260
|
-
return doorSlot
|
|
21261
|
-
end
|
|
21262
|
-
end
|
|
21263
|
-
return nil
|
|
21264
|
-
end
|
|
21265
|
-
function ____exports.getRoomShapeDoorSlotCoordinates(self, roomShape, doorSlot)
|
|
21266
|
-
local doorSlotCoordinates = ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES[roomShape]
|
|
21267
|
-
return doorSlotCoordinates[doorSlot]
|
|
21268
|
-
end
|
|
21269
|
-
function ____exports.getUnusedDoorSlots(self)
|
|
21270
|
-
local room = game:GetRoom()
|
|
21271
|
-
return __TS__ArrayFilter(
|
|
21272
|
-
DOOR_SLOT_VALUES,
|
|
21273
|
-
function(____, doorSlot) return doorSlot ~= DoorSlot.NO_DOOR_SLOT and room:IsDoorSlotAllowed(doorSlot) and room:GetDoor(doorSlot) == nil end
|
|
21274
|
-
)
|
|
21275
|
-
end
|
|
21276
|
-
function ____exports.hasDoorType(self, ...)
|
|
21277
|
-
local roomTypes = {...}
|
|
21278
|
-
local doors = ____exports.getDoors(nil)
|
|
21279
|
-
local doorsOfThisRoomType = __TS__ArrayFilter(
|
|
21280
|
-
doors,
|
|
21281
|
-
function(____, door) return __TS__ArraySome(
|
|
21282
|
-
roomTypes,
|
|
21283
|
-
function(____, roomType) return door:IsRoomType(roomType) end
|
|
21284
|
-
) end
|
|
21285
|
-
)
|
|
21286
|
-
return #doorsOfThisRoomType > 0
|
|
21287
|
-
end
|
|
21288
|
-
function ____exports.hasUnusedDoorSlot(self)
|
|
21289
|
-
local unusedDoorSlots = ____exports.getUnusedDoorSlots(nil)
|
|
21290
|
-
return #unusedDoorSlots > 0
|
|
21291
|
-
end
|
|
21292
|
-
function ____exports.isAngelRoomDoor(self, door)
|
|
21293
|
-
return door.TargetRoomType == RoomType.ANGEL
|
|
21294
|
-
end
|
|
21295
|
-
function ____exports.isDevilRoomDoor(self, door)
|
|
21296
|
-
return door.TargetRoomType == RoomType.DEVIL
|
|
21297
|
-
end
|
|
21298
|
-
function ____exports.isDoorSlotInRoomShape(self, doorSlot, roomShape)
|
|
21299
|
-
local doorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
21300
|
-
return doorSlots:has(doorSlot)
|
|
21301
|
-
end
|
|
21302
|
-
function ____exports.isDoorToDownpour(self, door)
|
|
21303
|
-
if not ____exports.isRepentanceDoor(nil, door) then
|
|
21304
|
-
return false
|
|
21305
|
-
end
|
|
21306
|
-
local sprite = door:GetSprite()
|
|
21307
|
-
local fileName = sprite:GetFilename()
|
|
21308
|
-
return string.lower(fileName) == "gfx/grid/door_downpour.anm2"
|
|
21309
|
-
end
|
|
21310
|
-
function ____exports.isDoorToMausoleum(self, door)
|
|
21311
|
-
if not ____exports.isRepentanceDoor(nil, door) then
|
|
21312
|
-
return false
|
|
21313
|
-
end
|
|
21314
|
-
local sprite = door:GetSprite()
|
|
21315
|
-
local fileName = sprite:GetFilename()
|
|
21316
|
-
return string.lower(fileName) == "gfx/grid/door_mausoleum.anm2"
|
|
21317
|
-
end
|
|
21318
|
-
function ____exports.isDoorToMausoleumAscent(self, door)
|
|
21319
|
-
if not ____exports.isRepentanceDoor(nil, door) then
|
|
21320
|
-
return false
|
|
21321
|
-
end
|
|
21322
|
-
local sprite = door:GetSprite()
|
|
21323
|
-
local fileName = sprite:GetFilename()
|
|
21324
|
-
return string.lower(fileName) == "gfx/grid/door_mausoleum_alt.anm2"
|
|
21325
|
-
end
|
|
21326
|
-
function ____exports.isDoorToMines(self, door)
|
|
21327
|
-
if not ____exports.isRepentanceDoor(nil, door) then
|
|
21328
|
-
return false
|
|
21329
|
-
end
|
|
21330
|
-
local sprite = door:GetSprite()
|
|
21331
|
-
local fileName = sprite:GetFilename()
|
|
21332
|
-
return string.lower(fileName) == "gfx/grid/door_mines.anm2"
|
|
21333
|
-
end
|
|
21334
|
-
function ____exports.isDoorToMomsHeart(self, door)
|
|
21335
|
-
if not ____exports.isRepentanceDoor(nil, door) then
|
|
21336
|
-
return false
|
|
21337
|
-
end
|
|
21338
|
-
local sprite = door:GetSprite()
|
|
21339
|
-
local fileName = sprite:GetFilename()
|
|
21340
|
-
return string.lower(fileName) == "gfx/grid/door_momsheart.anm2"
|
|
21341
|
-
end
|
|
21342
|
-
function ____exports.isHiddenSecretRoomDoor(self, door)
|
|
21343
|
-
local sprite = door:GetSprite()
|
|
21344
|
-
local animation = sprite:GetAnimation()
|
|
21345
|
-
return ____exports.isSecretRoomDoor(nil, door) and animation == "Hidden"
|
|
21346
|
-
end
|
|
21347
|
-
function ____exports.lockDoor(self, door)
|
|
21348
|
-
local level = game:GetLevel()
|
|
21349
|
-
local roomDescriptor = level:GetRoomByIdx(door.TargetRoomIndex)
|
|
21350
|
-
roomDescriptor.VisitedCount = 0
|
|
21351
|
-
door:SetVariant(DoorVariant.LOCKED)
|
|
21352
|
-
door:SetLocked(true)
|
|
21353
|
-
door:Close(true)
|
|
21354
|
-
end
|
|
21355
|
-
function ____exports.openAllDoors(self)
|
|
21356
|
-
for ____, door in ipairs(____exports.getDoors(nil)) do
|
|
21357
|
-
door:Open()
|
|
21358
|
-
end
|
|
21359
|
-
end
|
|
21360
|
-
function ____exports.openDoorFast(self, door)
|
|
21361
|
-
door.State = DoorState.OPEN
|
|
21362
|
-
local sprite = door:GetSprite()
|
|
21363
|
-
sprite:Play("Opened", true)
|
|
21364
|
-
end
|
|
21365
|
-
function ____exports.removeAllDoors(self, ...)
|
|
21366
|
-
local doors = ____exports.getDoors(nil, ...)
|
|
21367
|
-
____exports.removeDoors(
|
|
21368
|
-
nil,
|
|
21369
|
-
table.unpack(doors)
|
|
21370
|
-
)
|
|
21371
|
-
return #doors
|
|
21372
|
-
end
|
|
21373
|
-
return ____exports
|
|
21374
|
-
end,
|
|
21375
|
-
["src.functions.roomData"] = function(...)
|
|
21376
|
-
local ____lualib = require("lualib_bundle")
|
|
21377
|
-
local Set = ____lualib.Set
|
|
21378
|
-
local __TS__New = ____lualib.__TS__New
|
|
21379
|
-
local ____exports = {}
|
|
21380
|
-
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
21381
|
-
local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
|
|
21382
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
21383
|
-
local game = ____cachedClasses.game
|
|
21384
|
-
local ____doors = require("src.functions.doors")
|
|
21385
|
-
local doorSlotFlagToDoorSlot = ____doors.doorSlotFlagToDoorSlot
|
|
21386
|
-
local ____flag = require("src.functions.flag")
|
|
21387
|
-
local hasFlag = ____flag.hasFlag
|
|
21388
|
-
function ____exports.getRoomData(self, roomGridIndex)
|
|
21389
|
-
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
21390
|
-
return roomDescriptor.Data
|
|
21391
|
-
end
|
|
21392
|
-
function ____exports.getRoomDescriptor(self, roomGridIndex)
|
|
21393
|
-
local level = game:GetLevel()
|
|
21394
|
-
if roomGridIndex == nil then
|
|
21395
|
-
roomGridIndex = ____exports.getRoomGridIndex(nil)
|
|
21396
|
-
end
|
|
21397
|
-
return level:GetRoomByIdx(roomGridIndex)
|
|
21398
|
-
end
|
|
21399
|
-
function ____exports.getRoomDescriptorReadOnly(self)
|
|
21400
|
-
local level = game:GetLevel()
|
|
21401
|
-
return level:GetCurrentRoomDesc()
|
|
21402
|
-
end
|
|
21403
|
-
function ____exports.getRoomGridIndex(self)
|
|
21404
|
-
local level = game:GetLevel()
|
|
21405
|
-
local currentRoomIndex = level:GetCurrentRoomIndex()
|
|
21406
|
-
if currentRoomIndex < 0 then
|
|
21407
|
-
return currentRoomIndex
|
|
21408
|
-
end
|
|
21409
|
-
local roomDescriptor = ____exports.getRoomDescriptorReadOnly(nil)
|
|
21410
|
-
return roomDescriptor.SafeGridIndex
|
|
21411
|
-
end
|
|
21412
|
-
function ____exports.getRoomAllowedDoors(self, roomGridIndex)
|
|
21413
|
-
local allowedDoors = __TS__New(Set)
|
|
21414
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21415
|
-
if roomData == nil then
|
|
21416
|
-
return allowedDoors
|
|
21417
|
-
end
|
|
21418
|
-
for ____, doorSlotFlag in ipairs(DOOR_SLOT_FLAG_VALUES) do
|
|
21419
|
-
if hasFlag(nil, roomData.Doors, doorSlotFlag) then
|
|
21420
|
-
local doorSlot = doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
21421
|
-
allowedDoors:add(doorSlot)
|
|
21422
|
-
end
|
|
21423
|
-
end
|
|
21424
|
-
return allowedDoors
|
|
21425
|
-
end
|
|
21426
|
-
function ____exports.getRoomListIndex(self, roomGridIndex)
|
|
21427
|
-
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
21428
|
-
return roomDescriptor.ListIndex
|
|
21429
|
-
end
|
|
21430
|
-
function ____exports.getRoomName(self, roomGridIndex)
|
|
21431
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21432
|
-
return roomData == nil and "Unknown" or roomData.Name
|
|
21433
|
-
end
|
|
21434
|
-
function ____exports.getRoomShape(self, roomGridIndex)
|
|
21435
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21436
|
-
local ____temp_0
|
|
21437
|
-
if roomData == nil then
|
|
21438
|
-
____temp_0 = nil
|
|
21439
|
-
else
|
|
21440
|
-
____temp_0 = roomData.Shape
|
|
21441
|
-
end
|
|
21442
|
-
return ____temp_0
|
|
21443
|
-
end
|
|
21444
|
-
function ____exports.getRoomStageID(self, roomGridIndex)
|
|
21445
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21446
|
-
return roomData == nil and -1 or roomData.StageID
|
|
21447
|
-
end
|
|
21448
|
-
function ____exports.getRoomSubType(self, roomGridIndex)
|
|
21449
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21450
|
-
return roomData == nil and -1 or roomData.Subtype
|
|
21451
|
-
end
|
|
21452
|
-
function ____exports.getRoomType(self, roomGridIndex)
|
|
21453
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21454
|
-
return roomData == nil and -1 or roomData.Type
|
|
21455
|
-
end
|
|
21456
|
-
function ____exports.getRoomVariant(self, roomGridIndex)
|
|
21457
|
-
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
21458
|
-
return roomData == nil and -1 or roomData.Variant
|
|
21459
|
-
end
|
|
21460
|
-
function ____exports.getRoomVisitedCount(self, roomGridIndex)
|
|
21461
|
-
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
21462
|
-
return roomDescriptor.VisitedCount
|
|
21463
|
-
end
|
|
21464
|
-
function ____exports.setRoomData(self, roomGridIndex, roomData)
|
|
21465
|
-
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
21466
|
-
roomDescriptor.Data = roomData
|
|
21467
|
-
end
|
|
21468
|
-
return ____exports
|
|
21469
|
-
end,
|
|
21470
|
-
["src.functions.collectibles"] = function(...)
|
|
21471
|
-
local ____exports = {}
|
|
21472
|
-
local initQuestionMarkSprite, getCollectibleTypeFromArg
|
|
21473
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21474
|
-
local CollectibleSpriteLayer = ____isaac_2Dtypescript_2Ddefinitions.CollectibleSpriteLayer
|
|
21475
|
-
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
21476
|
-
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
21477
|
-
local ItemConfigChargeType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigChargeType
|
|
21478
|
-
local ItemConfigTagZero = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTagZero
|
|
21479
|
-
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
21480
|
-
local PickupPrice = ____isaac_2Dtypescript_2Ddefinitions.PickupPrice
|
|
21481
|
-
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
21482
|
-
local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
|
|
21483
|
-
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
21484
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
21485
|
-
local game = ____cachedClasses.game
|
|
21486
|
-
local itemConfig = ____cachedClasses.itemConfig
|
|
21487
|
-
local ____constants = require("src.core.constants")
|
|
21488
|
-
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
21489
|
-
local DEFAULT_ITEM_POOL_TYPE = ____constants.DEFAULT_ITEM_POOL_TYPE
|
|
21490
|
-
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
21491
|
-
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
21492
|
-
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
21493
|
-
local ____collectibleDescriptionMap = require("src.maps.collectibleDescriptionMap")
|
|
21494
|
-
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
21495
|
-
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
21496
|
-
local ____collectibleTypeToNameMap = require("src.maps.collectibleTypeToNameMap")
|
|
21497
|
-
local COLLECTIBLE_TYPE_TO_NAME_MAP = ____collectibleTypeToNameMap.COLLECTIBLE_TYPE_TO_NAME_MAP
|
|
21498
|
-
local DEFAULT_COLLECTIBLE_NAME = ____collectibleTypeToNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
21499
|
-
local ____singleUseActiveCollectibleTypesSet = require("src.sets.singleUseActiveCollectibleTypesSet")
|
|
21500
|
-
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
21501
|
-
local ____entities = require("src.functions.entities")
|
|
21502
|
-
local getEntityID = ____entities.getEntityID
|
|
21503
|
-
local ____flag = require("src.functions.flag")
|
|
21504
|
-
local hasFlag = ____flag.hasFlag
|
|
21505
|
-
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
21506
|
-
local isCollectible = ____pickupVariants.isCollectible
|
|
21507
|
-
local ____roomData = require("src.functions.roomData")
|
|
21508
|
-
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
21509
|
-
local ____sprites = require("src.functions.sprites")
|
|
21510
|
-
local clearSprite = ____sprites.clearSprite
|
|
21511
|
-
local spriteEquals = ____sprites.spriteEquals
|
|
21512
|
-
local ____types = require("src.functions.types")
|
|
21513
|
-
local isNumber = ____types.isNumber
|
|
21514
|
-
local ____utils = require("src.functions.utils")
|
|
21515
|
-
local iRange = ____utils.iRange
|
|
21516
|
-
function initQuestionMarkSprite(self)
|
|
21517
|
-
local sprite = Sprite()
|
|
21518
|
-
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
21519
|
-
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
21520
|
-
sprite:LoadGraphics()
|
|
21521
|
-
return sprite
|
|
21522
|
-
end
|
|
21523
|
-
function ____exports.clearCollectibleSprite(self, collectible)
|
|
21524
|
-
if not isCollectible(nil, collectible) then
|
|
21525
|
-
local entityID = getEntityID(nil, collectible)
|
|
21526
|
-
error("The \"clearCollectibleSprite\" function was given a non-collectible: " .. entityID)
|
|
21527
|
-
end
|
|
21528
|
-
____exports.setCollectibleSprite(nil, collectible, nil)
|
|
21529
|
-
end
|
|
21530
|
-
function ____exports.isVanillaCollectibleType(self, collectibleType)
|
|
21531
|
-
return collectibleType <= LAST_VANILLA_COLLECTIBLE_TYPE
|
|
21532
|
-
end
|
|
21533
|
-
function ____exports.setCollectibleEmpty(self, collectible)
|
|
21534
|
-
if not isCollectible(nil, collectible) then
|
|
21535
|
-
local entityID = getEntityID(nil, collectible)
|
|
21536
|
-
error("The \"setCollectibleEmpty\" function was given a non-collectible: " .. entityID)
|
|
21537
|
-
end
|
|
21538
|
-
collectible.SubType = CollectibleType.NULL
|
|
21539
|
-
____exports.clearCollectibleSprite(nil, collectible)
|
|
21540
|
-
end
|
|
21541
|
-
function ____exports.setCollectibleSprite(self, collectible, pngPath)
|
|
21542
|
-
if not isCollectible(nil, collectible) then
|
|
21543
|
-
local entityID = getEntityID(nil, collectible)
|
|
21544
|
-
error("The \"setCollectibleSprite\" function was given a non-collectible: " .. entityID)
|
|
21545
|
-
end
|
|
21546
|
-
local sprite = collectible:GetSprite()
|
|
21547
|
-
if pngPath == nil then
|
|
21548
|
-
clearSprite(nil, sprite, CollectibleSpriteLayer.HEAD, CollectibleSpriteLayer.ITEM_SHADOW)
|
|
21549
|
-
else
|
|
21550
|
-
sprite:ReplaceSpritesheet(CollectibleSpriteLayer.HEAD, pngPath)
|
|
21551
|
-
sprite:LoadGraphics()
|
|
21552
|
-
end
|
|
21553
|
-
end
|
|
21554
|
-
function ____exports.setCollectibleSubType(self, collectible, newCollectibleType)
|
|
21555
|
-
if not isCollectible(nil, collectible) then
|
|
21556
|
-
local entityID = getEntityID(nil, collectible)
|
|
21557
|
-
error("The \"setCollectibleSubType\" function was given a non-collectible: " .. entityID)
|
|
21558
|
-
end
|
|
21559
|
-
if newCollectibleType == CollectibleType.NULL then
|
|
21560
|
-
____exports.setCollectibleEmpty(nil, collectible)
|
|
21561
|
-
return
|
|
21562
|
-
end
|
|
21563
|
-
collectible:Morph(
|
|
21564
|
-
EntityType.PICKUP,
|
|
21565
|
-
PickupVariant.COLLECTIBLE,
|
|
21566
|
-
newCollectibleType,
|
|
21567
|
-
true,
|
|
21568
|
-
true,
|
|
21569
|
-
true
|
|
21570
|
-
)
|
|
21571
|
-
end
|
|
21572
|
-
function getCollectibleTypeFromArg(self, collectibleOrCollectibleType, functionName)
|
|
21573
|
-
if isNumber(nil, collectibleOrCollectibleType) then
|
|
21574
|
-
local collectibleType = collectibleOrCollectibleType
|
|
21575
|
-
return collectibleType
|
|
21576
|
-
end
|
|
21577
|
-
local collectible = collectibleOrCollectibleType
|
|
21578
|
-
if not isCollectible(nil, collectible) then
|
|
21579
|
-
local entityID = getEntityID(nil, collectible)
|
|
21580
|
-
error((("The \"" .. functionName) .. "\" function was given a non-collectible: ") .. entityID)
|
|
21581
|
-
end
|
|
21582
|
-
return collectible.SubType
|
|
21280
|
+
return collectible.SubType
|
|
21583
21281
|
end
|
|
21584
21282
|
local COLLECTIBLE_ANM2_PATH = "gfx/005.100_collectible.anm2"
|
|
21585
21283
|
local DEFAULT_COLLECTIBLE_PRICE = 15
|
|
@@ -21669,23 +21367,6 @@ function ____exports.getCollectibleGfxFilename(self, collectibleOrCollectibleTyp
|
|
|
21669
21367
|
end
|
|
21670
21368
|
return itemConfigItem.GfxFileName
|
|
21671
21369
|
end
|
|
21672
|
-
function ____exports.getCollectibleIndex(self, collectible)
|
|
21673
|
-
if not isCollectible(nil, collectible) then
|
|
21674
|
-
local entityID = getEntityID(nil, collectible)
|
|
21675
|
-
error("The \"getCollectibleIndex\" function was given a non-collectible: " .. entityID)
|
|
21676
|
-
end
|
|
21677
|
-
local level = game:GetLevel()
|
|
21678
|
-
local stage = level:GetStage()
|
|
21679
|
-
local stageType = level:GetStageType()
|
|
21680
|
-
local room = game:GetRoom()
|
|
21681
|
-
local roomType = room:GetType()
|
|
21682
|
-
local gridIndex = room:GetGridIndex(collectible.Position)
|
|
21683
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
21684
|
-
if roomType == RoomType.TREASURE or roomType == RoomType.BOSS then
|
|
21685
|
-
return (((((((tostring(stage) .. ",") .. tostring(stageType)) .. ",") .. tostring(gridIndex)) .. ",") .. tostring(collectible.SubType)) .. ",") .. tostring(collectible.InitSeed)
|
|
21686
|
-
end
|
|
21687
|
-
return (((((tostring(roomListIndex) .. ",") .. tostring(gridIndex)) .. ",") .. tostring(collectible.SubType)) .. ",") .. tostring(collectible.InitSeed)
|
|
21688
|
-
end
|
|
21689
21370
|
function ____exports.getCollectibleInitCharge(self, collectibleOrCollectibleType)
|
|
21690
21371
|
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleInitCharge")
|
|
21691
21372
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -21853,497 +21534,60 @@ function ____exports.setCollectiblesRerolledForItemTracker(self)
|
|
|
21853
21534
|
end
|
|
21854
21535
|
return ____exports
|
|
21855
21536
|
end,
|
|
21856
|
-
["src.
|
|
21537
|
+
["src.functions.players"] = function(...)
|
|
21857
21538
|
local ____lualib = require("lualib_bundle")
|
|
21858
|
-
local
|
|
21539
|
+
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
21859
21540
|
local __TS__New = ____lualib.__TS__New
|
|
21860
|
-
local
|
|
21861
|
-
local
|
|
21541
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
21542
|
+
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
21543
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
21544
|
+
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
21862
21545
|
local ____exports = {}
|
|
21863
21546
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21864
|
-
local
|
|
21865
|
-
local
|
|
21547
|
+
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
21548
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
21549
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
21550
|
+
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
21551
|
+
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
21552
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
21553
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
21554
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
21555
|
+
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
21556
|
+
local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
|
|
21557
|
+
local TRINKET_SLOT_VALUES = ____cachedEnumValues.TRINKET_SLOT_VALUES
|
|
21558
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
21559
|
+
local game = ____cachedClasses.game
|
|
21560
|
+
local itemConfig = ____cachedClasses.itemConfig
|
|
21561
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
21562
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
21563
|
+
local ____array = require("src.functions.array")
|
|
21564
|
+
local getLastElement = ____array.getLastElement
|
|
21565
|
+
local sumArray = ____array.sumArray
|
|
21566
|
+
local ____characters = require("src.functions.characters")
|
|
21567
|
+
local getCharacterName = ____characters.getCharacterName
|
|
21568
|
+
local isVanillaCharacter = ____characters.isVanillaCharacter
|
|
21866
21569
|
local ____collectibles = require("src.functions.collectibles")
|
|
21867
|
-
local
|
|
21868
|
-
local ____shouldFire = require("src.shouldFire")
|
|
21869
|
-
local shouldFireCollectible = ____shouldFire.shouldFireCollectible
|
|
21870
|
-
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
21871
|
-
local CustomCallback = ____CustomCallback.CustomCallback
|
|
21872
|
-
local v = {run = {seenCollectibles = __TS__New(Set)}}
|
|
21873
|
-
____exports.PostCollectibleInitFirst = __TS__Class()
|
|
21874
|
-
local PostCollectibleInitFirst = ____exports.PostCollectibleInitFirst
|
|
21875
|
-
PostCollectibleInitFirst.name = "PostCollectibleInitFirst"
|
|
21876
|
-
__TS__ClassExtends(PostCollectibleInitFirst, CustomCallback)
|
|
21877
|
-
function PostCollectibleInitFirst.prototype.____constructor(self)
|
|
21878
|
-
CustomCallback.prototype.____constructor(self)
|
|
21879
|
-
self.v = v
|
|
21880
|
-
self.shouldFire = shouldFireCollectible
|
|
21881
|
-
self.postPickupInitCollectible = function(____, pickup)
|
|
21882
|
-
local collectible = pickup
|
|
21883
|
-
local collectibleIndex = getCollectibleIndex(nil, collectible)
|
|
21884
|
-
if v.run.seenCollectibles:has(collectibleIndex) then
|
|
21885
|
-
return
|
|
21886
|
-
end
|
|
21887
|
-
v.run.seenCollectibles:add(collectibleIndex)
|
|
21888
|
-
self:fire(collectible)
|
|
21889
|
-
end
|
|
21890
|
-
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, self.postPickupInitCollectible, {PickupVariant.COLLECTIBLE}}}
|
|
21891
|
-
end
|
|
21892
|
-
return ____exports
|
|
21893
|
-
end,
|
|
21894
|
-
["src.functions.playerDataStructures"] = function(...)
|
|
21895
|
-
local ____lualib = require("lualib_bundle")
|
|
21896
|
-
local Map = ____lualib.Map
|
|
21897
|
-
local Set = ____lualib.Set
|
|
21898
|
-
local ____exports = {}
|
|
21570
|
+
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
21899
21571
|
local ____playerIndex = require("src.functions.playerIndex")
|
|
21900
|
-
local
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21572
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
21573
|
+
local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
|
|
21574
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
21575
|
+
local ____types = require("src.functions.types")
|
|
21576
|
+
local isNumber = ____types.isNumber
|
|
21577
|
+
local ____utils = require("src.functions.utils")
|
|
21578
|
+
local ____repeat = ____utils["repeat"]
|
|
21579
|
+
function ____exports.getCharacters(self)
|
|
21580
|
+
local players = getPlayers(nil)
|
|
21581
|
+
return __TS__ArrayMap(
|
|
21582
|
+
players,
|
|
21583
|
+
function(____, player) return player:GetPlayerType() end
|
|
21584
|
+
)
|
|
21904
21585
|
end
|
|
21905
|
-
function ____exports.
|
|
21906
|
-
local
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21910
|
-
____exports.mapSetPlayer(nil, map, player, value)
|
|
21911
|
-
end
|
|
21912
|
-
function ____exports.mapDeletePlayer(self, map, player)
|
|
21913
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21914
|
-
return map:delete(playerIndex)
|
|
21915
|
-
end
|
|
21916
|
-
function ____exports.mapGetPlayer(self, map, player)
|
|
21917
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21918
|
-
return map:get(playerIndex)
|
|
21919
|
-
end
|
|
21920
|
-
function ____exports.mapHasPlayer(self, map, player)
|
|
21921
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21922
|
-
return map:has(playerIndex)
|
|
21923
|
-
end
|
|
21924
|
-
function ____exports.setAddPlayer(self, set, player)
|
|
21925
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21926
|
-
return set:add(playerIndex)
|
|
21927
|
-
end
|
|
21928
|
-
function ____exports.setDeletePlayer(self, set, player)
|
|
21929
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21930
|
-
return set:delete(playerIndex)
|
|
21931
|
-
end
|
|
21932
|
-
function ____exports.setHasPlayer(self, set, player)
|
|
21933
|
-
local playerIndex = getPlayerIndex(nil, player)
|
|
21934
|
-
return set:has(playerIndex)
|
|
21935
|
-
end
|
|
21936
|
-
return ____exports
|
|
21937
|
-
end,
|
|
21938
|
-
["src.objects.characterDamageMultipliers"] = function(...)
|
|
21939
|
-
local ____exports = {}
|
|
21940
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21941
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
21942
|
-
____exports.CHARACTER_DAMAGE_MULTIPLIERS = {
|
|
21943
|
-
[PlayerType.POSSESSOR] = 1,
|
|
21944
|
-
[PlayerType.ISAAC] = 1,
|
|
21945
|
-
[PlayerType.MAGDALENE] = 1,
|
|
21946
|
-
[PlayerType.CAIN] = 1.2,
|
|
21947
|
-
[PlayerType.JUDAS] = 1.35,
|
|
21948
|
-
[PlayerType.BLUE_BABY] = 1.05,
|
|
21949
|
-
[PlayerType.EVE] = 0.75,
|
|
21950
|
-
[PlayerType.SAMSON] = 1,
|
|
21951
|
-
[PlayerType.AZAZEL] = 1.5,
|
|
21952
|
-
[PlayerType.LAZARUS] = 1,
|
|
21953
|
-
[PlayerType.EDEN] = 1,
|
|
21954
|
-
[PlayerType.LOST] = 1,
|
|
21955
|
-
[PlayerType.LAZARUS_2] = 1.4,
|
|
21956
|
-
[PlayerType.DARK_JUDAS] = 2,
|
|
21957
|
-
[PlayerType.LILITH] = 1,
|
|
21958
|
-
[PlayerType.KEEPER] = 1.2,
|
|
21959
|
-
[PlayerType.APOLLYON] = 1,
|
|
21960
|
-
[PlayerType.FORGOTTEN] = 1.5,
|
|
21961
|
-
[PlayerType.SOUL] = 1,
|
|
21962
|
-
[PlayerType.BETHANY] = 1,
|
|
21963
|
-
[PlayerType.JACOB] = 1,
|
|
21964
|
-
[PlayerType.ESAU] = 1,
|
|
21965
|
-
[PlayerType.ISAAC_B] = 1,
|
|
21966
|
-
[PlayerType.MAGDALENE_B] = 0.75,
|
|
21967
|
-
[PlayerType.CAIN_B] = 1,
|
|
21968
|
-
[PlayerType.JUDAS_B] = 1,
|
|
21969
|
-
[PlayerType.BLUE_BABY_B] = 1,
|
|
21970
|
-
[PlayerType.EVE_B] = 1.2,
|
|
21971
|
-
[PlayerType.SAMSON_B] = 1,
|
|
21972
|
-
[PlayerType.AZAZEL_B] = 1.5,
|
|
21973
|
-
[PlayerType.LAZARUS_B] = 1,
|
|
21974
|
-
[PlayerType.EDEN_B] = 1,
|
|
21975
|
-
[PlayerType.LOST_B] = 1.3,
|
|
21976
|
-
[PlayerType.LILITH_B] = 1,
|
|
21977
|
-
[PlayerType.KEEPER_B] = 1,
|
|
21978
|
-
[PlayerType.APOLLYON_B] = 1,
|
|
21979
|
-
[PlayerType.FORGOTTEN_B] = 1.5,
|
|
21980
|
-
[PlayerType.BETHANY_B] = 1,
|
|
21981
|
-
[PlayerType.JACOB_B] = 1,
|
|
21982
|
-
[PlayerType.LAZARUS_2_B] = 1.5,
|
|
21983
|
-
[PlayerType.JACOB_2_B] = 1,
|
|
21984
|
-
[PlayerType.SOUL_B] = 1
|
|
21985
|
-
}
|
|
21986
|
-
return ____exports
|
|
21987
|
-
end,
|
|
21988
|
-
["src.objects.characterNames"] = function(...)
|
|
21989
|
-
local ____exports = {}
|
|
21990
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21991
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
21992
|
-
____exports.CHARACTER_NAMES = {
|
|
21993
|
-
[PlayerType.POSSESSOR] = "Possessor",
|
|
21994
|
-
[PlayerType.ISAAC] = "Isaac",
|
|
21995
|
-
[PlayerType.MAGDALENE] = "Magdalene",
|
|
21996
|
-
[PlayerType.CAIN] = "Cain",
|
|
21997
|
-
[PlayerType.JUDAS] = "Judas",
|
|
21998
|
-
[PlayerType.BLUE_BABY] = "Blue Baby",
|
|
21999
|
-
[PlayerType.EVE] = "Eve",
|
|
22000
|
-
[PlayerType.SAMSON] = "Samson",
|
|
22001
|
-
[PlayerType.AZAZEL] = "Azazel",
|
|
22002
|
-
[PlayerType.LAZARUS] = "Lazarus",
|
|
22003
|
-
[PlayerType.EDEN] = "Eden",
|
|
22004
|
-
[PlayerType.LOST] = "The Lost",
|
|
22005
|
-
[PlayerType.LAZARUS_2] = "Lazarus II",
|
|
22006
|
-
[PlayerType.DARK_JUDAS] = "Dark Judas",
|
|
22007
|
-
[PlayerType.LILITH] = "Lilith",
|
|
22008
|
-
[PlayerType.KEEPER] = "Keeper",
|
|
22009
|
-
[PlayerType.APOLLYON] = "Apollyon",
|
|
22010
|
-
[PlayerType.FORGOTTEN] = "The Forgotten",
|
|
22011
|
-
[PlayerType.SOUL] = "The Soul",
|
|
22012
|
-
[PlayerType.BETHANY] = "Bethany",
|
|
22013
|
-
[PlayerType.JACOB] = "Jacob",
|
|
22014
|
-
[PlayerType.ESAU] = "Esau",
|
|
22015
|
-
[PlayerType.ISAAC_B] = "Tainted Isaac",
|
|
22016
|
-
[PlayerType.MAGDALENE_B] = "Tainted Magdalene",
|
|
22017
|
-
[PlayerType.CAIN_B] = "Tainted Cain",
|
|
22018
|
-
[PlayerType.JUDAS_B] = "Tainted Judas",
|
|
22019
|
-
[PlayerType.BLUE_BABY_B] = "Tainted Blue Baby",
|
|
22020
|
-
[PlayerType.EVE_B] = "Tainted Eve",
|
|
22021
|
-
[PlayerType.SAMSON_B] = "Tainted Samson",
|
|
22022
|
-
[PlayerType.AZAZEL_B] = "Tainted Azazel",
|
|
22023
|
-
[PlayerType.LAZARUS_B] = "Tainted Lazarus",
|
|
22024
|
-
[PlayerType.EDEN_B] = "Tainted Eden",
|
|
22025
|
-
[PlayerType.LOST_B] = "Tainted Lost",
|
|
22026
|
-
[PlayerType.LILITH_B] = "Tainted Lilith",
|
|
22027
|
-
[PlayerType.KEEPER_B] = "Tainted Keeper",
|
|
22028
|
-
[PlayerType.APOLLYON_B] = "Tainted Apollyon",
|
|
22029
|
-
[PlayerType.FORGOTTEN_B] = "Tainted Forgotten",
|
|
22030
|
-
[PlayerType.BETHANY_B] = "Tainted Bethany",
|
|
22031
|
-
[PlayerType.JACOB_B] = "Tainted Jacob",
|
|
22032
|
-
[PlayerType.LAZARUS_2_B] = "Dead Tainted Lazarus",
|
|
22033
|
-
[PlayerType.JACOB_2_B] = "Dead Tainted Jacob",
|
|
22034
|
-
[PlayerType.SOUL_B] = "Tainted Soul"
|
|
22035
|
-
}
|
|
22036
|
-
return ____exports
|
|
22037
|
-
end,
|
|
22038
|
-
["src.objects.characterStartingCollectibles"] = function(...)
|
|
22039
|
-
local ____exports = {}
|
|
22040
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22041
|
-
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
22042
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22043
|
-
____exports.CHARACTER_STARTING_COLLECTIBLES = {
|
|
22044
|
-
[PlayerType.POSSESSOR] = {},
|
|
22045
|
-
[PlayerType.ISAAC] = {CollectibleType.D6},
|
|
22046
|
-
[PlayerType.MAGDALENE] = {CollectibleType.YUM_HEART},
|
|
22047
|
-
[PlayerType.CAIN] = {CollectibleType.LUCKY_FOOT},
|
|
22048
|
-
[PlayerType.JUDAS] = {CollectibleType.BOOK_OF_BELIAL},
|
|
22049
|
-
[PlayerType.BLUE_BABY] = {CollectibleType.POOP},
|
|
22050
|
-
[PlayerType.EVE] = {CollectibleType.DEAD_BIRD, CollectibleType.WHORE_OF_BABYLON, CollectibleType.RAZOR_BLADE},
|
|
22051
|
-
[PlayerType.SAMSON] = {CollectibleType.BLOODY_LUST},
|
|
22052
|
-
[PlayerType.AZAZEL] = {},
|
|
22053
|
-
[PlayerType.LAZARUS] = {CollectibleType.ANEMIC},
|
|
22054
|
-
[PlayerType.EDEN] = {},
|
|
22055
|
-
[PlayerType.LOST] = {CollectibleType.ETERNAL_D6},
|
|
22056
|
-
[PlayerType.LAZARUS_2] = {CollectibleType.ANEMIC},
|
|
22057
|
-
[PlayerType.DARK_JUDAS] = {},
|
|
22058
|
-
[PlayerType.LILITH] = {CollectibleType.BOX_OF_FRIENDS, CollectibleType.CAMBION_CONCEPTION},
|
|
22059
|
-
[PlayerType.KEEPER] = {CollectibleType.WOODEN_NICKEL},
|
|
22060
|
-
[PlayerType.APOLLYON] = {CollectibleType.VOID},
|
|
22061
|
-
[PlayerType.FORGOTTEN] = {},
|
|
22062
|
-
[PlayerType.SOUL] = {},
|
|
22063
|
-
[PlayerType.BETHANY] = {CollectibleType.BOOK_OF_VIRTUES},
|
|
22064
|
-
[PlayerType.JACOB] = {},
|
|
22065
|
-
[PlayerType.ESAU] = {},
|
|
22066
|
-
[PlayerType.ISAAC_B] = {},
|
|
22067
|
-
[PlayerType.MAGDALENE_B] = {CollectibleType.YUM_HEART},
|
|
22068
|
-
[PlayerType.CAIN_B] = {CollectibleType.BAG_OF_CRAFTING},
|
|
22069
|
-
[PlayerType.JUDAS_B] = {CollectibleType.DARK_ARTS},
|
|
22070
|
-
[PlayerType.BLUE_BABY_B] = {CollectibleType.HOLD},
|
|
22071
|
-
[PlayerType.EVE_B] = {CollectibleType.SUMPTORIUM},
|
|
22072
|
-
[PlayerType.SAMSON_B] = {},
|
|
22073
|
-
[PlayerType.AZAZEL_B] = {},
|
|
22074
|
-
[PlayerType.LAZARUS_B] = {CollectibleType.FLIP},
|
|
22075
|
-
[PlayerType.EDEN_B] = {},
|
|
22076
|
-
[PlayerType.LOST_B] = {},
|
|
22077
|
-
[PlayerType.LILITH_B] = {},
|
|
22078
|
-
[PlayerType.KEEPER_B] = {},
|
|
22079
|
-
[PlayerType.APOLLYON_B] = {CollectibleType.ABYSS},
|
|
22080
|
-
[PlayerType.FORGOTTEN_B] = {},
|
|
22081
|
-
[PlayerType.BETHANY_B] = {CollectibleType.LEMEGETON},
|
|
22082
|
-
[PlayerType.JACOB_B] = {CollectibleType.ANIMA_SOLA},
|
|
22083
|
-
[PlayerType.LAZARUS_2_B] = {CollectibleType.FLIP},
|
|
22084
|
-
[PlayerType.JACOB_2_B] = {CollectibleType.ANIMA_SOLA},
|
|
22085
|
-
[PlayerType.SOUL_B] = {}
|
|
22086
|
-
}
|
|
22087
|
-
return ____exports
|
|
22088
|
-
end,
|
|
22089
|
-
["src.sets.charactersThatStartWithAnActiveItemSet"] = function(...)
|
|
22090
|
-
local ____lualib = require("lualib_bundle")
|
|
22091
|
-
local __TS__New = ____lualib.__TS__New
|
|
22092
|
-
local ____exports = {}
|
|
22093
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22094
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22095
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22096
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22097
|
-
____exports.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = __TS__New(ReadonlySet, {
|
|
22098
|
-
PlayerType.ISAAC,
|
|
22099
|
-
PlayerType.MAGDALENE,
|
|
22100
|
-
PlayerType.JUDAS,
|
|
22101
|
-
PlayerType.BLUE_BABY,
|
|
22102
|
-
PlayerType.EVE,
|
|
22103
|
-
PlayerType.EDEN,
|
|
22104
|
-
PlayerType.LOST,
|
|
22105
|
-
PlayerType.LILITH,
|
|
22106
|
-
PlayerType.KEEPER,
|
|
22107
|
-
PlayerType.APOLLYON,
|
|
22108
|
-
PlayerType.EDEN_B
|
|
22109
|
-
})
|
|
22110
|
-
return ____exports
|
|
22111
|
-
end,
|
|
22112
|
-
["src.sets.charactersWithBlackHeartFromEternalHeartSet"] = function(...)
|
|
22113
|
-
local ____lualib = require("lualib_bundle")
|
|
22114
|
-
local __TS__New = ____lualib.__TS__New
|
|
22115
|
-
local ____exports = {}
|
|
22116
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22117
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22118
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22119
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22120
|
-
____exports.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = __TS__New(ReadonlySet, {PlayerType.DARK_JUDAS, PlayerType.JUDAS_B})
|
|
22121
|
-
return ____exports
|
|
22122
|
-
end,
|
|
22123
|
-
["src.sets.charactersWithFreeDevilDealsSet"] = function(...)
|
|
22124
|
-
local ____lualib = require("lualib_bundle")
|
|
22125
|
-
local __TS__New = ____lualib.__TS__New
|
|
22126
|
-
local ____exports = {}
|
|
22127
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22128
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22129
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22130
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22131
|
-
____exports.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = __TS__New(ReadonlySet, {PlayerType.LOST, PlayerType.LOST_B, PlayerType.JACOB_2_B})
|
|
22132
|
-
return ____exports
|
|
22133
|
-
end,
|
|
22134
|
-
["src.sets.charactersWithNoRedHeartsSet"] = function(...)
|
|
22135
|
-
local ____lualib = require("lualib_bundle")
|
|
22136
|
-
local __TS__New = ____lualib.__TS__New
|
|
22137
|
-
local ____exports = {}
|
|
22138
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22139
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22140
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22141
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22142
|
-
____exports.CHARACTERS_WITH_NO_RED_HEARTS_SET = __TS__New(ReadonlySet, {
|
|
22143
|
-
PlayerType.BLUE_BABY,
|
|
22144
|
-
PlayerType.LOST,
|
|
22145
|
-
PlayerType.DARK_JUDAS,
|
|
22146
|
-
PlayerType.JUDAS_B,
|
|
22147
|
-
PlayerType.BLUE_BABY_B,
|
|
22148
|
-
PlayerType.LOST_B,
|
|
22149
|
-
PlayerType.FORGOTTEN_B,
|
|
22150
|
-
PlayerType.BETHANY_B
|
|
22151
|
-
})
|
|
22152
|
-
return ____exports
|
|
22153
|
-
end,
|
|
22154
|
-
["src.sets.charactersWithNoSoulHeartsSet"] = function(...)
|
|
22155
|
-
local ____lualib = require("lualib_bundle")
|
|
22156
|
-
local __TS__New = ____lualib.__TS__New
|
|
22157
|
-
local ____exports = {}
|
|
22158
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22159
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22160
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22161
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22162
|
-
____exports.CHARACTERS_WITH_NO_SOUL_HEARTS_SET = __TS__New(ReadonlySet, {
|
|
22163
|
-
PlayerType.LOST,
|
|
22164
|
-
PlayerType.KEEPER,
|
|
22165
|
-
PlayerType.BETHANY,
|
|
22166
|
-
PlayerType.LOST_B,
|
|
22167
|
-
PlayerType.KEEPER_B
|
|
22168
|
-
})
|
|
22169
|
-
return ____exports
|
|
22170
|
-
end,
|
|
22171
|
-
["src.sets.lostStyleCharactersSet"] = function(...)
|
|
22172
|
-
local ____lualib = require("lualib_bundle")
|
|
22173
|
-
local __TS__New = ____lualib.__TS__New
|
|
22174
|
-
local ____exports = {}
|
|
22175
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22176
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22177
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22178
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22179
|
-
____exports.LOST_STYLE_CHARACTERS_SET = __TS__New(ReadonlySet, {
|
|
22180
|
-
PlayerType.LOST,
|
|
22181
|
-
PlayerType.SOUL,
|
|
22182
|
-
PlayerType.LOST_B,
|
|
22183
|
-
PlayerType.JACOB_2_B,
|
|
22184
|
-
PlayerType.SOUL_B
|
|
22185
|
-
})
|
|
22186
|
-
return ____exports
|
|
22187
|
-
end,
|
|
22188
|
-
["src.functions.characters"] = function(...)
|
|
22189
|
-
local ____lualib = require("lualib_bundle")
|
|
22190
|
-
local __TS__New = ____lualib.__TS__New
|
|
22191
|
-
local ____exports = {}
|
|
22192
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22193
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22194
|
-
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
22195
|
-
local LAST_VANILLA_CHARACTER = ____constantsFirstLast.LAST_VANILLA_CHARACTER
|
|
22196
|
-
local ____characterDamageMultipliers = require("src.objects.characterDamageMultipliers")
|
|
22197
|
-
local CHARACTER_DAMAGE_MULTIPLIERS = ____characterDamageMultipliers.CHARACTER_DAMAGE_MULTIPLIERS
|
|
22198
|
-
local ____characterNames = require("src.objects.characterNames")
|
|
22199
|
-
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
22200
|
-
local ____characterStartingCollectibles = require("src.objects.characterStartingCollectibles")
|
|
22201
|
-
local CHARACTER_STARTING_COLLECTIBLES = ____characterStartingCollectibles.CHARACTER_STARTING_COLLECTIBLES
|
|
22202
|
-
local ____charactersThatStartWithAnActiveItemSet = require("src.sets.charactersThatStartWithAnActiveItemSet")
|
|
22203
|
-
local CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = ____charactersThatStartWithAnActiveItemSet.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET
|
|
22204
|
-
local ____charactersWithBlackHeartFromEternalHeartSet = require("src.sets.charactersWithBlackHeartFromEternalHeartSet")
|
|
22205
|
-
local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = ____charactersWithBlackHeartFromEternalHeartSet.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET
|
|
22206
|
-
local ____charactersWithFreeDevilDealsSet = require("src.sets.charactersWithFreeDevilDealsSet")
|
|
22207
|
-
local CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = ____charactersWithFreeDevilDealsSet.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET
|
|
22208
|
-
local ____charactersWithNoRedHeartsSet = require("src.sets.charactersWithNoRedHeartsSet")
|
|
22209
|
-
local CHARACTERS_WITH_NO_RED_HEARTS_SET = ____charactersWithNoRedHeartsSet.CHARACTERS_WITH_NO_RED_HEARTS_SET
|
|
22210
|
-
local ____charactersWithNoSoulHeartsSet = require("src.sets.charactersWithNoSoulHeartsSet")
|
|
22211
|
-
local CHARACTERS_WITH_NO_SOUL_HEARTS_SET = ____charactersWithNoSoulHeartsSet.CHARACTERS_WITH_NO_SOUL_HEARTS_SET
|
|
22212
|
-
local ____lostStyleCharactersSet = require("src.sets.lostStyleCharactersSet")
|
|
22213
|
-
local LOST_STYLE_CHARACTERS_SET = ____lostStyleCharactersSet.LOST_STYLE_CHARACTERS_SET
|
|
22214
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22215
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22216
|
-
function ____exports.isModdedCharacter(self, character)
|
|
22217
|
-
return not ____exports.isVanillaCharacter(nil, character)
|
|
22218
|
-
end
|
|
22219
|
-
function ____exports.isVanillaCharacter(self, character)
|
|
22220
|
-
return character <= LAST_VANILLA_CHARACTER
|
|
22221
|
-
end
|
|
22222
|
-
local FLYING_CHARACTERS = __TS__New(ReadonlySet, {
|
|
22223
|
-
PlayerType.AZAZEL,
|
|
22224
|
-
PlayerType.LOST,
|
|
22225
|
-
PlayerType.SOUL,
|
|
22226
|
-
PlayerType.LOST_B,
|
|
22227
|
-
PlayerType.JACOB_2_B,
|
|
22228
|
-
PlayerType.SOUL_B
|
|
22229
|
-
})
|
|
22230
|
-
function ____exports.characterCanHaveRedHearts(self, character)
|
|
22231
|
-
return not CHARACTERS_WITH_NO_RED_HEARTS_SET:has(character)
|
|
22232
|
-
end
|
|
22233
|
-
function ____exports.characterCanHaveSoulHearts(self, character)
|
|
22234
|
-
return not CHARACTERS_WITH_NO_SOUL_HEARTS_SET:has(character)
|
|
22235
|
-
end
|
|
22236
|
-
function ____exports.characterCanTakeFreeDevilDeals(self, character)
|
|
22237
|
-
return CHARACTERS_WITH_FREE_DEVIL_DEALS_SET:has(character)
|
|
22238
|
-
end
|
|
22239
|
-
function ____exports.characterGetsBlackHeartFromEternalHeart(self, character)
|
|
22240
|
-
return CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET:has(character)
|
|
22241
|
-
end
|
|
22242
|
-
function ____exports.characterStartsWithActiveItem(self, character)
|
|
22243
|
-
return CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET:has(character)
|
|
22244
|
-
end
|
|
22245
|
-
function ____exports.getCharacterDamageMultiplier(self, character, hasWhoreOfBabylon)
|
|
22246
|
-
if hasWhoreOfBabylon == nil then
|
|
22247
|
-
hasWhoreOfBabylon = false
|
|
22248
|
-
end
|
|
22249
|
-
if character == PlayerType.EVE and hasWhoreOfBabylon then
|
|
22250
|
-
return 1
|
|
22251
|
-
end
|
|
22252
|
-
return CHARACTER_DAMAGE_MULTIPLIERS[character]
|
|
22253
|
-
end
|
|
22254
|
-
function ____exports.getCharacterDeathAnimationName(self, character)
|
|
22255
|
-
if LOST_STYLE_CHARACTERS_SET:has(character) then
|
|
22256
|
-
return "LostDeath"
|
|
22257
|
-
end
|
|
22258
|
-
if character == PlayerType.FORGOTTEN_B then
|
|
22259
|
-
return "ForgottenDeath"
|
|
22260
|
-
end
|
|
22261
|
-
return "Death"
|
|
22262
|
-
end
|
|
22263
|
-
function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
22264
|
-
if character == PlayerType.KEEPER then
|
|
22265
|
-
return 3
|
|
22266
|
-
end
|
|
22267
|
-
if character == PlayerType.FORGOTTEN then
|
|
22268
|
-
return 6
|
|
22269
|
-
end
|
|
22270
|
-
if character == PlayerType.SOUL then
|
|
22271
|
-
return 6
|
|
22272
|
-
end
|
|
22273
|
-
if character == PlayerType.KEEPER_B then
|
|
22274
|
-
return 2
|
|
22275
|
-
end
|
|
22276
|
-
return 12
|
|
22277
|
-
end
|
|
22278
|
-
function ____exports.getCharacterName(self, character)
|
|
22279
|
-
if ____exports.isModdedCharacter(nil, character) then
|
|
22280
|
-
return "Unknown"
|
|
22281
|
-
end
|
|
22282
|
-
return CHARACTER_NAMES[character]
|
|
22283
|
-
end
|
|
22284
|
-
function ____exports.getCharacterStartingCollectibles(self, character)
|
|
22285
|
-
return CHARACTER_STARTING_COLLECTIBLES[character]
|
|
22286
|
-
end
|
|
22287
|
-
function ____exports.isFlyingCharacter(self, player)
|
|
22288
|
-
local character = player:GetPlayerType()
|
|
22289
|
-
return FLYING_CHARACTERS:has(character)
|
|
22290
|
-
end
|
|
22291
|
-
return ____exports
|
|
22292
|
-
end,
|
|
22293
|
-
["src.functions.players"] = function(...)
|
|
22294
|
-
local ____lualib = require("lualib_bundle")
|
|
22295
|
-
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
22296
|
-
local __TS__New = ____lualib.__TS__New
|
|
22297
|
-
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
22298
|
-
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
22299
|
-
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
22300
|
-
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
22301
|
-
local ____exports = {}
|
|
22302
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22303
|
-
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
22304
|
-
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
22305
|
-
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
22306
|
-
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
22307
|
-
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
22308
|
-
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
22309
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
22310
|
-
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
22311
|
-
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
22312
|
-
local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
|
|
22313
|
-
local TRINKET_SLOT_VALUES = ____cachedEnumValues.TRINKET_SLOT_VALUES
|
|
22314
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
22315
|
-
local game = ____cachedClasses.game
|
|
22316
|
-
local itemConfig = ____cachedClasses.itemConfig
|
|
22317
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22318
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22319
|
-
local ____array = require("src.functions.array")
|
|
22320
|
-
local getLastElement = ____array.getLastElement
|
|
22321
|
-
local sumArray = ____array.sumArray
|
|
22322
|
-
local ____characters = require("src.functions.characters")
|
|
22323
|
-
local getCharacterName = ____characters.getCharacterName
|
|
22324
|
-
local isVanillaCharacter = ____characters.isVanillaCharacter
|
|
22325
|
-
local ____collectibles = require("src.functions.collectibles")
|
|
22326
|
-
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
22327
|
-
local ____playerIndex = require("src.functions.playerIndex")
|
|
22328
|
-
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
22329
|
-
local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
|
|
22330
|
-
local getPlayers = ____playerIndex.getPlayers
|
|
22331
|
-
local ____types = require("src.functions.types")
|
|
22332
|
-
local isNumber = ____types.isNumber
|
|
22333
|
-
local ____utils = require("src.functions.utils")
|
|
22334
|
-
local ____repeat = ____utils["repeat"]
|
|
22335
|
-
function ____exports.getCharacters(self)
|
|
22336
|
-
local players = getPlayers(nil)
|
|
22337
|
-
return __TS__ArrayMap(
|
|
22338
|
-
players,
|
|
22339
|
-
function(____, player) return player:GetPlayerType() end
|
|
22340
|
-
)
|
|
22341
|
-
end
|
|
22342
|
-
function ____exports.isCharacter(self, player, ...)
|
|
22343
|
-
local characters = {...}
|
|
22344
|
-
local characterSet = __TS__New(ReadonlySet, characters)
|
|
22345
|
-
local character = player:GetPlayerType()
|
|
22346
|
-
return characterSet:has(character)
|
|
21586
|
+
function ____exports.isCharacter(self, player, ...)
|
|
21587
|
+
local characters = {...}
|
|
21588
|
+
local characterSet = __TS__New(ReadonlySet, characters)
|
|
21589
|
+
local character = player:GetPlayerType()
|
|
21590
|
+
return characterSet:has(character)
|
|
22347
21591
|
end
|
|
22348
21592
|
function ____exports.isModdedPlayer(self, player)
|
|
22349
21593
|
return not ____exports.isVanillaPlayer(nil, player)
|
|
@@ -22940,209 +22184,808 @@ function PostCursedTeleport.prototype.setDamageFrame(self, player, damageFlags)
|
|
|
22940
22184
|
return
|
|
22941
22185
|
end
|
|
22942
22186
|
end
|
|
22943
|
-
if self:isPotentialNaturalTeleportFromSacrificeRoom(damageFlags) then
|
|
22944
|
-
return
|
|
22187
|
+
if self:isPotentialNaturalTeleportFromSacrificeRoom(damageFlags) then
|
|
22188
|
+
return
|
|
22189
|
+
end
|
|
22190
|
+
local newTrackingArray = {gameFrameCount, false}
|
|
22191
|
+
mapSetPlayer(nil, v.run.playersDamageFrameMap, player, newTrackingArray)
|
|
22192
|
+
end
|
|
22193
|
+
function PostCursedTeleport.prototype.isPotentialNaturalTeleportFromSacrificeRoom(self, damageFlags)
|
|
22194
|
+
local room = game:GetRoom()
|
|
22195
|
+
local roomType = room:GetType()
|
|
22196
|
+
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
|
|
22197
|
+
return roomType == RoomType.SACRIFICE and isSpikeDamage and (v.level.numSacrifices == 6 or v.level.numSacrifices >= 12)
|
|
22198
|
+
end
|
|
22199
|
+
function PostCursedTeleport.prototype.playerIsTeleportingFromCursedTeleport(self, player, lastDamageFrame)
|
|
22200
|
+
local gameFrameCount = game:GetFrameCount()
|
|
22201
|
+
if gameFrameCount ~= lastDamageFrame then
|
|
22202
|
+
return false
|
|
22203
|
+
end
|
|
22204
|
+
local sprite = player:GetSprite()
|
|
22205
|
+
if not sprite:IsPlaying("TeleportUp") or sprite:GetFrame() ~= 1 then
|
|
22206
|
+
return false
|
|
22207
|
+
end
|
|
22208
|
+
if player:HasCollectible(CollectibleType.CURSED_EYE) then
|
|
22209
|
+
return true
|
|
22210
|
+
end
|
|
22211
|
+
local numHitsRemaining = getPlayerNumHitsRemaining(nil, player)
|
|
22212
|
+
if player:HasTrinket(TrinketType.CURSED_SKULL) and numHitsRemaining == 1 then
|
|
22213
|
+
return true
|
|
22214
|
+
end
|
|
22215
|
+
return false
|
|
22216
|
+
end
|
|
22217
|
+
return ____exports
|
|
22218
|
+
end,
|
|
22219
|
+
["src.classes.callbacks.PostCustomRevive"] = function(...)
|
|
22220
|
+
local ____lualib = require("lualib_bundle")
|
|
22221
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
22222
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
22223
|
+
local ____exports = {}
|
|
22224
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
22225
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
22226
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
22227
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
22228
|
+
____exports.PostCustomRevive = __TS__Class()
|
|
22229
|
+
local PostCustomRevive = ____exports.PostCustomRevive
|
|
22230
|
+
PostCustomRevive.name = "PostCustomRevive"
|
|
22231
|
+
__TS__ClassExtends(PostCustomRevive, CustomCallback)
|
|
22232
|
+
function PostCustomRevive.prototype.____constructor(self)
|
|
22233
|
+
CustomCallback.prototype.____constructor(self)
|
|
22234
|
+
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
22235
|
+
local _player, revivalType = table.unpack(fireArgs)
|
|
22236
|
+
local callbackRevivalType = table.unpack(optionalArgs)
|
|
22237
|
+
return callbackRevivalType == nil or revivalType == callbackRevivalType
|
|
22238
|
+
end
|
|
22239
|
+
self.featuresUsed = {ISCFeature.CUSTOM_REVIVE}
|
|
22240
|
+
end
|
|
22241
|
+
return ____exports
|
|
22242
|
+
end,
|
|
22243
|
+
["src.functions.math"] = function(...)
|
|
22244
|
+
local ____exports = {}
|
|
22245
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22246
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
22247
|
+
local ____direction = require("src.functions.direction")
|
|
22248
|
+
local directionToVector = ____direction.directionToVector
|
|
22249
|
+
function ____exports.clamp(self, x, min, max)
|
|
22250
|
+
return math.max(
|
|
22251
|
+
min,
|
|
22252
|
+
math.min(x, max)
|
|
22253
|
+
)
|
|
22254
|
+
end
|
|
22255
|
+
function ____exports.getAngleDifference(self, angle1, angle2)
|
|
22256
|
+
local subtractedAngle = angle1 - angle2
|
|
22257
|
+
return (subtractedAngle + 180) % 360 - 180
|
|
22258
|
+
end
|
|
22259
|
+
function ____exports.getCircleDiscretizedPoints(self, centerPos, radius, numPoints, xMultiplier, yMultiplier, initialDirection)
|
|
22260
|
+
if xMultiplier == nil then
|
|
22261
|
+
xMultiplier = 1
|
|
22262
|
+
end
|
|
22263
|
+
if yMultiplier == nil then
|
|
22264
|
+
yMultiplier = 1
|
|
22265
|
+
end
|
|
22266
|
+
if initialDirection == nil then
|
|
22267
|
+
initialDirection = Direction.UP
|
|
22268
|
+
end
|
|
22269
|
+
local vector = directionToVector(nil, initialDirection)
|
|
22270
|
+
local initialPosition = vector * radius
|
|
22271
|
+
local positions = {}
|
|
22272
|
+
do
|
|
22273
|
+
local i = 0
|
|
22274
|
+
while i < numPoints do
|
|
22275
|
+
local rotatedPosition = initialPosition:Rotated(i * 360 / numPoints)
|
|
22276
|
+
rotatedPosition.X = rotatedPosition.X * xMultiplier
|
|
22277
|
+
rotatedPosition.Y = rotatedPosition.Y * yMultiplier
|
|
22278
|
+
local positionFromCenter = centerPos + rotatedPosition
|
|
22279
|
+
positions[#positions + 1] = positionFromCenter
|
|
22280
|
+
i = i + 1
|
|
22281
|
+
end
|
|
22282
|
+
end
|
|
22283
|
+
return positions
|
|
22284
|
+
end
|
|
22285
|
+
function ____exports.inRectangle(self, position, topLeft, bottomRight)
|
|
22286
|
+
return position.X >= topLeft.X and position.X <= bottomRight.X and position.Y >= topLeft.Y and position.Y <= bottomRight.Y
|
|
22287
|
+
end
|
|
22288
|
+
function ____exports.isCircleIntersectingRectangle(self, circleCenter, circleRadius, rectangleTopLeft, rectangleBottomRight)
|
|
22289
|
+
local nearestX = math.max(
|
|
22290
|
+
rectangleTopLeft.X,
|
|
22291
|
+
math.min(circleCenter.X, rectangleBottomRight.X)
|
|
22292
|
+
)
|
|
22293
|
+
local nearestY = math.max(
|
|
22294
|
+
rectangleTopLeft.Y,
|
|
22295
|
+
math.min(circleCenter.Y, rectangleBottomRight.Y)
|
|
22296
|
+
)
|
|
22297
|
+
local nearestPointToCircleOnRectangle = Vector(nearestX, nearestY)
|
|
22298
|
+
local distanceToCenterOfCircle = nearestPointToCircleOnRectangle:Distance(circleCenter)
|
|
22299
|
+
return distanceToCenterOfCircle <= circleRadius
|
|
22300
|
+
end
|
|
22301
|
+
function ____exports.isEven(self, num)
|
|
22302
|
+
return num & 1 == 0
|
|
22303
|
+
end
|
|
22304
|
+
function ____exports.isOdd(self, num)
|
|
22305
|
+
return num & 1 == 1
|
|
22306
|
+
end
|
|
22307
|
+
function ____exports.lerp(self, a, b, pos)
|
|
22308
|
+
return a + (b - a) * pos
|
|
22309
|
+
end
|
|
22310
|
+
function ____exports.lerpAngleDegrees(self, aStart, aEnd, percent)
|
|
22311
|
+
return aStart + ____exports.getAngleDifference(nil, aStart, aEnd) * percent
|
|
22312
|
+
end
|
|
22313
|
+
function ____exports.round(self, num, numDecimalPlaces)
|
|
22314
|
+
if numDecimalPlaces == nil then
|
|
22315
|
+
numDecimalPlaces = 0
|
|
22316
|
+
end
|
|
22317
|
+
local roundedNum = tonumber(string.format(
|
|
22318
|
+
("%." .. tostring(numDecimalPlaces)) .. "f",
|
|
22319
|
+
num
|
|
22320
|
+
))
|
|
22321
|
+
return roundedNum == nil and 0 or roundedNum
|
|
22322
|
+
end
|
|
22323
|
+
function ____exports.sign(self, n)
|
|
22324
|
+
if n > 0 then
|
|
22325
|
+
return 1
|
|
22326
|
+
end
|
|
22327
|
+
if n < 0 then
|
|
22328
|
+
return -1
|
|
22329
|
+
end
|
|
22330
|
+
return 0
|
|
22331
|
+
end
|
|
22332
|
+
function ____exports.tanh(self, x)
|
|
22333
|
+
return (math.exp(x) - math.exp(-x)) / (math.exp(x) + math.exp(-x))
|
|
22334
|
+
end
|
|
22335
|
+
return ____exports
|
|
22336
|
+
end,
|
|
22337
|
+
["src.functions.effects"] = function(...)
|
|
22338
|
+
local ____exports = {}
|
|
22339
|
+
local ____math = require("src.functions.math")
|
|
22340
|
+
local inRectangle = ____math.inRectangle
|
|
22341
|
+
____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75
|
|
22342
|
+
function ____exports.isCloseEnoughToTriggerDiceFloor(self, player, diceFloor)
|
|
22343
|
+
local topLeft = diceFloor.Position + Vector(-____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE, -____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE)
|
|
22344
|
+
local bottomRight = diceFloor.Position + Vector(____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE, ____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE)
|
|
22345
|
+
return inRectangle(nil, player.Position, topLeft, bottomRight)
|
|
22346
|
+
end
|
|
22347
|
+
return ____exports
|
|
22348
|
+
end,
|
|
22349
|
+
["src.classes.callbacks.PostDiceRoomActivated"] = function(...)
|
|
22350
|
+
local ____lualib = require("lualib_bundle")
|
|
22351
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
22352
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
22353
|
+
local ____exports = {}
|
|
22354
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22355
|
+
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
22356
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
22357
|
+
local ____effects = require("src.functions.effects")
|
|
22358
|
+
local isCloseEnoughToTriggerDiceFloor = ____effects.isCloseEnoughToTriggerDiceFloor
|
|
22359
|
+
local ____players = require("src.functions.players")
|
|
22360
|
+
local getClosestPlayer = ____players.getClosestPlayer
|
|
22361
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
22362
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
22363
|
+
local v = {room = {diceRoomActivated = false}}
|
|
22364
|
+
____exports.PostDiceRoomActivated = __TS__Class()
|
|
22365
|
+
local PostDiceRoomActivated = ____exports.PostDiceRoomActivated
|
|
22366
|
+
PostDiceRoomActivated.name = "PostDiceRoomActivated"
|
|
22367
|
+
__TS__ClassExtends(PostDiceRoomActivated, CustomCallback)
|
|
22368
|
+
function PostDiceRoomActivated.prototype.____constructor(self)
|
|
22369
|
+
CustomCallback.prototype.____constructor(self)
|
|
22370
|
+
self.v = v
|
|
22371
|
+
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
22372
|
+
local _player, diceFloorSubType = table.unpack(fireArgs)
|
|
22373
|
+
local callbackDiceFloorSubType = table.unpack(optionalArgs)
|
|
22374
|
+
return callbackDiceFloorSubType == nil or diceFloorSubType == callbackDiceFloorSubType
|
|
22375
|
+
end
|
|
22376
|
+
self.postEffectUpdateDiceFloor = function(____, effect)
|
|
22377
|
+
if v.room.diceRoomActivated then
|
|
22378
|
+
return
|
|
22379
|
+
end
|
|
22380
|
+
if effect.FrameCount == 0 then
|
|
22381
|
+
return
|
|
22382
|
+
end
|
|
22383
|
+
local closestPlayer = getClosestPlayer(nil, effect.Position)
|
|
22384
|
+
if isCloseEnoughToTriggerDiceFloor(nil, closestPlayer, effect) then
|
|
22385
|
+
v.room.diceRoomActivated = true
|
|
22386
|
+
self:fire(closestPlayer, effect.SubType)
|
|
22387
|
+
end
|
|
22388
|
+
end
|
|
22389
|
+
self.callbacksUsed = {{ModCallback.POST_EFFECT_UPDATE, self.postEffectUpdateDiceFloor, {EffectVariant.DICE_FLOOR}}}
|
|
22390
|
+
end
|
|
22391
|
+
return ____exports
|
|
22392
|
+
end,
|
|
22393
|
+
["src.objects.doorSlotFlagToDoorSlot"] = function(...)
|
|
22394
|
+
local ____exports = {}
|
|
22395
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22396
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22397
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
22398
|
+
____exports.DEFAULT_DOOR_SLOT = DoorSlot.NO_DOOR_SLOT
|
|
22399
|
+
____exports.DOOR_SLOT_FLAG_TO_DOOR_SLOT = {
|
|
22400
|
+
[DoorSlotFlag.LEFT_0] = DoorSlot.LEFT_0,
|
|
22401
|
+
[DoorSlotFlag.UP_0] = DoorSlot.UP_0,
|
|
22402
|
+
[DoorSlotFlag.RIGHT_0] = DoorSlot.RIGHT_0,
|
|
22403
|
+
[DoorSlotFlag.DOWN_0] = DoorSlot.DOWN_0,
|
|
22404
|
+
[DoorSlotFlag.LEFT_1] = DoorSlot.LEFT_1,
|
|
22405
|
+
[DoorSlotFlag.UP_1] = DoorSlot.UP_1,
|
|
22406
|
+
[DoorSlotFlag.RIGHT_1] = DoorSlot.RIGHT_1,
|
|
22407
|
+
[DoorSlotFlag.DOWN_1] = DoorSlot.DOWN_1
|
|
22408
|
+
}
|
|
22409
|
+
return ____exports
|
|
22410
|
+
end,
|
|
22411
|
+
["src.objects.doorSlotToDirection"] = function(...)
|
|
22412
|
+
local ____exports = {}
|
|
22413
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22414
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
22415
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22416
|
+
____exports.DOOR_SLOT_TO_DIRECTION = {
|
|
22417
|
+
[DoorSlot.NO_DOOR_SLOT] = Direction.NO_DIRECTION,
|
|
22418
|
+
[DoorSlot.LEFT_0] = Direction.LEFT,
|
|
22419
|
+
[DoorSlot.UP_0] = Direction.UP,
|
|
22420
|
+
[DoorSlot.RIGHT_0] = Direction.RIGHT,
|
|
22421
|
+
[DoorSlot.DOWN_0] = Direction.DOWN,
|
|
22422
|
+
[DoorSlot.LEFT_1] = Direction.LEFT,
|
|
22423
|
+
[DoorSlot.UP_1] = Direction.UP,
|
|
22424
|
+
[DoorSlot.RIGHT_1] = Direction.RIGHT,
|
|
22425
|
+
[DoorSlot.DOWN_1] = Direction.DOWN
|
|
22426
|
+
}
|
|
22427
|
+
return ____exports
|
|
22428
|
+
end,
|
|
22429
|
+
["src.objects.doorSlotToDoorSlotFlag"] = function(...)
|
|
22430
|
+
local ____exports = {}
|
|
22431
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22432
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22433
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
22434
|
+
local DoorSlotFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlagZero
|
|
22435
|
+
____exports.DOOR_SLOT_TO_DOOR_SLOT_FLAG = {
|
|
22436
|
+
[DoorSlot.NO_DOOR_SLOT] = DoorSlotFlagZero,
|
|
22437
|
+
[DoorSlot.LEFT_0] = DoorSlotFlag.LEFT_0,
|
|
22438
|
+
[DoorSlot.UP_0] = DoorSlotFlag.UP_0,
|
|
22439
|
+
[DoorSlot.RIGHT_0] = DoorSlotFlag.RIGHT_0,
|
|
22440
|
+
[DoorSlot.DOWN_0] = DoorSlotFlag.DOWN_0,
|
|
22441
|
+
[DoorSlot.LEFT_1] = DoorSlotFlag.LEFT_1,
|
|
22442
|
+
[DoorSlot.UP_1] = DoorSlotFlag.UP_1,
|
|
22443
|
+
[DoorSlot.RIGHT_1] = DoorSlotFlag.RIGHT_1,
|
|
22444
|
+
[DoorSlot.DOWN_1] = DoorSlotFlag.DOWN_1
|
|
22445
|
+
}
|
|
22446
|
+
return ____exports
|
|
22447
|
+
end,
|
|
22448
|
+
["src.objects.oppositeDoorSlots"] = function(...)
|
|
22449
|
+
local ____exports = {}
|
|
22450
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22451
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22452
|
+
____exports.OPPOSITE_DOOR_SLOTS = {
|
|
22453
|
+
[DoorSlot.NO_DOOR_SLOT] = nil,
|
|
22454
|
+
[DoorSlot.LEFT_0] = DoorSlot.RIGHT_0,
|
|
22455
|
+
[DoorSlot.UP_0] = DoorSlot.DOWN_0,
|
|
22456
|
+
[DoorSlot.RIGHT_0] = DoorSlot.LEFT_0,
|
|
22457
|
+
[DoorSlot.DOWN_0] = DoorSlot.UP_0,
|
|
22458
|
+
[DoorSlot.LEFT_1] = DoorSlot.RIGHT_1,
|
|
22459
|
+
[DoorSlot.UP_1] = DoorSlot.DOWN_1,
|
|
22460
|
+
[DoorSlot.RIGHT_1] = DoorSlot.LEFT_1,
|
|
22461
|
+
[DoorSlot.DOWN_1] = DoorSlot.UP_1
|
|
22462
|
+
}
|
|
22463
|
+
return ____exports
|
|
22464
|
+
end,
|
|
22465
|
+
["src.objects.roomShapeToDoorSlotCoordinates"] = function(...)
|
|
22466
|
+
local ____exports = {}
|
|
22467
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22468
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22469
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
22470
|
+
____exports.ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES = {
|
|
22471
|
+
[RoomShape.SHAPE_1x1] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.UP_0] = {6, -1}, [DoorSlot.RIGHT_0] = {13, 3}, [DoorSlot.DOWN_0] = {6, 7}},
|
|
22472
|
+
[RoomShape.IH] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.RIGHT_0] = {13, 3}},
|
|
22473
|
+
[RoomShape.IV] = {[DoorSlot.UP_0] = {6, -1}, [DoorSlot.DOWN_0] = {6, 7}},
|
|
22474
|
+
[RoomShape.SHAPE_1x2] = {
|
|
22475
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22476
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22477
|
+
[DoorSlot.RIGHT_0] = {13, 3},
|
|
22478
|
+
[DoorSlot.DOWN_0] = {6, 14},
|
|
22479
|
+
[DoorSlot.LEFT_1] = {-1, 10},
|
|
22480
|
+
[DoorSlot.RIGHT_1] = {13, 10}
|
|
22481
|
+
},
|
|
22482
|
+
[RoomShape.IIV] = {[DoorSlot.UP_0] = {6, -1}, [DoorSlot.DOWN_0] = {6, 14}},
|
|
22483
|
+
[RoomShape.SHAPE_2x1] = {
|
|
22484
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22485
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22486
|
+
[DoorSlot.RIGHT_0] = {26, 3},
|
|
22487
|
+
[DoorSlot.DOWN_0] = {6, 7},
|
|
22488
|
+
[DoorSlot.UP_1] = {19, -1},
|
|
22489
|
+
[DoorSlot.DOWN_1] = {19, 7}
|
|
22490
|
+
},
|
|
22491
|
+
[RoomShape.IIH] = {[DoorSlot.LEFT_0] = {-1, 3}, [DoorSlot.RIGHT_0] = {26, 3}},
|
|
22492
|
+
[RoomShape.SHAPE_2x2] = {
|
|
22493
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22494
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22495
|
+
[DoorSlot.RIGHT_0] = {26, 3},
|
|
22496
|
+
[DoorSlot.DOWN_0] = {6, 14},
|
|
22497
|
+
[DoorSlot.LEFT_1] = {-1, 10},
|
|
22498
|
+
[DoorSlot.UP_1] = {19, -1},
|
|
22499
|
+
[DoorSlot.RIGHT_1] = {26, 10},
|
|
22500
|
+
[DoorSlot.DOWN_1] = {19, 14}
|
|
22501
|
+
},
|
|
22502
|
+
[RoomShape.LTL] = {
|
|
22503
|
+
[DoorSlot.LEFT_0] = {12, 3},
|
|
22504
|
+
[DoorSlot.UP_0] = {6, 6},
|
|
22505
|
+
[DoorSlot.RIGHT_0] = {26, 3},
|
|
22506
|
+
[DoorSlot.DOWN_0] = {6, 14},
|
|
22507
|
+
[DoorSlot.LEFT_1] = {-1, 10},
|
|
22508
|
+
[DoorSlot.UP_1] = {19, -1},
|
|
22509
|
+
[DoorSlot.RIGHT_1] = {26, 10},
|
|
22510
|
+
[DoorSlot.DOWN_1] = {19, 14}
|
|
22511
|
+
},
|
|
22512
|
+
[RoomShape.LTR] = {
|
|
22513
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22514
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22515
|
+
[DoorSlot.RIGHT_0] = {13, 3},
|
|
22516
|
+
[DoorSlot.DOWN_0] = {6, 14},
|
|
22517
|
+
[DoorSlot.LEFT_1] = {-1, 10},
|
|
22518
|
+
[DoorSlot.UP_1] = {19, 6},
|
|
22519
|
+
[DoorSlot.RIGHT_1] = {26, 10},
|
|
22520
|
+
[DoorSlot.DOWN_1] = {19, 14}
|
|
22521
|
+
},
|
|
22522
|
+
[RoomShape.LBL] = {
|
|
22523
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22524
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22525
|
+
[DoorSlot.RIGHT_0] = {26, 3},
|
|
22526
|
+
[DoorSlot.DOWN_0] = {6, 7},
|
|
22527
|
+
[DoorSlot.LEFT_1] = {12, 10},
|
|
22528
|
+
[DoorSlot.UP_1] = {19, -1},
|
|
22529
|
+
[DoorSlot.RIGHT_1] = {26, 10},
|
|
22530
|
+
[DoorSlot.DOWN_1] = {19, 14}
|
|
22531
|
+
},
|
|
22532
|
+
[RoomShape.LBR] = {
|
|
22533
|
+
[DoorSlot.LEFT_0] = {-1, 3},
|
|
22534
|
+
[DoorSlot.UP_0] = {6, -1},
|
|
22535
|
+
[DoorSlot.RIGHT_0] = {26, 3},
|
|
22536
|
+
[DoorSlot.DOWN_0] = {6, 14},
|
|
22537
|
+
[DoorSlot.LEFT_1] = {-1, 10},
|
|
22538
|
+
[DoorSlot.UP_1] = {19, -1},
|
|
22539
|
+
[DoorSlot.RIGHT_1] = {13, 10},
|
|
22540
|
+
[DoorSlot.DOWN_1] = {19, 7}
|
|
22541
|
+
}
|
|
22542
|
+
}
|
|
22543
|
+
return ____exports
|
|
22544
|
+
end,
|
|
22545
|
+
["src.objects.roomShapeToDoorSlots"] = function(...)
|
|
22546
|
+
local ____lualib = require("lualib_bundle")
|
|
22547
|
+
local __TS__New = ____lualib.__TS__New
|
|
22548
|
+
local ____exports = {}
|
|
22549
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22550
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22551
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
22552
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22553
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22554
|
+
local ALL_DOOR_SLOTS_SET = __TS__New(ReadonlySet, {
|
|
22555
|
+
DoorSlot.LEFT_0,
|
|
22556
|
+
DoorSlot.UP_0,
|
|
22557
|
+
DoorSlot.RIGHT_0,
|
|
22558
|
+
DoorSlot.DOWN_0,
|
|
22559
|
+
DoorSlot.LEFT_1,
|
|
22560
|
+
DoorSlot.UP_1,
|
|
22561
|
+
DoorSlot.RIGHT_1,
|
|
22562
|
+
DoorSlot.DOWN_1
|
|
22563
|
+
})
|
|
22564
|
+
____exports.ROOM_SHAPE_TO_DOOR_SLOTS = {
|
|
22565
|
+
[RoomShape.SHAPE_1x1] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.UP_0, DoorSlot.RIGHT_0, DoorSlot.DOWN_0}),
|
|
22566
|
+
[RoomShape.IH] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.RIGHT_0}),
|
|
22567
|
+
[RoomShape.IV] = __TS__New(ReadonlySet, {DoorSlot.UP_0, DoorSlot.DOWN_0}),
|
|
22568
|
+
[RoomShape.SHAPE_1x2] = __TS__New(ReadonlySet, {
|
|
22569
|
+
DoorSlot.LEFT_0,
|
|
22570
|
+
DoorSlot.UP_0,
|
|
22571
|
+
DoorSlot.RIGHT_0,
|
|
22572
|
+
DoorSlot.DOWN_0,
|
|
22573
|
+
DoorSlot.LEFT_1,
|
|
22574
|
+
DoorSlot.RIGHT_1
|
|
22575
|
+
}),
|
|
22576
|
+
[RoomShape.IIV] = __TS__New(ReadonlySet, {DoorSlot.UP_0, DoorSlot.DOWN_0}),
|
|
22577
|
+
[RoomShape.SHAPE_2x1] = __TS__New(ReadonlySet, {
|
|
22578
|
+
DoorSlot.LEFT_0,
|
|
22579
|
+
DoorSlot.UP_0,
|
|
22580
|
+
DoorSlot.RIGHT_0,
|
|
22581
|
+
DoorSlot.DOWN_0,
|
|
22582
|
+
DoorSlot.UP_1,
|
|
22583
|
+
DoorSlot.DOWN_1
|
|
22584
|
+
}),
|
|
22585
|
+
[RoomShape.IIH] = __TS__New(ReadonlySet, {DoorSlot.LEFT_0, DoorSlot.RIGHT_0}),
|
|
22586
|
+
[RoomShape.SHAPE_2x2] = ALL_DOOR_SLOTS_SET,
|
|
22587
|
+
[RoomShape.LTL] = ALL_DOOR_SLOTS_SET,
|
|
22588
|
+
[RoomShape.LTR] = ALL_DOOR_SLOTS_SET,
|
|
22589
|
+
[RoomShape.LBL] = ALL_DOOR_SLOTS_SET,
|
|
22590
|
+
[RoomShape.LBR] = ALL_DOOR_SLOTS_SET
|
|
22591
|
+
}
|
|
22592
|
+
return ____exports
|
|
22593
|
+
end,
|
|
22594
|
+
["src.functions.bitwise"] = function(...)
|
|
22595
|
+
local ____lualib = require("lualib_bundle")
|
|
22596
|
+
local __TS__ParseInt = ____lualib.__TS__ParseInt
|
|
22597
|
+
local __TS__NumberToString = ____lualib.__TS__NumberToString
|
|
22598
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
22599
|
+
local __TS__ArrayUnshift = ____lualib.__TS__ArrayUnshift
|
|
22600
|
+
local ____exports = {}
|
|
22601
|
+
local ____flag = require("src.functions.flag")
|
|
22602
|
+
local addFlag = ____flag.addFlag
|
|
22603
|
+
function ____exports.arrayToBitFlags(self, array)
|
|
22604
|
+
local flags = 0
|
|
22605
|
+
for ____, flag in ipairs(array) do
|
|
22606
|
+
flags = addFlag(nil, flags, flag)
|
|
22607
|
+
end
|
|
22608
|
+
return flags
|
|
22609
|
+
end
|
|
22610
|
+
function ____exports.convertBinaryToDecimal(self, bits)
|
|
22611
|
+
local bitsString = table.concat(bits, "")
|
|
22612
|
+
return __TS__ParseInt(bitsString, 2)
|
|
22613
|
+
end
|
|
22614
|
+
function ____exports.convertDecimalToBinary(self, number, minLength)
|
|
22615
|
+
local bits = {}
|
|
22616
|
+
local bitsString = __TS__NumberToString(number, 2)
|
|
22617
|
+
for ____, bitString in __TS__Iterator(bitsString) do
|
|
22618
|
+
local bit = tonumber(bitString)
|
|
22619
|
+
if bit == nil then
|
|
22620
|
+
error("Failed to convert the following number to binary: " .. tostring(number))
|
|
22621
|
+
end
|
|
22622
|
+
bits[#bits + 1] = bit
|
|
22623
|
+
end
|
|
22624
|
+
if minLength ~= nil then
|
|
22625
|
+
while #bits < minLength do
|
|
22626
|
+
__TS__ArrayUnshift(bits, 0)
|
|
22627
|
+
end
|
|
22628
|
+
end
|
|
22629
|
+
return bits
|
|
22630
|
+
end
|
|
22631
|
+
function ____exports.countSetBits(self, n)
|
|
22632
|
+
local count = 0
|
|
22633
|
+
while n > 0 do
|
|
22634
|
+
n = n & n - 1
|
|
22635
|
+
count = count + 1
|
|
22636
|
+
end
|
|
22637
|
+
return count
|
|
22638
|
+
end
|
|
22639
|
+
function ____exports.getKBitOfN(self, k, n)
|
|
22640
|
+
return n >> k & 1
|
|
22641
|
+
end
|
|
22642
|
+
function ____exports.getNumBitsOfN(self, n)
|
|
22643
|
+
local numBits = 0
|
|
22644
|
+
while n > 0 do
|
|
22645
|
+
numBits = numBits + 1
|
|
22646
|
+
n = n >> 1
|
|
22647
|
+
end
|
|
22648
|
+
return numBits
|
|
22649
|
+
end
|
|
22650
|
+
function ____exports.setToBitFlags(self, set)
|
|
22651
|
+
local flags = 0
|
|
22652
|
+
for ____, flag in __TS__Iterator(set:values()) do
|
|
22653
|
+
flags = addFlag(nil, flags, flag)
|
|
22654
|
+
end
|
|
22655
|
+
return flags
|
|
22656
|
+
end
|
|
22657
|
+
return ____exports
|
|
22658
|
+
end,
|
|
22659
|
+
["src.functions.doors"] = function(...)
|
|
22660
|
+
local ____lualib = require("lualib_bundle")
|
|
22661
|
+
local Set = ____lualib.Set
|
|
22662
|
+
local __TS__Spread = ____lualib.__TS__Spread
|
|
22663
|
+
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
22664
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
22665
|
+
local __TS__New = ____lualib.__TS__New
|
|
22666
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
22667
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
22668
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
22669
|
+
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
22670
|
+
local ____exports = {}
|
|
22671
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22672
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
22673
|
+
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
22674
|
+
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
22675
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
22676
|
+
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
22677
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
22678
|
+
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
22679
|
+
local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
|
|
22680
|
+
local DOOR_SLOT_VALUES = ____cachedEnumValues.DOOR_SLOT_VALUES
|
|
22681
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
22682
|
+
local game = ____cachedClasses.game
|
|
22683
|
+
local ____constants = require("src.core.constants")
|
|
22684
|
+
local DISTANCE_OF_GRID_TILE = ____constants.DISTANCE_OF_GRID_TILE
|
|
22685
|
+
local ____doorSlotFlagToDoorSlot = require("src.objects.doorSlotFlagToDoorSlot")
|
|
22686
|
+
local DEFAULT_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DEFAULT_DOOR_SLOT
|
|
22687
|
+
local DOOR_SLOT_FLAG_TO_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DOOR_SLOT_FLAG_TO_DOOR_SLOT
|
|
22688
|
+
local ____doorSlotToDirection = require("src.objects.doorSlotToDirection")
|
|
22689
|
+
local DOOR_SLOT_TO_DIRECTION = ____doorSlotToDirection.DOOR_SLOT_TO_DIRECTION
|
|
22690
|
+
local ____doorSlotToDoorSlotFlag = require("src.objects.doorSlotToDoorSlotFlag")
|
|
22691
|
+
local DOOR_SLOT_TO_DOOR_SLOT_FLAG = ____doorSlotToDoorSlotFlag.DOOR_SLOT_TO_DOOR_SLOT_FLAG
|
|
22692
|
+
local ____oppositeDoorSlots = require("src.objects.oppositeDoorSlots")
|
|
22693
|
+
local OPPOSITE_DOOR_SLOTS = ____oppositeDoorSlots.OPPOSITE_DOOR_SLOTS
|
|
22694
|
+
local ____roomShapeToDoorSlotCoordinates = require("src.objects.roomShapeToDoorSlotCoordinates")
|
|
22695
|
+
local ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES = ____roomShapeToDoorSlotCoordinates.ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES
|
|
22696
|
+
local ____roomShapeToDoorSlots = require("src.objects.roomShapeToDoorSlots")
|
|
22697
|
+
local ROOM_SHAPE_TO_DOOR_SLOTS = ____roomShapeToDoorSlots.ROOM_SHAPE_TO_DOOR_SLOTS
|
|
22698
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
22699
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
22700
|
+
local ____bitwise = require("src.functions.bitwise")
|
|
22701
|
+
local arrayToBitFlags = ____bitwise.arrayToBitFlags
|
|
22702
|
+
local ____direction = require("src.functions.direction")
|
|
22703
|
+
local directionToVector = ____direction.directionToVector
|
|
22704
|
+
local ____flag = require("src.functions.flag")
|
|
22705
|
+
local hasFlag = ____flag.hasFlag
|
|
22706
|
+
local ____tstlClass = require("src.functions.tstlClass")
|
|
22707
|
+
local isTSTLSet = ____tstlClass.isTSTLSet
|
|
22708
|
+
local ____types = require("src.functions.types")
|
|
22709
|
+
local asNumber = ____types.asNumber
|
|
22710
|
+
function ____exports.doorSlotToDirection(self, doorSlot)
|
|
22711
|
+
return DOOR_SLOT_TO_DIRECTION[doorSlot]
|
|
22712
|
+
end
|
|
22713
|
+
function ____exports.getDoorSlotEnterPositionOffset(self, doorSlot)
|
|
22714
|
+
local direction = ____exports.doorSlotToDirection(nil, doorSlot)
|
|
22715
|
+
local vector = directionToVector(nil, direction)
|
|
22716
|
+
local oppositeVector = vector * -1
|
|
22717
|
+
return oppositeVector * DISTANCE_OF_GRID_TILE
|
|
22718
|
+
end
|
|
22719
|
+
function ____exports.getDoorSlotsForRoomShape(self, roomShape)
|
|
22720
|
+
return ROOM_SHAPE_TO_DOOR_SLOTS[roomShape]
|
|
22721
|
+
end
|
|
22722
|
+
function ____exports.getDoors(self, ...)
|
|
22723
|
+
local roomTypes = {...}
|
|
22724
|
+
local room = game:GetRoom()
|
|
22725
|
+
local roomShape = room:GetRoomShape()
|
|
22726
|
+
local roomTypesSet = __TS__New(ReadonlySet, roomTypes)
|
|
22727
|
+
local possibleDoorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
22728
|
+
local doors = {}
|
|
22729
|
+
for ____, doorSlot in __TS__Iterator(possibleDoorSlots) do
|
|
22730
|
+
do
|
|
22731
|
+
local door = room:GetDoor(doorSlot)
|
|
22732
|
+
if door == nil then
|
|
22733
|
+
goto __continue25
|
|
22734
|
+
end
|
|
22735
|
+
local gridEntityType = door:GetType()
|
|
22736
|
+
if gridEntityType ~= GridEntityType.DOOR then
|
|
22737
|
+
goto __continue25
|
|
22738
|
+
end
|
|
22739
|
+
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
22740
|
+
doors[#doors + 1] = door
|
|
22741
|
+
end
|
|
22742
|
+
end
|
|
22743
|
+
::__continue25::
|
|
22744
|
+
end
|
|
22745
|
+
return doors
|
|
22746
|
+
end
|
|
22747
|
+
function ____exports.isBlueWombDoor(self, door)
|
|
22748
|
+
return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
|
|
22749
|
+
end
|
|
22750
|
+
function ____exports.isRepentanceDoor(self, door)
|
|
22751
|
+
return door.TargetRoomIndex == asNumber(nil, GridRoom.SECRET_EXIT)
|
|
22752
|
+
end
|
|
22753
|
+
function ____exports.isSecretRoomDoor(self, door)
|
|
22754
|
+
local sprite = door:GetSprite()
|
|
22755
|
+
local fileName = sprite:GetFilename()
|
|
22756
|
+
return string.lower(fileName) == "gfx/grid/door_08_holeinwall.anm2"
|
|
22757
|
+
end
|
|
22758
|
+
function ____exports.removeDoor(self, door)
|
|
22759
|
+
local room = game:GetRoom()
|
|
22760
|
+
room:RemoveDoor(door.Slot)
|
|
22761
|
+
end
|
|
22762
|
+
function ____exports.removeDoors(self, ...)
|
|
22763
|
+
local doors = {...}
|
|
22764
|
+
for ____, door in ipairs(doors) do
|
|
22765
|
+
____exports.removeDoor(nil, door)
|
|
22766
|
+
end
|
|
22767
|
+
end
|
|
22768
|
+
function ____exports.closeAllDoors(self)
|
|
22769
|
+
for ____, door in ipairs(____exports.getDoors(nil)) do
|
|
22770
|
+
door:Close(true)
|
|
22945
22771
|
end
|
|
22946
|
-
local newTrackingArray = {gameFrameCount, false}
|
|
22947
|
-
mapSetPlayer(nil, v.run.playersDamageFrameMap, player, newTrackingArray)
|
|
22948
22772
|
end
|
|
22949
|
-
function
|
|
22950
|
-
|
|
22951
|
-
local
|
|
22952
|
-
|
|
22953
|
-
return roomType == RoomType.SACRIFICE and isSpikeDamage and (v.level.numSacrifices == 6 or v.level.numSacrifices >= 12)
|
|
22773
|
+
function ____exports.closeDoorFast(self, door)
|
|
22774
|
+
door.State = DoorState.CLOSED
|
|
22775
|
+
local sprite = door:GetSprite()
|
|
22776
|
+
sprite:Play("Closed", true)
|
|
22954
22777
|
end
|
|
22955
|
-
function
|
|
22956
|
-
local
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
local
|
|
22961
|
-
|
|
22962
|
-
|
|
22778
|
+
function ____exports.doorSlotFlagToDoorSlot(self, doorSlotFlag)
|
|
22779
|
+
local doorSlot = DOOR_SLOT_FLAG_TO_DOOR_SLOT[doorSlotFlag]
|
|
22780
|
+
return doorSlot == nil and DEFAULT_DOOR_SLOT or doorSlot
|
|
22781
|
+
end
|
|
22782
|
+
function ____exports.doorSlotFlagsToDoorSlots(self, doorSlotFlags)
|
|
22783
|
+
local doorSlots = {}
|
|
22784
|
+
for ____, doorSlotFlag in ipairs(DOOR_SLOT_FLAG_VALUES) do
|
|
22785
|
+
if hasFlag(nil, doorSlotFlags, doorSlotFlag) then
|
|
22786
|
+
local doorSlot = ____exports.doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
22787
|
+
doorSlots[#doorSlots + 1] = doorSlot
|
|
22788
|
+
end
|
|
22963
22789
|
end
|
|
22964
|
-
|
|
22965
|
-
|
|
22790
|
+
return doorSlots
|
|
22791
|
+
end
|
|
22792
|
+
function ____exports.doorSlotToDoorSlotFlag(self, doorSlot)
|
|
22793
|
+
return DOOR_SLOT_TO_DOOR_SLOT_FLAG[doorSlot]
|
|
22794
|
+
end
|
|
22795
|
+
function ____exports.doorSlotsToDoorSlotFlags(self, doorSlots)
|
|
22796
|
+
local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
|
|
22797
|
+
local doorSlotFlagArray = __TS__ArrayMap(
|
|
22798
|
+
doorSlotArray,
|
|
22799
|
+
function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
|
|
22800
|
+
)
|
|
22801
|
+
return arrayToBitFlags(nil, doorSlotFlagArray)
|
|
22802
|
+
end
|
|
22803
|
+
function ____exports.getAngelRoomDoor(self)
|
|
22804
|
+
local angelRoomDoors = ____exports.getDoors(nil, RoomType.ANGEL)
|
|
22805
|
+
local ____temp_0
|
|
22806
|
+
if #angelRoomDoors == 0 then
|
|
22807
|
+
____temp_0 = nil
|
|
22808
|
+
else
|
|
22809
|
+
____temp_0 = angelRoomDoors[1]
|
|
22966
22810
|
end
|
|
22967
|
-
|
|
22968
|
-
|
|
22969
|
-
|
|
22811
|
+
return ____temp_0
|
|
22812
|
+
end
|
|
22813
|
+
function ____exports.getBlueWombDoor(self)
|
|
22814
|
+
local doors = ____exports.getDoors(nil)
|
|
22815
|
+
return __TS__ArrayFind(
|
|
22816
|
+
doors,
|
|
22817
|
+
function(____, door) return ____exports.isBlueWombDoor(nil, door) end
|
|
22818
|
+
)
|
|
22819
|
+
end
|
|
22820
|
+
function ____exports.getDevilRoomDoor(self)
|
|
22821
|
+
local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
|
|
22822
|
+
local ____temp_1
|
|
22823
|
+
if #devilRoomDoors == 0 then
|
|
22824
|
+
____temp_1 = nil
|
|
22825
|
+
else
|
|
22826
|
+
____temp_1 = devilRoomDoors[1]
|
|
22970
22827
|
end
|
|
22971
|
-
return
|
|
22828
|
+
return ____temp_1
|
|
22972
22829
|
end
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
|
|
22976
|
-
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
22981
|
-
local ISCFeature = ____ISCFeature.ISCFeature
|
|
22982
|
-
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
22983
|
-
local CustomCallback = ____CustomCallback.CustomCallback
|
|
22984
|
-
____exports.PostCustomRevive = __TS__Class()
|
|
22985
|
-
local PostCustomRevive = ____exports.PostCustomRevive
|
|
22986
|
-
PostCustomRevive.name = "PostCustomRevive"
|
|
22987
|
-
__TS__ClassExtends(PostCustomRevive, CustomCallback)
|
|
22988
|
-
function PostCustomRevive.prototype.____constructor(self)
|
|
22989
|
-
CustomCallback.prototype.____constructor(self)
|
|
22990
|
-
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
22991
|
-
local _player, revivalType = table.unpack(fireArgs)
|
|
22992
|
-
local callbackRevivalType = table.unpack(optionalArgs)
|
|
22993
|
-
return callbackRevivalType == nil or revivalType == callbackRevivalType
|
|
22830
|
+
function ____exports.getDevilRoomOrAngelRoomDoor(self)
|
|
22831
|
+
local devilRoomOrAngelRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL, RoomType.ANGEL)
|
|
22832
|
+
local ____temp_2
|
|
22833
|
+
if #devilRoomOrAngelRoomDoors == 0 then
|
|
22834
|
+
____temp_2 = nil
|
|
22835
|
+
else
|
|
22836
|
+
____temp_2 = devilRoomOrAngelRoomDoors[1]
|
|
22994
22837
|
end
|
|
22995
|
-
|
|
22838
|
+
return ____temp_2
|
|
22996
22839
|
end
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
local
|
|
23003
|
-
local
|
|
23004
|
-
local
|
|
23005
|
-
|
|
23006
|
-
|
|
23007
|
-
|
|
23008
|
-
|
|
22840
|
+
function ____exports.getDoorEnterPosition(self, door)
|
|
22841
|
+
local offset = ____exports.getDoorSlotEnterPositionOffset(nil, door.Slot)
|
|
22842
|
+
return door.Position + offset
|
|
22843
|
+
end
|
|
22844
|
+
function ____exports.getDoorSlotEnterPosition(self, doorSlot)
|
|
22845
|
+
local room = game:GetRoom()
|
|
22846
|
+
local position = room:GetDoorSlotPosition(doorSlot)
|
|
22847
|
+
local offset = ____exports.getDoorSlotEnterPositionOffset(nil, doorSlot)
|
|
22848
|
+
return position + offset
|
|
22849
|
+
end
|
|
22850
|
+
function ____exports.getDoorsToRoomIndex(self, ...)
|
|
22851
|
+
local roomGridIndex = {...}
|
|
22852
|
+
local roomGridIndexesSet = __TS__New(ReadonlySet, roomGridIndex)
|
|
22853
|
+
local doors = ____exports.getDoors(nil)
|
|
22854
|
+
return __TS__ArrayFilter(
|
|
22855
|
+
doors,
|
|
22856
|
+
function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
|
|
23009
22857
|
)
|
|
23010
22858
|
end
|
|
23011
|
-
function ____exports.
|
|
23012
|
-
|
|
23013
|
-
return (subtractedAngle + 180) % 360 - 180
|
|
22859
|
+
function ____exports.getOppositeDoorSlot(self, doorSlot)
|
|
22860
|
+
return OPPOSITE_DOOR_SLOTS[doorSlot]
|
|
23014
22861
|
end
|
|
23015
|
-
function ____exports.
|
|
23016
|
-
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
local rotatedPosition = initialPosition:Rotated(i * 360 / numPoints)
|
|
23032
|
-
rotatedPosition.X = rotatedPosition.X * xMultiplier
|
|
23033
|
-
rotatedPosition.Y = rotatedPosition.Y * yMultiplier
|
|
23034
|
-
local positionFromCenter = centerPos + rotatedPosition
|
|
23035
|
-
positions[#positions + 1] = positionFromCenter
|
|
23036
|
-
i = i + 1
|
|
22862
|
+
function ____exports.getRepentanceDoor(self)
|
|
22863
|
+
local doors = ____exports.getDoors(nil)
|
|
22864
|
+
return __TS__ArrayFind(
|
|
22865
|
+
doors,
|
|
22866
|
+
function(____, door) return ____exports.isRepentanceDoor(nil, door) end
|
|
22867
|
+
)
|
|
22868
|
+
end
|
|
22869
|
+
function ____exports.getRoomShapeDoorSlot(self, roomShape, x, y)
|
|
22870
|
+
local doorSlotCoordinates = ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES[roomShape]
|
|
22871
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(doorSlotCoordinates)) do
|
|
22872
|
+
local doorSlotString = ____value[1]
|
|
22873
|
+
local coordinates = ____value[2]
|
|
22874
|
+
local doorSlot = tonumber(doorSlotString)
|
|
22875
|
+
local doorX, doorY = table.unpack(coordinates)
|
|
22876
|
+
if x == doorX and y == doorY then
|
|
22877
|
+
return doorSlot
|
|
23037
22878
|
end
|
|
23038
22879
|
end
|
|
23039
|
-
return
|
|
22880
|
+
return nil
|
|
23040
22881
|
end
|
|
23041
|
-
function ____exports.
|
|
23042
|
-
|
|
22882
|
+
function ____exports.getRoomShapeDoorSlotCoordinates(self, roomShape, doorSlot)
|
|
22883
|
+
local doorSlotCoordinates = ROOM_SHAPE_TO_DOOR_SLOT_COORDINATES[roomShape]
|
|
22884
|
+
return doorSlotCoordinates[doorSlot]
|
|
23043
22885
|
end
|
|
23044
|
-
function ____exports.
|
|
23045
|
-
local
|
|
23046
|
-
|
|
23047
|
-
|
|
22886
|
+
function ____exports.getUnusedDoorSlots(self)
|
|
22887
|
+
local room = game:GetRoom()
|
|
22888
|
+
return __TS__ArrayFilter(
|
|
22889
|
+
DOOR_SLOT_VALUES,
|
|
22890
|
+
function(____, doorSlot) return doorSlot ~= DoorSlot.NO_DOOR_SLOT and room:IsDoorSlotAllowed(doorSlot) and room:GetDoor(doorSlot) == nil end
|
|
23048
22891
|
)
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
22892
|
+
end
|
|
22893
|
+
function ____exports.hasDoorType(self, ...)
|
|
22894
|
+
local roomTypes = {...}
|
|
22895
|
+
local doors = ____exports.getDoors(nil)
|
|
22896
|
+
local doorsOfThisRoomType = __TS__ArrayFilter(
|
|
22897
|
+
doors,
|
|
22898
|
+
function(____, door) return __TS__ArraySome(
|
|
22899
|
+
roomTypes,
|
|
22900
|
+
function(____, roomType) return door:IsRoomType(roomType) end
|
|
22901
|
+
) end
|
|
23052
22902
|
)
|
|
23053
|
-
|
|
23054
|
-
local distanceToCenterOfCircle = nearestPointToCircleOnRectangle:Distance(circleCenter)
|
|
23055
|
-
return distanceToCenterOfCircle <= circleRadius
|
|
22903
|
+
return #doorsOfThisRoomType > 0
|
|
23056
22904
|
end
|
|
23057
|
-
function ____exports.
|
|
23058
|
-
|
|
22905
|
+
function ____exports.hasUnusedDoorSlot(self)
|
|
22906
|
+
local unusedDoorSlots = ____exports.getUnusedDoorSlots(nil)
|
|
22907
|
+
return #unusedDoorSlots > 0
|
|
23059
22908
|
end
|
|
23060
|
-
function ____exports.
|
|
23061
|
-
return
|
|
22909
|
+
function ____exports.isAngelRoomDoor(self, door)
|
|
22910
|
+
return door.TargetRoomType == RoomType.ANGEL
|
|
23062
22911
|
end
|
|
23063
|
-
function ____exports.
|
|
23064
|
-
return
|
|
22912
|
+
function ____exports.isDevilRoomDoor(self, door)
|
|
22913
|
+
return door.TargetRoomType == RoomType.DEVIL
|
|
23065
22914
|
end
|
|
23066
|
-
function ____exports.
|
|
23067
|
-
|
|
22915
|
+
function ____exports.isDoorSlotInRoomShape(self, doorSlot, roomShape)
|
|
22916
|
+
local doorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
22917
|
+
return doorSlots:has(doorSlot)
|
|
23068
22918
|
end
|
|
23069
|
-
function ____exports.
|
|
23070
|
-
if
|
|
23071
|
-
|
|
22919
|
+
function ____exports.isDoorToDownpour(self, door)
|
|
22920
|
+
if not ____exports.isRepentanceDoor(nil, door) then
|
|
22921
|
+
return false
|
|
23072
22922
|
end
|
|
23073
|
-
local
|
|
23074
|
-
|
|
23075
|
-
|
|
23076
|
-
))
|
|
23077
|
-
return roundedNum == nil and 0 or roundedNum
|
|
22923
|
+
local sprite = door:GetSprite()
|
|
22924
|
+
local fileName = sprite:GetFilename()
|
|
22925
|
+
return string.lower(fileName) == "gfx/grid/door_downpour.anm2"
|
|
23078
22926
|
end
|
|
23079
|
-
function ____exports.
|
|
23080
|
-
if
|
|
23081
|
-
return
|
|
23082
|
-
end
|
|
23083
|
-
if n < 0 then
|
|
23084
|
-
return -1
|
|
22927
|
+
function ____exports.isDoorToMausoleum(self, door)
|
|
22928
|
+
if not ____exports.isRepentanceDoor(nil, door) then
|
|
22929
|
+
return false
|
|
23085
22930
|
end
|
|
23086
|
-
|
|
22931
|
+
local sprite = door:GetSprite()
|
|
22932
|
+
local fileName = sprite:GetFilename()
|
|
22933
|
+
return string.lower(fileName) == "gfx/grid/door_mausoleum.anm2"
|
|
23087
22934
|
end
|
|
23088
|
-
function ____exports.
|
|
23089
|
-
|
|
22935
|
+
function ____exports.isDoorToMausoleumAscent(self, door)
|
|
22936
|
+
if not ____exports.isRepentanceDoor(nil, door) then
|
|
22937
|
+
return false
|
|
22938
|
+
end
|
|
22939
|
+
local sprite = door:GetSprite()
|
|
22940
|
+
local fileName = sprite:GetFilename()
|
|
22941
|
+
return string.lower(fileName) == "gfx/grid/door_mausoleum_alt.anm2"
|
|
23090
22942
|
end
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
local
|
|
23096
|
-
local
|
|
23097
|
-
|
|
23098
|
-
function ____exports.isCloseEnoughToTriggerDiceFloor(self, player, diceFloor)
|
|
23099
|
-
local topLeft = diceFloor.Position + Vector(-____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE, -____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE)
|
|
23100
|
-
local bottomRight = diceFloor.Position + Vector(____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE, ____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE)
|
|
23101
|
-
return inRectangle(nil, player.Position, topLeft, bottomRight)
|
|
22943
|
+
function ____exports.isDoorToMines(self, door)
|
|
22944
|
+
if not ____exports.isRepentanceDoor(nil, door) then
|
|
22945
|
+
return false
|
|
22946
|
+
end
|
|
22947
|
+
local sprite = door:GetSprite()
|
|
22948
|
+
local fileName = sprite:GetFilename()
|
|
22949
|
+
return string.lower(fileName) == "gfx/grid/door_mines.anm2"
|
|
23102
22950
|
end
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
local ____lualib = require("lualib_bundle")
|
|
23107
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
23108
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
23109
|
-
local ____exports = {}
|
|
23110
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
23111
|
-
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
23112
|
-
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
23113
|
-
local ____effects = require("src.functions.effects")
|
|
23114
|
-
local isCloseEnoughToTriggerDiceFloor = ____effects.isCloseEnoughToTriggerDiceFloor
|
|
23115
|
-
local ____players = require("src.functions.players")
|
|
23116
|
-
local getClosestPlayer = ____players.getClosestPlayer
|
|
23117
|
-
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
23118
|
-
local CustomCallback = ____CustomCallback.CustomCallback
|
|
23119
|
-
local v = {room = {diceRoomActivated = false}}
|
|
23120
|
-
____exports.PostDiceRoomActivated = __TS__Class()
|
|
23121
|
-
local PostDiceRoomActivated = ____exports.PostDiceRoomActivated
|
|
23122
|
-
PostDiceRoomActivated.name = "PostDiceRoomActivated"
|
|
23123
|
-
__TS__ClassExtends(PostDiceRoomActivated, CustomCallback)
|
|
23124
|
-
function PostDiceRoomActivated.prototype.____constructor(self)
|
|
23125
|
-
CustomCallback.prototype.____constructor(self)
|
|
23126
|
-
self.v = v
|
|
23127
|
-
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
23128
|
-
local _player, diceFloorSubType = table.unpack(fireArgs)
|
|
23129
|
-
local callbackDiceFloorSubType = table.unpack(optionalArgs)
|
|
23130
|
-
return callbackDiceFloorSubType == nil or diceFloorSubType == callbackDiceFloorSubType
|
|
22951
|
+
function ____exports.isDoorToMomsHeart(self, door)
|
|
22952
|
+
if not ____exports.isRepentanceDoor(nil, door) then
|
|
22953
|
+
return false
|
|
23131
22954
|
end
|
|
23132
|
-
|
|
23133
|
-
|
|
23134
|
-
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23143
|
-
|
|
22955
|
+
local sprite = door:GetSprite()
|
|
22956
|
+
local fileName = sprite:GetFilename()
|
|
22957
|
+
return string.lower(fileName) == "gfx/grid/door_momsheart.anm2"
|
|
22958
|
+
end
|
|
22959
|
+
function ____exports.isHiddenSecretRoomDoor(self, door)
|
|
22960
|
+
local sprite = door:GetSprite()
|
|
22961
|
+
local animation = sprite:GetAnimation()
|
|
22962
|
+
return ____exports.isSecretRoomDoor(nil, door) and animation == "Hidden"
|
|
22963
|
+
end
|
|
22964
|
+
function ____exports.lockDoor(self, door)
|
|
22965
|
+
local level = game:GetLevel()
|
|
22966
|
+
local roomDescriptor = level:GetRoomByIdx(door.TargetRoomIndex)
|
|
22967
|
+
roomDescriptor.VisitedCount = 0
|
|
22968
|
+
door:SetVariant(DoorVariant.LOCKED)
|
|
22969
|
+
door:SetLocked(true)
|
|
22970
|
+
door:Close(true)
|
|
22971
|
+
end
|
|
22972
|
+
function ____exports.openAllDoors(self)
|
|
22973
|
+
for ____, door in ipairs(____exports.getDoors(nil)) do
|
|
22974
|
+
door:Open()
|
|
23144
22975
|
end
|
|
23145
|
-
|
|
22976
|
+
end
|
|
22977
|
+
function ____exports.openDoorFast(self, door)
|
|
22978
|
+
door.State = DoorState.OPEN
|
|
22979
|
+
local sprite = door:GetSprite()
|
|
22980
|
+
sprite:Play("Opened", true)
|
|
22981
|
+
end
|
|
22982
|
+
function ____exports.removeAllDoors(self, ...)
|
|
22983
|
+
local doors = ____exports.getDoors(nil, ...)
|
|
22984
|
+
____exports.removeDoors(
|
|
22985
|
+
nil,
|
|
22986
|
+
table.unpack(doors)
|
|
22987
|
+
)
|
|
22988
|
+
return #doors
|
|
23146
22989
|
end
|
|
23147
22990
|
return ____exports
|
|
23148
22991
|
end,
|
|
@@ -23597,6 +23440,31 @@ function PostFlip.prototype.____constructor(self)
|
|
|
23597
23440
|
CustomCallback.prototype.____constructor(self)
|
|
23598
23441
|
self.featuresUsed = {ISCFeature.FLIP_DETECTION}
|
|
23599
23442
|
end
|
|
23443
|
+
return ____exports
|
|
23444
|
+
end,
|
|
23445
|
+
["src.classes.callbacks.PostGameEndFilter"] = function(...)
|
|
23446
|
+
local ____lualib = require("lualib_bundle")
|
|
23447
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
23448
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
23449
|
+
local ____exports = {}
|
|
23450
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
23451
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
23452
|
+
local ____shouldFire = require("src.shouldFire")
|
|
23453
|
+
local shouldFireBoolean = ____shouldFire.shouldFireBoolean
|
|
23454
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
23455
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
23456
|
+
____exports.PostGameEndFilter = __TS__Class()
|
|
23457
|
+
local PostGameEndFilter = ____exports.PostGameEndFilter
|
|
23458
|
+
PostGameEndFilter.name = "PostGameEndFilter"
|
|
23459
|
+
__TS__ClassExtends(PostGameEndFilter, CustomCallback)
|
|
23460
|
+
function PostGameEndFilter.prototype.____constructor(self)
|
|
23461
|
+
CustomCallback.prototype.____constructor(self)
|
|
23462
|
+
self.shouldFire = shouldFireBoolean
|
|
23463
|
+
self.postGameEnd = function(____, isGameOver)
|
|
23464
|
+
self:fire(isGameOver)
|
|
23465
|
+
end
|
|
23466
|
+
self.callbacksUsed = {{ModCallback.POST_GAME_END, self.postGameEnd}}
|
|
23467
|
+
end
|
|
23600
23468
|
return ____exports
|
|
23601
23469
|
end,
|
|
23602
23470
|
["src.classes.callbacks.PostGameStartedReordered"] = function(...)
|
|
@@ -26459,6 +26327,101 @@ ____exports.MINE_SHAFT_ROOM_SUB_TYPE_SET = __TS__New(ReadonlySet, {
|
|
|
26459
26327
|
MinesRoomSubType.MINESHAFT_ROOM_PRE_CHASE,
|
|
26460
26328
|
MinesRoomSubType.MINESHAFT_ROOM_POST_CHASE
|
|
26461
26329
|
})
|
|
26330
|
+
return ____exports
|
|
26331
|
+
end,
|
|
26332
|
+
["src.functions.roomData"] = function(...)
|
|
26333
|
+
local ____lualib = require("lualib_bundle")
|
|
26334
|
+
local Set = ____lualib.Set
|
|
26335
|
+
local __TS__New = ____lualib.__TS__New
|
|
26336
|
+
local ____exports = {}
|
|
26337
|
+
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
26338
|
+
local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
|
|
26339
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
26340
|
+
local game = ____cachedClasses.game
|
|
26341
|
+
local ____doors = require("src.functions.doors")
|
|
26342
|
+
local doorSlotFlagToDoorSlot = ____doors.doorSlotFlagToDoorSlot
|
|
26343
|
+
local ____flag = require("src.functions.flag")
|
|
26344
|
+
local hasFlag = ____flag.hasFlag
|
|
26345
|
+
function ____exports.getRoomData(self, roomGridIndex)
|
|
26346
|
+
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
26347
|
+
return roomDescriptor.Data
|
|
26348
|
+
end
|
|
26349
|
+
function ____exports.getRoomDescriptor(self, roomGridIndex)
|
|
26350
|
+
local level = game:GetLevel()
|
|
26351
|
+
if roomGridIndex == nil then
|
|
26352
|
+
roomGridIndex = ____exports.getRoomGridIndex(nil)
|
|
26353
|
+
end
|
|
26354
|
+
return level:GetRoomByIdx(roomGridIndex)
|
|
26355
|
+
end
|
|
26356
|
+
function ____exports.getRoomDescriptorReadOnly(self)
|
|
26357
|
+
local level = game:GetLevel()
|
|
26358
|
+
return level:GetCurrentRoomDesc()
|
|
26359
|
+
end
|
|
26360
|
+
function ____exports.getRoomGridIndex(self)
|
|
26361
|
+
local level = game:GetLevel()
|
|
26362
|
+
local currentRoomIndex = level:GetCurrentRoomIndex()
|
|
26363
|
+
if currentRoomIndex < 0 then
|
|
26364
|
+
return currentRoomIndex
|
|
26365
|
+
end
|
|
26366
|
+
local roomDescriptor = ____exports.getRoomDescriptorReadOnly(nil)
|
|
26367
|
+
return roomDescriptor.SafeGridIndex
|
|
26368
|
+
end
|
|
26369
|
+
function ____exports.getRoomAllowedDoors(self, roomGridIndex)
|
|
26370
|
+
local allowedDoors = __TS__New(Set)
|
|
26371
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26372
|
+
if roomData == nil then
|
|
26373
|
+
return allowedDoors
|
|
26374
|
+
end
|
|
26375
|
+
for ____, doorSlotFlag in ipairs(DOOR_SLOT_FLAG_VALUES) do
|
|
26376
|
+
if hasFlag(nil, roomData.Doors, doorSlotFlag) then
|
|
26377
|
+
local doorSlot = doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
26378
|
+
allowedDoors:add(doorSlot)
|
|
26379
|
+
end
|
|
26380
|
+
end
|
|
26381
|
+
return allowedDoors
|
|
26382
|
+
end
|
|
26383
|
+
function ____exports.getRoomListIndex(self, roomGridIndex)
|
|
26384
|
+
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
26385
|
+
return roomDescriptor.ListIndex
|
|
26386
|
+
end
|
|
26387
|
+
function ____exports.getRoomName(self, roomGridIndex)
|
|
26388
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26389
|
+
return roomData == nil and "Unknown" or roomData.Name
|
|
26390
|
+
end
|
|
26391
|
+
function ____exports.getRoomShape(self, roomGridIndex)
|
|
26392
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26393
|
+
local ____temp_0
|
|
26394
|
+
if roomData == nil then
|
|
26395
|
+
____temp_0 = nil
|
|
26396
|
+
else
|
|
26397
|
+
____temp_0 = roomData.Shape
|
|
26398
|
+
end
|
|
26399
|
+
return ____temp_0
|
|
26400
|
+
end
|
|
26401
|
+
function ____exports.getRoomStageID(self, roomGridIndex)
|
|
26402
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26403
|
+
return roomData == nil and -1 or roomData.StageID
|
|
26404
|
+
end
|
|
26405
|
+
function ____exports.getRoomSubType(self, roomGridIndex)
|
|
26406
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26407
|
+
return roomData == nil and -1 or roomData.Subtype
|
|
26408
|
+
end
|
|
26409
|
+
function ____exports.getRoomType(self, roomGridIndex)
|
|
26410
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26411
|
+
return roomData == nil and -1 or roomData.Type
|
|
26412
|
+
end
|
|
26413
|
+
function ____exports.getRoomVariant(self, roomGridIndex)
|
|
26414
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
26415
|
+
return roomData == nil and -1 or roomData.Variant
|
|
26416
|
+
end
|
|
26417
|
+
function ____exports.getRoomVisitedCount(self, roomGridIndex)
|
|
26418
|
+
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
26419
|
+
return roomDescriptor.VisitedCount
|
|
26420
|
+
end
|
|
26421
|
+
function ____exports.setRoomData(self, roomGridIndex, roomData)
|
|
26422
|
+
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
26423
|
+
roomDescriptor.Data = roomData
|
|
26424
|
+
end
|
|
26462
26425
|
return ____exports
|
|
26463
26426
|
end,
|
|
26464
26427
|
["src.functions.dimensions"] = function(...)
|
|
@@ -32741,11 +32704,6 @@ do
|
|
|
32741
32704
|
local PostCollectibleEmpty = ____PostCollectibleEmpty.PostCollectibleEmpty
|
|
32742
32705
|
____exports.PostCollectibleEmpty = PostCollectibleEmpty
|
|
32743
32706
|
end
|
|
32744
|
-
do
|
|
32745
|
-
local ____PostCollectibleInitFirst = require("src.classes.callbacks.PostCollectibleInitFirst")
|
|
32746
|
-
local PostCollectibleInitFirst = ____PostCollectibleInitFirst.PostCollectibleInitFirst
|
|
32747
|
-
____exports.PostCollectibleInitFirst = PostCollectibleInitFirst
|
|
32748
|
-
end
|
|
32749
32707
|
do
|
|
32750
32708
|
local ____PostCursedTeleport = require("src.classes.callbacks.PostCursedTeleport")
|
|
32751
32709
|
local PostCursedTeleport = ____PostCursedTeleport.PostCursedTeleport
|
|
@@ -32846,6 +32804,11 @@ do
|
|
|
32846
32804
|
local PostFlip = ____PostFlip.PostFlip
|
|
32847
32805
|
____exports.PostFlip = PostFlip
|
|
32848
32806
|
end
|
|
32807
|
+
do
|
|
32808
|
+
local ____PostGameEndFilter = require("src.classes.callbacks.PostGameEndFilter")
|
|
32809
|
+
local PostGameEndFilter = ____PostGameEndFilter.PostGameEndFilter
|
|
32810
|
+
____exports.PostGameEndFilter = PostGameEndFilter
|
|
32811
|
+
end
|
|
32849
32812
|
do
|
|
32850
32813
|
local ____PostGameStartedReordered = require("src.classes.callbacks.PostGameStartedReordered")
|
|
32851
32814
|
local PostGameStartedReordered = ____PostGameStartedReordered.PostGameStartedReordered
|
|
@@ -33400,7 +33363,6 @@ local MOD_CALLBACK_CUSTOM_TO_CLASS = {
|
|
|
33400
33363
|
[ModCallbackCustom.POST_BOMB_UPDATE_FILTER] = cc.PostBombUpdateFilter,
|
|
33401
33364
|
[ModCallbackCustom.POST_BONE_SWING] = cc.PostBoneSwing,
|
|
33402
33365
|
[ModCallbackCustom.POST_COLLECTIBLE_EMPTY] = cc.PostCollectibleEmpty,
|
|
33403
|
-
[ModCallbackCustom.POST_COLLECTIBLE_INIT_FIRST] = cc.PostCollectibleInitFirst,
|
|
33404
33366
|
[ModCallbackCustom.POST_CURSED_TELEPORT] = cc.PostCursedTeleport,
|
|
33405
33367
|
[ModCallbackCustom.POST_CUSTOM_REVIVE] = cc.PostCustomRevive,
|
|
33406
33368
|
[ModCallbackCustom.POST_DICE_ROOM_ACTIVATED] = cc.PostDiceRoomActivated,
|
|
@@ -33421,6 +33383,7 @@ local MOD_CALLBACK_CUSTOM_TO_CLASS = {
|
|
|
33421
33383
|
[ModCallbackCustom.POST_FIRST_FLIP] = cc.PostFirstFlip,
|
|
33422
33384
|
[ModCallbackCustom.POST_FIRST_ESAU_JR] = cc.PostFirstEsauJr,
|
|
33423
33385
|
[ModCallbackCustom.POST_FLIP] = cc.PostFlip,
|
|
33386
|
+
[ModCallbackCustom.POST_GAME_END_FILTER] = cc.PostGameEndFilter,
|
|
33424
33387
|
[ModCallbackCustom.POST_GAME_STARTED_REORDERED] = cc.PostGameStartedReordered,
|
|
33425
33388
|
[ModCallbackCustom.POST_GAME_STARTED_REORDERED_LAST] = cc.PostGameStartedReorderedLast,
|
|
33426
33389
|
[ModCallbackCustom.POST_GREED_MODE_WAVE] = cc.PostGreedModeWave,
|
|
@@ -46150,64 +46113,75 @@ local __TS__Class = ____lualib.__TS__Class
|
|
|
46150
46113
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
46151
46114
|
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
46152
46115
|
local ____exports = {}
|
|
46153
|
-
local getMapIndex
|
|
46154
46116
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
46155
46117
|
local CardType = ____isaac_2Dtypescript_2Ddefinitions.CardType
|
|
46156
46118
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
46157
46119
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
46158
46120
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
46159
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
46160
|
-
local game = ____cachedClasses.game
|
|
46161
46121
|
local ____decorators = require("src.decorators")
|
|
46162
46122
|
local Exported = ____decorators.Exported
|
|
46123
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
46124
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
46125
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
46126
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
46163
46127
|
local ____collectibles = require("src.functions.collectibles")
|
|
46164
46128
|
local setCollectibleSubType = ____collectibles.setCollectibleSubType
|
|
46165
46129
|
local ____entities = require("src.functions.entities")
|
|
46166
46130
|
local getEntityID = ____entities.getEntityID
|
|
46131
|
+
local ____pickupsSpecific = require("src.functions.pickupsSpecific")
|
|
46132
|
+
local getCollectibles = ____pickupsSpecific.getCollectibles
|
|
46167
46133
|
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
46168
46134
|
local isCollectible = ____pickupVariants.isCollectible
|
|
46135
|
+
local ____types = require("src.functions.types")
|
|
46136
|
+
local asCollectibleType = ____types.asCollectibleType
|
|
46169
46137
|
local ____Feature = require("src.classes.private.Feature")
|
|
46170
46138
|
local Feature = ____Feature.Feature
|
|
46171
|
-
|
|
46172
|
-
local room = game:GetRoom()
|
|
46173
|
-
local gridIndex = room:GetGridIndex(collectible.Position)
|
|
46174
|
-
return (tostring(gridIndex) .. ",") .. tostring(collectible.InitSeed)
|
|
46175
|
-
end
|
|
46176
|
-
local v = {room = {trackedCollectibles = __TS__New(Map)}}
|
|
46139
|
+
local v = {run = {trackedCollectibles = __TS__New(Map)}}
|
|
46177
46140
|
____exports.PreventCollectibleRotation = __TS__Class()
|
|
46178
46141
|
local PreventCollectibleRotation = ____exports.PreventCollectibleRotation
|
|
46179
46142
|
PreventCollectibleRotation.name = "PreventCollectibleRotation"
|
|
46180
46143
|
__TS__ClassExtends(PreventCollectibleRotation, Feature)
|
|
46181
|
-
function PreventCollectibleRotation.prototype.____constructor(self)
|
|
46144
|
+
function PreventCollectibleRotation.prototype.____constructor(self, pickupIndexCreation)
|
|
46182
46145
|
Feature.prototype.____constructor(self)
|
|
46183
46146
|
self.v = v
|
|
46184
46147
|
self.useCardSoulOfIsaac = function()
|
|
46185
|
-
|
|
46186
|
-
|
|
46187
|
-
|
|
46188
|
-
|
|
46189
|
-
|
|
46190
|
-
end
|
|
46191
|
-
self.callbacksUsed = {{ModCallback.POST_USE_CARD, self.useCardSoulOfIsaac, {CardType.SOUL_ISAAC}}, {ModCallback.POST_PICKUP_UPDATE, self.postPickupUpdateCollectible, {PickupVariant.COLLECTIBLE}}}
|
|
46192
|
-
end
|
|
46193
|
-
function PreventCollectibleRotation.prototype.checkCollectibleRotated(self, collectible)
|
|
46194
|
-
if collectible.SubType == CollectibleType.NULL then
|
|
46195
|
-
return
|
|
46148
|
+
local collectibles = getCollectibles(nil)
|
|
46149
|
+
for ____, collectible in ipairs(collectibles) do
|
|
46150
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
46151
|
+
v.run.trackedCollectibles:delete(pickupIndex)
|
|
46152
|
+
end
|
|
46196
46153
|
end
|
|
46197
|
-
|
|
46198
|
-
|
|
46199
|
-
|
|
46200
|
-
|
|
46154
|
+
self.postPickupChanged = function(____, pickup, oldVariant, _oldSubType, newVariant, newSubType)
|
|
46155
|
+
if oldVariant ~= PickupVariant.COLLECTIBLE or newVariant ~= PickupVariant.COLLECTIBLE then
|
|
46156
|
+
return
|
|
46157
|
+
end
|
|
46158
|
+
if asCollectibleType(nil, newSubType) == CollectibleType.NULL then
|
|
46159
|
+
return
|
|
46160
|
+
end
|
|
46161
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(pickup)
|
|
46162
|
+
local trackedCollectibleType = v.run.trackedCollectibles:get(pickupIndex)
|
|
46163
|
+
if trackedCollectibleType == nil then
|
|
46164
|
+
return
|
|
46165
|
+
end
|
|
46166
|
+
if trackedCollectibleType ~= asCollectibleType(nil, newSubType) then
|
|
46167
|
+
setCollectibleSubType(nil, pickup, trackedCollectibleType)
|
|
46168
|
+
end
|
|
46201
46169
|
end
|
|
46170
|
+
self.featuresUsed = {ISCFeature.PICKUP_INDEX_CREATION}
|
|
46171
|
+
self.callbacksUsed = {{ModCallback.POST_USE_CARD, self.useCardSoulOfIsaac, {CardType.SOUL_ISAAC}}}
|
|
46172
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_PICKUP_CHANGED, self.postPickupChanged}}
|
|
46173
|
+
self.pickupIndexCreation = pickupIndexCreation
|
|
46202
46174
|
end
|
|
46203
46175
|
function PreventCollectibleRotation.prototype.preventCollectibleRotation(self, collectible, collectibleType)
|
|
46204
46176
|
if not isCollectible(nil, collectible) then
|
|
46205
46177
|
local entityID = getEntityID(nil, collectible)
|
|
46206
46178
|
error("The \"preventCollectibleRotate\" function was given a non-collectible: " .. entityID)
|
|
46207
46179
|
end
|
|
46208
|
-
local
|
|
46209
|
-
v.
|
|
46210
|
-
|
|
46180
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
46181
|
+
v.run.trackedCollectibles:set(pickupIndex, collectibleType)
|
|
46182
|
+
if collectible.SubType ~= collectibleType then
|
|
46183
|
+
setCollectibleSubType(nil, collectible, collectibleType)
|
|
46184
|
+
end
|
|
46211
46185
|
end
|
|
46212
46186
|
__TS__Decorate({Exported}, PreventCollectibleRotation.prototype, "preventCollectibleRotation", true)
|
|
46213
46187
|
return ____exports
|
|
@@ -51509,18 +51483,18 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
51509
51483
|
local moddedElementDetection = __TS__New(ModdedElementDetection)
|
|
51510
51484
|
local ponyDetection = __TS__New(PonyDetection)
|
|
51511
51485
|
local pressInput = __TS__New(PressInput)
|
|
51512
|
-
local preventCollectibleRotation = __TS__New(PreventCollectibleRotation)
|
|
51513
51486
|
local roomClearFrame = __TS__New(RoomClearFrame)
|
|
51514
51487
|
local roomHistory = __TS__New(RoomHistory)
|
|
51515
51488
|
local runNextRoom = __TS__New(RunNextRoom)
|
|
51516
51489
|
local saveDataManager = __TS__New(SaveDataManager, mod)
|
|
51517
51490
|
local stageHistory = __TS__New(StageHistory)
|
|
51518
51491
|
local runInNFrames = __TS__New(RunInNFrames, roomHistory)
|
|
51492
|
+
local pickupIndexCreation = __TS__New(PickupIndexCreation, roomHistory, saveDataManager)
|
|
51493
|
+
local preventCollectibleRotation = __TS__New(PreventCollectibleRotation, pickupIndexCreation)
|
|
51519
51494
|
local customGridEntities = __TS__New(CustomGridEntities, runInNFrames)
|
|
51520
51495
|
local moddedElementSets = __TS__New(ModdedElementSets, moddedElementDetection)
|
|
51521
51496
|
local itemPoolDetection = __TS__New(ItemPoolDetection, moddedElementSets)
|
|
51522
51497
|
local pause = __TS__New(Pause, disableInputs)
|
|
51523
|
-
local pickupIndexCreation = __TS__New(PickupIndexCreation, roomHistory, saveDataManager)
|
|
51524
51498
|
local preventGridEntityRespawn = __TS__New(PreventGridEntityRespawn, runInNFrames)
|
|
51525
51499
|
local spawnCollectible = __TS__New(SpawnCollectible, preventCollectibleRotation)
|
|
51526
51500
|
local customTrapdoors = __TS__New(
|