isaacscript-common 25.3.0 → 25.4.0
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 +11 -2
- package/dist/isaacscript-common.lua +779 -684
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostAmbushFinished.lua +4 -3
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostAmbushStarted.lua +4 -3
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostBombInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostBoneSwing.lua +5 -4
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +6 -5
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +6 -5
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCursedTeleport.lua +14 -13
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +4 -3
- package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostEffectInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostEffectStateChanged.lua +8 -7
- package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +8 -7
- package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +2 -0
- package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGameStartedReordered.lua +3 -0
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +2 -0
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +3 -0
- package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGreedModeWave.lua +4 -3
- package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +5 -4
- package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostItemDischarge.lua +20 -19
- package/dist/src/classes/callbacks/PostKeyboardChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostKeyboardChanged.lua +8 -7
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostKnifeInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostLaserInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostLaserInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostNPCInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostNPCInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostNPCStateChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostNPCStateChanged.lua +8 -7
- package/dist/src/classes/callbacks/PostPickupCollect.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPickupCollect.lua +6 -5
- package/dist/src/classes/callbacks/PostPickupInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPickupInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostPickupStateChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPickupStateChanged.lua +8 -7
- package/dist/src/classes/callbacks/PostPlayerChangeHealth.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerChangeHealth.lua +8 -7
- package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +8 -7
- package/dist/src/classes/callbacks/PostPlayerChangeType.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerChangeType.lua +8 -7
- package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +6 -5
- package/dist/src/classes/callbacks/PostPlayerInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPlayerInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostProjectileInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostProjectileInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPurchase.lua +5 -4
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.lua +5 -4
- package/dist/src/classes/callbacks/PostSacrifice.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostSacrifice.lua +5 -4
- package/dist/src/classes/callbacks/PostTearInitLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTearInitLate.lua +6 -5
- package/dist/src/classes/callbacks/PostTearInitVeryLate.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTearInitVeryLate.lua +6 -5
- package/dist/src/classes/callbacks/PostTransformation.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTransformation.lua +8 -7
- package/dist/src/classes/callbacks/PostTrinketBreak.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTrinketBreak.lua +9 -8
- package/dist/src/classes/callbacks/PreNewLevel.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PreNewLevel.lua +4 -3
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +21 -20
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +18 -17
- package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +11 -10
- package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/FlipDetection.lua +4 -3
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +8 -7
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +9 -8
- package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/ItemPickupDetection.lua +7 -6
- package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/PickupChangeDetection.lua +11 -10
- package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +20 -19
- package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +15 -14
- package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.lua +6 -5
- package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/SlotRenderDetection.lua +15 -14
- package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.lua +6 -5
- package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
- package/dist/src/classes/features/other/CollectibleItemPoolType.lua +6 -5
- package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomItemPools.lua +6 -5
- package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomStages.lua +17 -26
- package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomTrapdoors.lua +36 -35
- package/dist/src/classes/features/other/DisableAllSound.d.ts.map +1 -1
- package/dist/src/classes/features/other/DisableAllSound.lua +10 -9
- package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
- package/dist/src/classes/features/other/DisableInputs.lua +21 -20
- package/dist/src/classes/features/other/ExtraConsoleCommands.lua +19 -19
- package/dist/src/classes/features/other/NoSirenSteal.d.ts.map +1 -1
- package/dist/src/classes/features/other/NoSirenSteal.lua +5 -4
- package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
- package/dist/src/classes/features/other/Pause.lua +20 -19
- package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
- package/dist/src/classes/features/other/PersistentEntities.lua +20 -19
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PickupIndexCreation.lua +29 -28
- package/dist/src/classes/features/other/PlayerInventory.d.ts.map +1 -1
- package/dist/src/classes/features/other/PlayerInventory.lua +9 -8
- package/dist/src/classes/features/other/PonyDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/PonyDetection.lua +8 -7
- package/dist/src/classes/features/other/PressInput.d.ts.map +1 -1
- package/dist/src/classes/features/other/PressInput.lua +7 -6
- package/dist/src/classes/features/other/PreventChildEntities.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventChildEntities.lua +7 -6
- package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventCollectibleRotation.lua +7 -6
- package/dist/src/classes/features/other/PreventGridEntityRespawn.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventGridEntityRespawn.lua +16 -15
- package/dist/src/classes/features/other/RoomClearFrame.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomClearFrame.lua +6 -5
- package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomHistory.lua +9 -8
- package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -1
- package/dist/src/classes/features/other/RunInNFrames.lua +14 -13
- package/dist/src/classes/features/other/RunNextRoom.d.ts.map +1 -1
- package/dist/src/classes/features/other/RunNextRoom.lua +6 -5
- package/dist/src/classes/features/other/SaveDataManager.d.ts +1 -0
- package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
- package/dist/src/classes/features/other/SaveDataManager.lua +12 -0
- package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/StageHistory.lua +7 -6
- package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
- package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +18 -17
- package/dist/src/classes/features/other/customStages/streakText.d.ts +3 -25
- package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
- package/dist/src/classes/features/other/customStages/streakText.lua +16 -26
- package/dist/src/classes/features/other/customStages/v.d.ts +25 -0
- package/dist/src/classes/features/other/customStages/v.d.ts.map +1 -0
- package/dist/src/classes/features/other/customStages/v.lua +16 -0
- package/dist/src/classes/features/other/customStages/versusScreen.d.ts +2 -8
- package/dist/src/classes/features/other/customStages/versusScreen.d.ts.map +1 -1
- package/dist/src/classes/features/other/customStages/versusScreen.lua +6 -4
- package/dist/src/enums/ModCallbackCustom.d.ts +6 -0
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/interfaces/SaveData.d.ts.map +1 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +4 -2
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/src/shouldFire.d.ts +1 -0
- package/dist/src/shouldFire.d.ts.map +1 -1
- package/dist/src/shouldFire.lua +5 -0
- package/package.json +1 -1
- package/src/classes/callbacks/PostAmbushFinished.ts +9 -7
- package/src/classes/callbacks/PostAmbushStarted.ts +9 -7
- package/src/classes/callbacks/PostBombInitLate.ts +9 -7
- package/src/classes/callbacks/PostBoneSwing.ts +9 -7
- package/src/classes/callbacks/PostCollectibleEmpty.ts +9 -7
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +9 -7
- package/src/classes/callbacks/PostCursedTeleport.ts +20 -24
- package/src/classes/callbacks/PostDiceRoomActivated.ts +9 -7
- package/src/classes/callbacks/PostEffectInitLate.ts +9 -7
- package/src/classes/callbacks/PostEffectStateChanged.ts +9 -7
- package/src/classes/callbacks/PostFamiliarInitLate.ts +9 -7
- package/src/classes/callbacks/PostFamiliarStateChanged.ts +9 -7
- package/src/classes/callbacks/PostGameStartedReordered.ts +3 -0
- package/src/classes/callbacks/PostGameStartedReorderedLast.ts +3 -0
- package/src/classes/callbacks/PostGreedModeWave.ts +9 -7
- package/src/classes/callbacks/PostHolyMantleRemoved.ts +9 -7
- package/src/classes/callbacks/PostItemDischarge.ts +21 -27
- package/src/classes/callbacks/PostKeyboardChanged.ts +11 -9
- package/src/classes/callbacks/PostKnifeInitLate.ts +9 -7
- package/src/classes/callbacks/PostLaserInitLate.ts +9 -7
- package/src/classes/callbacks/PostNPCInitLate.ts +9 -7
- package/src/classes/callbacks/PostNPCStateChanged.ts +11 -12
- package/src/classes/callbacks/PostPickupCollect.ts +9 -7
- package/src/classes/callbacks/PostPickupInitLate.ts +9 -7
- package/src/classes/callbacks/PostPickupStateChanged.ts +9 -7
- package/src/classes/callbacks/PostPlayerChangeHealth.ts +10 -8
- package/src/classes/callbacks/PostPlayerChangeStat.ts +11 -10
- package/src/classes/callbacks/PostPlayerChangeType.ts +13 -11
- package/src/classes/callbacks/PostPlayerFatalDamage.ts +10 -8
- package/src/classes/callbacks/PostPlayerInitLate.ts +9 -7
- package/src/classes/callbacks/PostProjectileInitLate.ts +9 -7
- package/src/classes/callbacks/PostPurchase.ts +11 -9
- package/src/classes/callbacks/PostRoomClearChanged.ts +10 -8
- package/src/classes/callbacks/PostSacrifice.ts +9 -7
- package/src/classes/callbacks/PostTearInitLate.ts +9 -7
- package/src/classes/callbacks/PostTearInitVeryLate.ts +9 -7
- package/src/classes/callbacks/PostTransformation.ts +12 -10
- package/src/classes/callbacks/PostTrinketBreak.ts +12 -16
- package/src/classes/callbacks/PreNewLevel.ts +9 -7
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +23 -21
- package/src/classes/features/callbackLogic/CustomRevive.ts +26 -27
- package/src/classes/features/callbackLogic/EsauJrDetection.ts +19 -17
- package/src/classes/features/callbackLogic/FlipDetection.ts +10 -8
- package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +11 -9
- package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +13 -12
- package/src/classes/features/callbackLogic/ItemPickupDetection.ts +10 -8
- package/src/classes/features/callbackLogic/PickupChangeDetection.ts +12 -10
- package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +21 -27
- package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +22 -29
- package/src/classes/features/callbackLogic/SlotDestroyedDetection.ts +9 -7
- package/src/classes/features/callbackLogic/SlotRenderDetection.ts +15 -13
- package/src/classes/features/callbackLogic/SlotUpdateDetection.ts +9 -7
- package/src/classes/features/other/CollectibleItemPoolType.ts +9 -7
- package/src/classes/features/other/CustomItemPools.ts +9 -7
- package/src/classes/features/other/CustomPickups.ts +0 -1
- package/src/classes/features/other/CustomStages.ts +16 -44
- package/src/classes/features/other/CustomTrapdoors.ts +53 -54
- package/src/classes/features/other/DisableAllSound.ts +13 -11
- package/src/classes/features/other/DisableInputs.ts +39 -37
- package/src/classes/features/other/ExtraConsoleCommands.ts +19 -19
- package/src/classes/features/other/NoSirenSteal.ts +11 -9
- package/src/classes/features/other/Pause.ts +21 -19
- package/src/classes/features/other/PersistentEntities.ts +33 -31
- package/src/classes/features/other/PickupIndexCreation.ts +35 -33
- package/src/classes/features/other/PlayerInventory.ts +14 -12
- package/src/classes/features/other/PonyDetection.ts +11 -9
- package/src/classes/features/other/PressInput.ts +11 -9
- package/src/classes/features/other/PreventChildEntities.ts +10 -8
- package/src/classes/features/other/PreventCollectibleRotation.ts +20 -18
- package/src/classes/features/other/PreventGridEntityRespawn.ts +18 -18
- package/src/classes/features/other/RoomClearFrame.ts +12 -10
- package/src/classes/features/other/RoomHistory.ts +13 -11
- package/src/classes/features/other/RunInNFrames.ts +19 -17
- package/src/classes/features/other/RunNextRoom.ts +10 -8
- package/src/classes/features/other/SaveDataManager.ts +11 -0
- package/src/classes/features/other/StageHistory.ts +11 -9
- package/src/classes/features/other/TaintedLazarusPlayers.ts +31 -30
- package/src/classes/features/other/customStages/streakText.ts +14 -44
- package/src/classes/features/other/customStages/v.ts +31 -0
- package/src/classes/features/other/customStages/versusScreen.ts +2 -10
- package/src/enums/ModCallbackCustom.ts +6 -0
- package/src/interfaces/SaveData.ts +0 -1
- package/src/interfaces/private/AddCallbackParametersCustom.ts +2 -0
- package/src/shouldFire.ts +10 -0
|
@@ -35,30 +35,31 @@ CustomReviveState.WAITING_FOR_ROOM_TRANSITION = 1
|
|
|
35
35
|
CustomReviveState[CustomReviveState.WAITING_FOR_ROOM_TRANSITION] = "WAITING_FOR_ROOM_TRANSITION"
|
|
36
36
|
CustomReviveState.WAITING_FOR_ITEM_ANIMATION = 2
|
|
37
37
|
CustomReviveState[CustomReviveState.WAITING_FOR_ITEM_ANIMATION] = "WAITING_FOR_ITEM_ANIMATION"
|
|
38
|
+
local v = {run = {state = CustomReviveState.DISABLED, revivalType = nil, dyingPlayerIndex = nil}}
|
|
38
39
|
____exports.CustomRevive = __TS__Class()
|
|
39
40
|
local CustomRevive = ____exports.CustomRevive
|
|
40
41
|
CustomRevive.name = "CustomRevive"
|
|
41
42
|
__TS__ClassExtends(CustomRevive, Feature)
|
|
42
43
|
function CustomRevive.prototype.____constructor(self, preCustomRevive, postCustomRevive, runInNFrames)
|
|
43
44
|
Feature.prototype.____constructor(self)
|
|
44
|
-
self.v =
|
|
45
|
+
self.v = v
|
|
45
46
|
self.postRender = function()
|
|
46
|
-
if
|
|
47
|
+
if v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
47
48
|
return
|
|
48
49
|
end
|
|
49
50
|
sfxManager:Stop(SoundEffect.ONE_UP)
|
|
50
51
|
end
|
|
51
52
|
self.postFamiliarInitOneUp = function(____, familiar)
|
|
52
|
-
if
|
|
53
|
+
if v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
|
|
53
54
|
return
|
|
54
55
|
end
|
|
55
56
|
familiar:Remove()
|
|
56
57
|
end
|
|
57
58
|
self.postNewRoomReordered = function()
|
|
58
|
-
if
|
|
59
|
+
if v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
|
|
59
60
|
return
|
|
60
61
|
end
|
|
61
|
-
|
|
62
|
+
v.run.state = CustomReviveState.WAITING_FOR_ITEM_ANIMATION
|
|
62
63
|
self:logStateChanged()
|
|
63
64
|
end
|
|
64
65
|
self.postPEffectUpdateReordered = function(____, player)
|
|
@@ -79,14 +80,14 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
|
|
|
79
80
|
self.runInNFrames = runInNFrames
|
|
80
81
|
end
|
|
81
82
|
function CustomRevive.prototype.checkWaitingForItemAnimation(self, player)
|
|
82
|
-
if
|
|
83
|
+
if v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
83
84
|
return
|
|
84
85
|
end
|
|
85
|
-
if
|
|
86
|
+
if v.run.dyingPlayerIndex == nil then
|
|
86
87
|
return
|
|
87
88
|
end
|
|
88
89
|
local playerIndex = getPlayerIndex(nil, player)
|
|
89
|
-
if playerIndex ~=
|
|
90
|
+
if playerIndex ~= v.run.dyingPlayerIndex then
|
|
90
91
|
return
|
|
91
92
|
end
|
|
92
93
|
local playerToCheckHoldingItem = player
|
|
@@ -99,12 +100,12 @@ function CustomRevive.prototype.checkWaitingForItemAnimation(self, player)
|
|
|
99
100
|
if not playerToCheckHoldingItem:IsHoldingItem() then
|
|
100
101
|
return
|
|
101
102
|
end
|
|
102
|
-
if
|
|
103
|
-
self.postCustomRevive:fire(playerToCheckHoldingItem,
|
|
103
|
+
if v.run.revivalType ~= nil then
|
|
104
|
+
self.postCustomRevive:fire(playerToCheckHoldingItem, v.run.revivalType)
|
|
104
105
|
end
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
v.run.state = CustomReviveState.DISABLED
|
|
107
|
+
v.run.revivalType = nil
|
|
108
|
+
v.run.dyingPlayerIndex = nil
|
|
108
109
|
self:logStateChanged()
|
|
109
110
|
end
|
|
110
111
|
function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
@@ -112,9 +113,9 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
|
112
113
|
if revivalType == nil then
|
|
113
114
|
return
|
|
114
115
|
end
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
v.run.state = CustomReviveState.WAITING_FOR_ROOM_TRANSITION
|
|
117
|
+
v.run.revivalType = revivalType
|
|
118
|
+
v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
118
119
|
self:logStateChanged()
|
|
119
120
|
player:AddCollectible(CollectibleType.ONE_UP, 0, false)
|
|
120
121
|
removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
|
|
@@ -133,7 +134,7 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
|
133
134
|
end
|
|
134
135
|
function CustomRevive.prototype.logStateChanged(self)
|
|
135
136
|
if DEBUG then
|
|
136
|
-
log(((("Custom revive state changed: " .. CustomReviveState[
|
|
137
|
+
log(((("Custom revive state changed: " .. CustomReviveState[v.run.state]) .. " (") .. tostring(v.run.state)) .. ")")
|
|
137
138
|
end
|
|
138
139
|
end
|
|
139
140
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsauJrDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/EsauJrDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"EsauJrDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/EsauJrDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAUhD,qBAAa,eAAgB,SAAQ,OAAO;IAC1B,CAAC;;;;;;MAAK;IAEtB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe;IAoBpE,OAAO,CAAC,UAAU,CAiChB;IAIF,OAAO,CAAC,aAAa,CAenB;CACH"}
|
|
@@ -11,38 +11,39 @@ local ____players = require("src.functions.players")
|
|
|
11
11
|
local getPlayersWithControllerIndex = ____players.getPlayersWithControllerIndex
|
|
12
12
|
local ____Feature = require("src.classes.private.Feature")
|
|
13
13
|
local Feature = ____Feature.Feature
|
|
14
|
+
local v = {run = {usedEsauJrFrame = nil, usedEsauJrControllerIndex = nil, usedEsauJrAtLeastOnce = false}}
|
|
14
15
|
____exports.EsauJrDetection = __TS__Class()
|
|
15
16
|
local EsauJrDetection = ____exports.EsauJrDetection
|
|
16
17
|
EsauJrDetection.name = "EsauJrDetection"
|
|
17
18
|
__TS__ClassExtends(EsauJrDetection, Feature)
|
|
18
19
|
function EsauJrDetection.prototype.____constructor(self, postEsauJr, postFirstEsauJr)
|
|
19
20
|
Feature.prototype.____constructor(self)
|
|
20
|
-
self.v =
|
|
21
|
+
self.v = v
|
|
21
22
|
self.postUpdate = function()
|
|
22
23
|
local gameFrameCount = game:GetFrameCount()
|
|
23
|
-
if
|
|
24
|
+
if v.run.usedEsauJrFrame == nil or gameFrameCount < v.run.usedEsauJrFrame + 1 then
|
|
24
25
|
return
|
|
25
26
|
end
|
|
26
|
-
|
|
27
|
-
if
|
|
27
|
+
v.run.usedEsauJrFrame = nil
|
|
28
|
+
if v.run.usedEsauJrControllerIndex == nil then
|
|
28
29
|
return
|
|
29
30
|
end
|
|
30
|
-
local players = getPlayersWithControllerIndex(nil,
|
|
31
|
-
|
|
31
|
+
local players = getPlayersWithControllerIndex(nil, v.run.usedEsauJrControllerIndex)
|
|
32
|
+
v.run.usedEsauJrControllerIndex = nil
|
|
32
33
|
local player = players[1]
|
|
33
34
|
if player == nil then
|
|
34
35
|
return
|
|
35
36
|
end
|
|
36
|
-
if not
|
|
37
|
-
|
|
37
|
+
if not v.run.usedEsauJrAtLeastOnce then
|
|
38
|
+
v.run.usedEsauJrAtLeastOnce = true
|
|
38
39
|
self.postFirstEsauJr:fire(player)
|
|
39
40
|
end
|
|
40
41
|
self.postEsauJr:fire(player)
|
|
41
42
|
end
|
|
42
43
|
self.useItemEsauJr = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
43
44
|
local gameFrameCount = game:GetFrameCount()
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
v.run.usedEsauJrFrame = gameFrameCount + 1
|
|
46
|
+
v.run.usedEsauJrControllerIndex = player.ControllerIndex
|
|
46
47
|
return nil
|
|
47
48
|
end
|
|
48
49
|
self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}, {ModCallback.POST_USE_ITEM, self.useItemEsauJr, {CollectibleType.ESAU_JR}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlipDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/FlipDetection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"FlipDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/FlipDetection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD,qBAAa,aAAc,SAAQ,OAAO;IACxB,CAAC;;YANf,2FAA2F;;;MAMvE;IAEtB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,aAAa,CAAgB;gBAEzB,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa;IAc5D,OAAO,CAAC,WAAW,CA2BjB;CACH"}
|
|
@@ -29,13 +29,14 @@ function getNewLazarus(self, oldLazarus)
|
|
|
29
29
|
function(____, player) return player.FrameCount == oldLazarus.FrameCount end
|
|
30
30
|
)
|
|
31
31
|
end
|
|
32
|
+
local v = {run = {usedFlipAtLeastOnce = false}}
|
|
32
33
|
____exports.FlipDetection = __TS__Class()
|
|
33
34
|
local FlipDetection = ____exports.FlipDetection
|
|
34
35
|
FlipDetection.name = "FlipDetection"
|
|
35
36
|
__TS__ClassExtends(FlipDetection, Feature)
|
|
36
37
|
function FlipDetection.prototype.____constructor(self, postFlip, postFirstFlip)
|
|
37
38
|
Feature.prototype.____constructor(self)
|
|
38
|
-
self.v =
|
|
39
|
+
self.v = v
|
|
39
40
|
self.useItemFlip = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
40
41
|
if not isTaintedLazarus(nil, player) then
|
|
41
42
|
return nil
|
|
@@ -44,8 +45,8 @@ function FlipDetection.prototype.____constructor(self, postFlip, postFirstFlip)
|
|
|
44
45
|
if newLazarus == nil then
|
|
45
46
|
return nil
|
|
46
47
|
end
|
|
47
|
-
if not
|
|
48
|
-
|
|
48
|
+
if not v.run.usedFlipAtLeastOnce then
|
|
49
|
+
v.run.usedFlipAtLeastOnce = true
|
|
49
50
|
self.postFirstFlip:fire(newLazarus, player)
|
|
50
51
|
end
|
|
51
52
|
self.postFlip:fire(newLazarus, player)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridEntityCollisionDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityCollisionDetection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"GridEntityCollisionDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityCollisionDetection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAW1D,qBAAa,4BAA6B,SAAQ,OAAO;IACvC,CAAC;;YARf,2CAA2C;;;MAQvB;IAEtB,OAAO,CAAC,uBAAuB,CAA0B;IACzD,OAAO,CAAC,6BAA6B,CAAgC;IACrE,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,uBAAuB,EAAE,uBAAuB,EAChD,6BAA6B,EAAE,6BAA6B,EAC5D,kBAAkB,EAAE,kBAAkB;IAexC,OAAO,CAAC,UAAU,CA0ChB;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
2
|
local Set = ____lualib.Set
|
|
5
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
6
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
7
7
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
8
8
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
@@ -17,16 +17,17 @@ local ____DefaultMap = require("src.classes.DefaultMap")
|
|
|
17
17
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
18
18
|
local ____Feature = require("src.classes.private.Feature")
|
|
19
19
|
local Feature = ____Feature.Feature
|
|
20
|
+
local v = {room = {collidingEntitiesMap = __TS__New(
|
|
21
|
+
DefaultMap,
|
|
22
|
+
function() return __TS__New(Set) end
|
|
23
|
+
)}}
|
|
20
24
|
____exports.GridEntityCollisionDetection = __TS__Class()
|
|
21
25
|
local GridEntityCollisionDetection = ____exports.GridEntityCollisionDetection
|
|
22
26
|
GridEntityCollisionDetection.name = "GridEntityCollisionDetection"
|
|
23
27
|
__TS__ClassExtends(GridEntityCollisionDetection, Feature)
|
|
24
28
|
function GridEntityCollisionDetection.prototype.____constructor(self, postGridEntityCollision, postGridEntityCustomCollision, customGridEntities)
|
|
25
29
|
Feature.prototype.____constructor(self)
|
|
26
|
-
self.v =
|
|
27
|
-
DefaultMap,
|
|
28
|
-
function() return __TS__New(Set) end
|
|
29
|
-
)}}
|
|
30
|
+
self.v = v
|
|
30
31
|
self.postUpdate = function()
|
|
31
32
|
local gridEntities = getGridEntities(nil)
|
|
32
33
|
local gridEntitiesWithCollision = __TS__ArrayFilter(
|
|
@@ -35,7 +36,7 @@ function GridEntityCollisionDetection.prototype.____constructor(self, postGridEn
|
|
|
35
36
|
)
|
|
36
37
|
for ____, gridEntity in ipairs(gridEntitiesWithCollision) do
|
|
37
38
|
local gridEntityPtrHash = GetPtrHash(gridEntity)
|
|
38
|
-
local oldCollidingEntities =
|
|
39
|
+
local oldCollidingEntities = v.room.collidingEntitiesMap:getAndSetDefault(gridEntityPtrHash)
|
|
39
40
|
local collidingEntities = getCollidingEntitiesWithGridEntity(nil, gridEntity)
|
|
40
41
|
for ____, entity in ipairs(collidingEntities) do
|
|
41
42
|
local entityPtrHash = GetPtrHash(entity)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridEntityUpdateDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityUpdateDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,8BAA8B,CAAC;AAO3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,KAAK,eAAe,GAAG;IACrB,cAAc,EAAE,cAAc;IAC9B,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"GridEntityUpdateDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GridEntityUpdateDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,8BAA8B,CAAC;AAO3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,KAAK,eAAe,GAAG;IACrB,cAAc,EAAE,cAAc;IAC9B,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC;AASF,qBAAa,yBAA0B,SAAQ,OAAO;IACpC,CAAC;;YANf,6BAA6B;;;MAMT;IAEtB,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,wBAAwB,CAA2B;IAC3D,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,gCAAgC,CAAmC;IAC3E,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,kBAAkB,EAAE,kBAAkB,EACtC,wBAAwB,EAAE,wBAAwB,EAClD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,0BAA0B,EAAE,0BAA0B,EACtD,gCAAgC,EAAE,gCAAgC,EAClE,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,kBAAkB,EAAE,kBAAkB;IA6BxC,OAAO,CAAC,UAAU,CAmBhB;IAEF,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,2BAA2B;IA0CnC,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,oBAAoB,CAM1B;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
2
|
local Map = ____lualib.Map
|
|
5
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
6
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
7
7
|
local ____exports = {}
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
@@ -16,13 +16,14 @@ local getGridEntitiesMap = ____gridEntities.getGridEntitiesMap
|
|
|
16
16
|
local isGridEntityBroken = ____gridEntities.isGridEntityBroken
|
|
17
17
|
local ____Feature = require("src.classes.private.Feature")
|
|
18
18
|
local Feature = ____Feature.Feature
|
|
19
|
+
local v = {room = {initializedGridEntities = __TS__New(Map)}}
|
|
19
20
|
____exports.GridEntityUpdateDetection = __TS__Class()
|
|
20
21
|
local GridEntityUpdateDetection = ____exports.GridEntityUpdateDetection
|
|
21
22
|
GridEntityUpdateDetection.name = "GridEntityUpdateDetection"
|
|
22
23
|
__TS__ClassExtends(GridEntityUpdateDetection, Feature)
|
|
23
24
|
function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntityInit, postGridEntityCustomInit, postGridEntityUpdate, postGridEntityCustomUpdate, postGridEntityRemove, postGridEntityCustomRemove, postGridEntityStateChanged, postGridEntityCustomStateChanged, postGridEntityBroken, postGridEntityCustomBroken, customGridEntities)
|
|
24
25
|
Feature.prototype.____constructor(self)
|
|
25
|
-
self.v =
|
|
26
|
+
self.v = v
|
|
26
27
|
self.postUpdate = function()
|
|
27
28
|
local gridEntitiesMap = getGridEntitiesMap(nil)
|
|
28
29
|
self:checkGridEntitiesRemoved(gridEntitiesMap)
|
|
@@ -63,13 +64,13 @@ function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntit
|
|
|
63
64
|
self.customGridEntities = customGridEntities
|
|
64
65
|
end
|
|
65
66
|
function GridEntityUpdateDetection.prototype.checkGridEntitiesRemoved(self, gridEntitiesMap)
|
|
66
|
-
for ____, ____value in __TS__Iterator(
|
|
67
|
+
for ____, ____value in __TS__Iterator(v.room.initializedGridEntities) do
|
|
67
68
|
local gridIndex = ____value[1]
|
|
68
69
|
local gridEntityTuple = ____value[2]
|
|
69
70
|
local storedGridEntityType, storedGridEntityVariant = table.unpack(gridEntityTuple)
|
|
70
71
|
local gridEntity = gridEntitiesMap:get(gridIndex)
|
|
71
72
|
if gridEntity == nil or gridEntity:GetType() ~= storedGridEntityType then
|
|
72
|
-
|
|
73
|
+
v.room.initializedGridEntities:delete(gridIndex)
|
|
73
74
|
local gridEntityTypeCustom = self.customGridEntities:getCustomGridEntityType(gridIndex)
|
|
74
75
|
if gridEntityTypeCustom == nil then
|
|
75
76
|
self.postGridEntityRemove:fire(gridIndex, storedGridEntityType, storedGridEntityVariant)
|
|
@@ -80,7 +81,7 @@ function GridEntityUpdateDetection.prototype.checkGridEntitiesRemoved(self, grid
|
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
function GridEntityUpdateDetection.prototype.checkGridEntityStateChanged(self, gridIndex, gridEntity)
|
|
83
|
-
local gridEntityTuple =
|
|
84
|
+
local gridEntityTuple = v.room.initializedGridEntities:get(gridIndex)
|
|
84
85
|
if gridEntityTuple == nil then
|
|
85
86
|
return
|
|
86
87
|
end
|
|
@@ -105,7 +106,7 @@ function GridEntityUpdateDetection.prototype.checkGridEntityStateChanged(self, g
|
|
|
105
106
|
end
|
|
106
107
|
function GridEntityUpdateDetection.prototype.checkNewGridEntity(self, gridIndex, gridEntity)
|
|
107
108
|
local gridEntityType = gridEntity:GetType()
|
|
108
|
-
local gridEntityTuple =
|
|
109
|
+
local gridEntityTuple = v.room.initializedGridEntities:get(gridIndex)
|
|
109
110
|
if gridEntityTuple == nil or gridEntityTuple[1] ~= gridEntityType then
|
|
110
111
|
self:updateTupleInMap(gridEntity)
|
|
111
112
|
local gridEntityTypeCustom = self.customGridEntities:getCustomGridEntityType(gridEntity)
|
|
@@ -121,6 +122,6 @@ function GridEntityUpdateDetection.prototype.updateTupleInMap(self, gridEntity)
|
|
|
121
122
|
local variant = gridEntity:GetVariant()
|
|
122
123
|
local gridIndex = gridEntity:GetGridIndex()
|
|
123
124
|
local newTuple = {gridEntityType, variant, gridEntity.State}
|
|
124
|
-
|
|
125
|
+
v.room.initializedGridEntities:set(gridIndex, newTuple)
|
|
125
126
|
end
|
|
126
127
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemPickupDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/ItemPickupDetection.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,aAAa,EAEd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ItemPickupDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/ItemPickupDetection.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,aAAa,EAEd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAUhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9B,CAAC;;;;MAAK;IAEtB,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa;IAexE,OAAO,CAAC,0BAA0B,CAehC;IAEF,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,aAAa;CAkBtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
2
3
|
local __TS__Class = ____lualib.__TS__Class
|
|
3
4
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
-
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
@@ -18,18 +18,19 @@ local ____DefaultMap = require("src.classes.DefaultMap")
|
|
|
18
18
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
19
19
|
local ____Feature = require("src.classes.private.Feature")
|
|
20
20
|
local Feature = ____Feature.Feature
|
|
21
|
+
local v = {run = {playersPickingUpItemMap = __TS__New(
|
|
22
|
+
DefaultMap,
|
|
23
|
+
function() return newPickingUpItem(nil) end
|
|
24
|
+
)}}
|
|
21
25
|
____exports.ItemPickupDetection = __TS__Class()
|
|
22
26
|
local ItemPickupDetection = ____exports.ItemPickupDetection
|
|
23
27
|
ItemPickupDetection.name = "ItemPickupDetection"
|
|
24
28
|
__TS__ClassExtends(ItemPickupDetection, Feature)
|
|
25
29
|
function ItemPickupDetection.prototype.____constructor(self, postItemPickup, preItemPickup)
|
|
26
30
|
Feature.prototype.____constructor(self)
|
|
27
|
-
self.v =
|
|
28
|
-
DefaultMap,
|
|
29
|
-
function() return newPickingUpItem(nil) end
|
|
30
|
-
)}}
|
|
31
|
+
self.v = v
|
|
31
32
|
self.postPEffectUpdateReordered = function(____, player)
|
|
32
|
-
local pickingUpItem = defaultMapGetPlayer(nil,
|
|
33
|
+
local pickingUpItem = defaultMapGetPlayer(nil, v.run.playersPickingUpItemMap, player)
|
|
33
34
|
if player:IsItemQueueEmpty() then
|
|
34
35
|
self:queueEmpty(player, pickingUpItem)
|
|
35
36
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickupChangeDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PickupChangeDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"PickupChangeDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PickupChangeDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AASnE,qBAAa,qBAAsB,SAAQ,OAAO;IAChC,CAAC;;;;;MAAK;IAEtB,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,mBAAmB,CAAsB;gBAG/C,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB;IAgB1C,OAAO,CAAC,gBAAgB,CAuBtB;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
2
|
local Map = ____lualib.Map
|
|
5
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
@@ -10,22 +10,23 @@ local ____ISCFeature = require("src.enums.ISCFeature")
|
|
|
10
10
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
11
11
|
local ____Feature = require("src.classes.private.Feature")
|
|
12
12
|
local Feature = ____Feature.Feature
|
|
13
|
+
local v = {room = {
|
|
14
|
+
pickupVariants = __TS__New(Map),
|
|
15
|
+
pickupSubTypes = __TS__New(Map)
|
|
16
|
+
}}
|
|
13
17
|
____exports.PickupChangeDetection = __TS__Class()
|
|
14
18
|
local PickupChangeDetection = ____exports.PickupChangeDetection
|
|
15
19
|
PickupChangeDetection.name = "PickupChangeDetection"
|
|
16
20
|
__TS__ClassExtends(PickupChangeDetection, Feature)
|
|
17
21
|
function PickupChangeDetection.prototype.____constructor(self, postPickupChanged, pickupIndexCreation)
|
|
18
22
|
Feature.prototype.____constructor(self)
|
|
19
|
-
self.v =
|
|
20
|
-
pickupVariants = __TS__New(Map),
|
|
21
|
-
pickupSubTypes = __TS__New(Map)
|
|
22
|
-
}}
|
|
23
|
+
self.v = v
|
|
23
24
|
self.postPickupUpdate = function(____, pickup)
|
|
24
25
|
local pickupIndex = self.pickupIndexCreation:getPickupIndex(pickup)
|
|
25
|
-
local oldVariant =
|
|
26
|
-
|
|
27
|
-
local oldSubType =
|
|
28
|
-
|
|
26
|
+
local oldVariant = v.room.pickupVariants:get(pickupIndex)
|
|
27
|
+
v.room.pickupVariants:set(pickupIndex, pickup.Variant)
|
|
28
|
+
local oldSubType = v.room.pickupSubTypes:get(pickupIndex)
|
|
29
|
+
v.room.pickupSubTypes:set(pickupIndex, pickup.SubType)
|
|
29
30
|
if oldVariant == nil or oldSubType == nil then
|
|
30
31
|
return
|
|
31
32
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerCollectibleDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PlayerCollectibleDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAKhB,MAAM,8BAA8B,CAAC;AAatC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlayerCollectibleDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PlayerCollectibleDetection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAKhB,MAAM,8BAA8B,CAAC;AAatC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAgBrD,qBAAa,0BAA2B,SAAQ,OAAO;IACrC,CAAC;;;;;;MAAK;IAEtB,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,4BAA4B,CAA+B;IACnE,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,YAAY,CAAe;gBAGjC,0BAA0B,EAAE,0BAA0B,EACtD,4BAA4B,EAAE,4BAA4B,EAC1D,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY;IA6B5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,2BAA2B;IA0CnC,OAAO,CAAC,SAAS,CAqBf;IAEF,gEAAgE;IAEhE,OAAO,CAAC,mBAAmB,CA2BzB;IAEF;;;OAGG;IAEH,OAAO,CAAC,cAAc,CAepB;IAGF,OAAO,CAAC,0BAA0B,CAiBhC;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,uBAAuB;CA+BhC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
2
|
local __TS__New = ____lualib.__TS__New
|
|
5
3
|
local Map = ____lualib.Map
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
6
|
local Set = ____lualib.Set
|
|
7
7
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
8
8
|
local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
|
|
@@ -38,23 +38,24 @@ local ____DefaultMap = require("src.classes.DefaultMap")
|
|
|
38
38
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
39
39
|
local ____Feature = require("src.classes.private.Feature")
|
|
40
40
|
local Feature = ____Feature.Feature
|
|
41
|
+
local v = {run = {
|
|
42
|
+
playersCollectibleCount = __TS__New(DefaultMap, 0),
|
|
43
|
+
playersCollectibleMap = __TS__New(
|
|
44
|
+
DefaultMap,
|
|
45
|
+
function() return __TS__New(Map) end
|
|
46
|
+
),
|
|
47
|
+
playersActiveItemMap = __TS__New(
|
|
48
|
+
DefaultMap,
|
|
49
|
+
function() return __TS__New(Map) end
|
|
50
|
+
)
|
|
51
|
+
}}
|
|
41
52
|
____exports.PlayerCollectibleDetection = __TS__Class()
|
|
42
53
|
local PlayerCollectibleDetection = ____exports.PlayerCollectibleDetection
|
|
43
54
|
PlayerCollectibleDetection.name = "PlayerCollectibleDetection"
|
|
44
55
|
__TS__ClassExtends(PlayerCollectibleDetection, Feature)
|
|
45
56
|
function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCollectibleAdded, postPlayerCollectibleRemoved, moddedElementSets, runInNFrames)
|
|
46
57
|
Feature.prototype.____constructor(self)
|
|
47
|
-
self.v =
|
|
48
|
-
playersCollectibleCount = __TS__New(DefaultMap, 0),
|
|
49
|
-
playersCollectibleMap = __TS__New(
|
|
50
|
-
DefaultMap,
|
|
51
|
-
function() return __TS__New(Map) end
|
|
52
|
-
),
|
|
53
|
-
playersActiveItemMap = __TS__New(
|
|
54
|
-
DefaultMap,
|
|
55
|
-
function() return __TS__New(Map) end
|
|
56
|
-
)
|
|
57
|
-
}}
|
|
58
|
+
self.v = v
|
|
58
59
|
self.useItemD4 = function(____, _collectibleType, _rng, player)
|
|
59
60
|
self:updateCollectibleMapAndFire(player, nil)
|
|
60
61
|
return nil
|
|
@@ -81,13 +82,13 @@ function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCo
|
|
|
81
82
|
return
|
|
82
83
|
end
|
|
83
84
|
local newCollectibleCount = player:GetCollectibleCount()
|
|
84
|
-
mapSetPlayer(nil,
|
|
85
|
+
mapSetPlayer(nil, v.run.playersCollectibleCount, player, newCollectibleCount)
|
|
85
86
|
self:updateCollectibleMapAndFire(player, 1)
|
|
86
87
|
end
|
|
87
88
|
self.postPEffectUpdateReordered = function(____, player)
|
|
88
|
-
local oldCollectibleCount = defaultMapGetPlayer(nil,
|
|
89
|
+
local oldCollectibleCount = defaultMapGetPlayer(nil, v.run.playersCollectibleCount, player)
|
|
89
90
|
local newCollectibleCount = player:GetCollectibleCount()
|
|
90
|
-
mapSetPlayer(nil,
|
|
91
|
+
mapSetPlayer(nil, v.run.playersCollectibleCount, player, newCollectibleCount)
|
|
91
92
|
local difference = newCollectibleCount - oldCollectibleCount
|
|
92
93
|
if difference > 0 then
|
|
93
94
|
self:updateCollectibleMapAndFire(player, difference)
|
|
@@ -106,9 +107,9 @@ function PlayerCollectibleDetection.prototype.____constructor(self, postPlayerCo
|
|
|
106
107
|
self.runInNFrames = runInNFrames
|
|
107
108
|
end
|
|
108
109
|
function PlayerCollectibleDetection.prototype.updateCollectibleMapAndFire(self, player, numCollectiblesChanged)
|
|
109
|
-
local oldCollectibleMap = defaultMapGetPlayer(nil,
|
|
110
|
+
local oldCollectibleMap = defaultMapGetPlayer(nil, v.run.playersCollectibleMap, player)
|
|
110
111
|
local newCollectibleMap = self.moddedElementSets:getPlayerCollectibleMap(player)
|
|
111
|
-
mapSetPlayer(nil,
|
|
112
|
+
mapSetPlayer(nil, v.run.playersCollectibleMap, player, newCollectibleMap)
|
|
112
113
|
local ____Set_1 = Set
|
|
113
114
|
local ____array_0 = __TS__SparseArrayNew(__TS__Spread(oldCollectibleMap:keys()))
|
|
114
115
|
__TS__SparseArrayPush(
|
|
@@ -144,7 +145,7 @@ function PlayerCollectibleDetection.prototype.updateCollectibleMapAndFire(self,
|
|
|
144
145
|
end
|
|
145
146
|
end
|
|
146
147
|
function PlayerCollectibleDetection.prototype.checkActiveItemsChanged(self, player)
|
|
147
|
-
local activeItemMap = defaultMapGetPlayer(nil,
|
|
148
|
+
local activeItemMap = defaultMapGetPlayer(nil, v.run.playersActiveItemMap, player)
|
|
148
149
|
local oldCollectibleTypes = {}
|
|
149
150
|
local newCollectibleTypes = {}
|
|
150
151
|
for ____, activeSlot in ipairs(ACTIVE_SLOT_VALUES) do
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlayerReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAYhD,qBAAa,wBAAyB,SAAQ,OAAO;IACnC,CAAC;;;;;;;MAAK;IAEtB,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,yBAAyB,CAA4B;IAC7D,OAAO,CAAC,yBAAyB,CAA4B;gBAG3D,0BAA0B,EAAE,0BAA0B,EACtD,yBAAyB,EAAE,yBAAyB,EACpD,yBAAyB,EAAE,yBAAyB;IA4BtD,OAAO,CAAC,iBAAiB,CAQvB;IAGF,OAAO,CAAC,gBAAgB,CAQtB;IAGF,OAAO,CAAC,gBAAgB,CAWtB;IAGF,OAAO,CAAC,4BAA4B,CAMlC;CACH"}
|
|
@@ -23,45 +23,46 @@ function dequeue(self, playerIndexes, fireFunc)
|
|
|
23
23
|
end
|
|
24
24
|
emptyArray(nil, playerIndexes)
|
|
25
25
|
end
|
|
26
|
+
local v = {run = {postGameStartedFiredOnThisRun = false, postPEffectUpdateQueue = {}, postPlayerUpdateQueue = {}, postPlayerRenderQueue = {}}}
|
|
26
27
|
____exports.PlayerReorderedCallbacks = __TS__Class()
|
|
27
28
|
local PlayerReorderedCallbacks = ____exports.PlayerReorderedCallbacks
|
|
28
29
|
PlayerReorderedCallbacks.name = "PlayerReorderedCallbacks"
|
|
29
30
|
__TS__ClassExtends(PlayerReorderedCallbacks, Feature)
|
|
30
31
|
function PlayerReorderedCallbacks.prototype.____constructor(self, postPEffectUpdateReordered, postPlayerRenderReordered, postPlayerUpdateReordered)
|
|
31
32
|
Feature.prototype.____constructor(self)
|
|
32
|
-
self.v =
|
|
33
|
+
self.v = v
|
|
33
34
|
self.postPEffectUpdate = function(____, player)
|
|
34
|
-
if
|
|
35
|
+
if v.run.postGameStartedFiredOnThisRun then
|
|
35
36
|
self.postPEffectUpdateReordered:fire(player)
|
|
36
37
|
else
|
|
37
38
|
local playerIndex = getPlayerIndex(nil, player)
|
|
38
|
-
local
|
|
39
|
-
|
|
39
|
+
local ____v_run_postPEffectUpdateQueue_0 = v.run.postPEffectUpdateQueue
|
|
40
|
+
____v_run_postPEffectUpdateQueue_0[#____v_run_postPEffectUpdateQueue_0 + 1] = playerIndex
|
|
40
41
|
end
|
|
41
42
|
end
|
|
42
43
|
self.postPlayerUpdate = function(____, player)
|
|
43
|
-
if
|
|
44
|
+
if v.run.postGameStartedFiredOnThisRun then
|
|
44
45
|
self.postPlayerUpdateReordered:fire(player)
|
|
45
46
|
else
|
|
46
47
|
local playerIndex = getPlayerIndex(nil, player)
|
|
47
|
-
local
|
|
48
|
-
|
|
48
|
+
local ____v_run_postPlayerUpdateQueue_1 = v.run.postPlayerUpdateQueue
|
|
49
|
+
____v_run_postPlayerUpdateQueue_1[#____v_run_postPlayerUpdateQueue_1 + 1] = playerIndex
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
self.postPlayerRender = function(____, player, _renderOffset)
|
|
52
|
-
if
|
|
53
|
+
if v.run.postGameStartedFiredOnThisRun then
|
|
53
54
|
self.postPlayerRenderReordered:fire(player)
|
|
54
55
|
else
|
|
55
56
|
local playerIndex = getPlayerIndex(nil, player)
|
|
56
|
-
local
|
|
57
|
-
|
|
57
|
+
local ____v_run_postPlayerRenderQueue_2 = v.run.postPlayerRenderQueue
|
|
58
|
+
____v_run_postPlayerRenderQueue_2[#____v_run_postPlayerRenderQueue_2 + 1] = playerIndex
|
|
58
59
|
end
|
|
59
60
|
end
|
|
60
61
|
self.postGameStartedReorderedLast = function()
|
|
61
|
-
|
|
62
|
-
dequeue(nil,
|
|
63
|
-
dequeue(nil,
|
|
64
|
-
dequeue(nil,
|
|
62
|
+
v.run.postGameStartedFiredOnThisRun = true
|
|
63
|
+
dequeue(nil, v.run.postPEffectUpdateQueue, self.postPEffectUpdateReordered.fire)
|
|
64
|
+
dequeue(nil, v.run.postPlayerUpdateQueue, self.postPlayerUpdateReordered.fire)
|
|
65
|
+
dequeue(nil, v.run.postPlayerRenderQueue, self.postPlayerRenderReordered.fire)
|
|
65
66
|
end
|
|
66
67
|
self.callbacksUsed = {{ModCallback.POST_PEFFECT_UPDATE, self.postPEffectUpdate}, {ModCallback.POST_PLAYER_UPDATE, self.postPlayerUpdate}, {ModCallback.POST_PLAYER_RENDER, self.postPlayerRender}}
|
|
67
68
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_GAME_STARTED_REORDERED_LAST, self.postGameStartedReorderedLast}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotDestroyedDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotDestroyedDetection.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"SlotDestroyedDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotDestroyedDetection.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQnD,qBAAa,sBAAuB,SAAQ,OAAO;IACjC,CAAC;;;;MAAK;IAEtB,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,WAAW,CAAc;gBAErB,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW;IAwB1E,OAAO,CAAC,oBAAoB,CAc1B;IAEF,OAAO,CAAC,2BAA2B;IAInC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,cAAc,CASpB;IAEF;;;;;OAKG;IACH,OAAO,CAAC,gCAAgC;CAOzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
2
|
local Set = ____lualib.Set
|
|
5
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local EntityGridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityGridCollisionClass
|
|
@@ -18,13 +18,14 @@ local ____slots = require("src.functions.slots")
|
|
|
18
18
|
local isSlotMachine = ____slots.isSlotMachine
|
|
19
19
|
local ____Feature = require("src.classes.private.Feature")
|
|
20
20
|
local Feature = ____Feature.Feature
|
|
21
|
+
local v = {room = {destroyedSlotSet = __TS__New(Set)}}
|
|
21
22
|
____exports.SlotDestroyedDetection = __TS__Class()
|
|
22
23
|
local SlotDestroyedDetection = ____exports.SlotDestroyedDetection
|
|
23
24
|
SlotDestroyedDetection.name = "SlotDestroyedDetection"
|
|
24
25
|
__TS__ClassExtends(SlotDestroyedDetection, Feature)
|
|
25
26
|
function SlotDestroyedDetection.prototype.____constructor(self, postSlotDestroyed, roomHistory)
|
|
26
27
|
Feature.prototype.____constructor(self)
|
|
27
|
-
self.v =
|
|
28
|
+
self.v = v
|
|
28
29
|
self.postEntityRemoveSlot = function(____, entity)
|
|
29
30
|
local slot = entity
|
|
30
31
|
if self.roomHistory:isLeavingRoom() then
|
|
@@ -38,7 +39,7 @@ function SlotDestroyedDetection.prototype.____constructor(self, postSlotDestroye
|
|
|
38
39
|
end
|
|
39
40
|
self.postSlotUpdate = function(____, slot)
|
|
40
41
|
local ptrHash = GetPtrHash(slot)
|
|
41
|
-
local alreadyDestroyed =
|
|
42
|
+
local alreadyDestroyed = v.room.destroyedSlotSet:has(ptrHash)
|
|
42
43
|
if alreadyDestroyed then
|
|
43
44
|
return
|
|
44
45
|
end
|
|
@@ -62,7 +63,7 @@ end
|
|
|
62
63
|
function SlotDestroyedDetection.prototype.checkDestroyedFromCollisionClass(self, slot)
|
|
63
64
|
if slot.GridCollisionClass == EntityGridCollisionClass.GROUND then
|
|
64
65
|
local ptrHash = GetPtrHash(slot)
|
|
65
|
-
|
|
66
|
+
v.room.destroyedSlotSet:add(ptrHash)
|
|
66
67
|
self.postSlotDestroyed:fire(slot, SlotDestructionType.NORMAL)
|
|
67
68
|
end
|
|
68
69
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotRenderDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotRenderDetection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SlotRenderDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotRenderDetection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAchD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9B,CAAC;;;;;MAAK;IAEtB,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,wBAAwB,CAA2B;gBAGzD,cAAc,EAAE,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB;IAcpD,OAAO,CAAC,UAAU,CAKhB;IAEF,OAAO,CAAC,yBAAyB;CAkBlC"}
|