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
|
@@ -12,17 +12,19 @@ import { PlayerIndex } from "../../../types/PlayerIndex";
|
|
|
12
12
|
import { DefaultMap } from "../../DefaultMap";
|
|
13
13
|
import { Feature } from "../../private/Feature";
|
|
14
14
|
|
|
15
|
+
const v = {
|
|
16
|
+
run: {
|
|
17
|
+
playersInventory: new DefaultMap<
|
|
18
|
+
PlayerIndex,
|
|
19
|
+
CollectibleType[],
|
|
20
|
+
[player: EntityPlayer]
|
|
21
|
+
>(() => []),
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
15
25
|
export class PlayerInventory extends Feature {
|
|
16
26
|
/** @internal */
|
|
17
|
-
public override v =
|
|
18
|
-
run: {
|
|
19
|
-
playersInventory: new DefaultMap<
|
|
20
|
-
PlayerIndex,
|
|
21
|
-
CollectibleType[],
|
|
22
|
-
[player: EntityPlayer]
|
|
23
|
-
>(() => []),
|
|
24
|
-
},
|
|
25
|
-
};
|
|
27
|
+
public override v = v;
|
|
26
28
|
|
|
27
29
|
/** @internal */
|
|
28
30
|
constructor() {
|
|
@@ -46,7 +48,7 @@ export class PlayerInventory extends Feature {
|
|
|
46
48
|
collectibleType: CollectibleType,
|
|
47
49
|
) => {
|
|
48
50
|
const inventory = defaultMapGetPlayer(
|
|
49
|
-
|
|
51
|
+
v.run.playersInventory,
|
|
50
52
|
player,
|
|
51
53
|
player,
|
|
52
54
|
);
|
|
@@ -59,7 +61,7 @@ export class PlayerInventory extends Feature {
|
|
|
59
61
|
collectibleType: CollectibleType,
|
|
60
62
|
) => {
|
|
61
63
|
const inventory = defaultMapGetPlayer(
|
|
62
|
-
|
|
64
|
+
v.run.playersInventory,
|
|
63
65
|
player,
|
|
64
66
|
player,
|
|
65
67
|
);
|
|
@@ -94,7 +96,7 @@ export class PlayerInventory extends Feature {
|
|
|
94
96
|
includeActiveCollectibles = true,
|
|
95
97
|
): CollectibleType[] {
|
|
96
98
|
const inventory = defaultMapGetPlayer(
|
|
97
|
-
|
|
99
|
+
v.run.playersInventory,
|
|
98
100
|
player,
|
|
99
101
|
player,
|
|
100
102
|
);
|
|
@@ -17,13 +17,15 @@ const FLAGS_WHEN_PONY_IS_ACTIVE = [
|
|
|
17
17
|
EntityFlag.NO_DAMAGE_BLINK, // 1 << 36
|
|
18
18
|
] as const;
|
|
19
19
|
|
|
20
|
+
const v = {
|
|
21
|
+
run: {
|
|
22
|
+
playersIsPonyActive: new Set<PlayerIndex>(),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
20
26
|
export class PonyDetection extends Feature {
|
|
21
27
|
/** @internal */
|
|
22
|
-
public override v =
|
|
23
|
-
run: {
|
|
24
|
-
playersIsPonyActive: new Set<PlayerIndex>(),
|
|
25
|
-
},
|
|
26
|
-
};
|
|
28
|
+
public override v = v;
|
|
27
29
|
|
|
28
30
|
/** @internal */
|
|
29
31
|
constructor() {
|
|
@@ -45,7 +47,7 @@ export class PonyDetection extends Feature {
|
|
|
45
47
|
effects.HasCollectibleEffect(CollectibleType.PONY) ||
|
|
46
48
|
effects.HasCollectibleEffect(CollectibleType.WHITE_PONY);
|
|
47
49
|
const isPonyActiveOnPreviousFrame = setHasPlayer(
|
|
48
|
-
|
|
50
|
+
v.run.playersIsPonyActive,
|
|
49
51
|
player,
|
|
50
52
|
);
|
|
51
53
|
const hasPonyFlags = hasFlag(entityFlags, ...FLAGS_WHEN_PONY_IS_ACTIVE);
|
|
@@ -53,9 +55,9 @@ export class PonyDetection extends Feature {
|
|
|
53
55
|
const isPonyActiveNow =
|
|
54
56
|
hasPonyCollectibleEffect || (isPonyActiveOnPreviousFrame && hasPonyFlags);
|
|
55
57
|
if (isPonyActiveNow) {
|
|
56
|
-
setAddPlayer(
|
|
58
|
+
setAddPlayer(v.run.playersIsPonyActive, player);
|
|
57
59
|
} else {
|
|
58
|
-
setDeletePlayer(
|
|
60
|
+
setDeletePlayer(v.run.playersIsPonyActive, player);
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
|
|
@@ -67,7 +69,7 @@ export class PonyDetection extends Feature {
|
|
|
67
69
|
*/
|
|
68
70
|
@Exported
|
|
69
71
|
public isPlayerUsingPony(player: EntityPlayer): boolean {
|
|
70
|
-
return setHasPlayer(
|
|
72
|
+
return setHasPlayer(v.run.playersIsPonyActive, player);
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
/**
|
|
@@ -8,13 +8,15 @@ import { getPlayerIndex } from "../../../functions/playerIndex";
|
|
|
8
8
|
import { PlayerIndex } from "../../../types/PlayerIndex";
|
|
9
9
|
import { Feature } from "../../private/Feature";
|
|
10
10
|
|
|
11
|
+
const v = {
|
|
12
|
+
run: {
|
|
13
|
+
buttonActionTuples: [] as Array<[PlayerIndex, ButtonAction]>,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
11
17
|
export class PressInput extends Feature {
|
|
12
18
|
/** @internal */
|
|
13
|
-
public override v =
|
|
14
|
-
run: {
|
|
15
|
-
buttonActionTuples: [] as Array<[PlayerIndex, ButtonAction]>,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
19
|
+
public override v = v;
|
|
18
20
|
|
|
19
21
|
/** @internal */
|
|
20
22
|
constructor() {
|
|
@@ -48,16 +50,16 @@ export class PressInput extends Feature {
|
|
|
48
50
|
|
|
49
51
|
const playerIndex = getPlayerIndex(player);
|
|
50
52
|
|
|
51
|
-
for (let i =
|
|
53
|
+
for (let i = v.run.buttonActionTuples.length - 1; i >= 0; i--) {
|
|
52
54
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
53
|
-
const tuple =
|
|
55
|
+
const tuple = v.run.buttonActionTuples[i]!;
|
|
54
56
|
const [tuplePlayerIndex, tupleButtonAction] = tuple;
|
|
55
57
|
|
|
56
58
|
if (
|
|
57
59
|
tuplePlayerIndex === playerIndex &&
|
|
58
60
|
tupleButtonAction === buttonAction
|
|
59
61
|
) {
|
|
60
|
-
|
|
62
|
+
v.run.buttonActionTuples.splice(i);
|
|
61
63
|
return true;
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -75,6 +77,6 @@ export class PressInput extends Feature {
|
|
|
75
77
|
@Exported
|
|
76
78
|
public pressInput(player: EntityPlayer, buttonAction: ButtonAction): void {
|
|
77
79
|
const playerIndex = getPlayerIndex(player);
|
|
78
|
-
|
|
80
|
+
v.run.buttonActionTuples.push([playerIndex, buttonAction]);
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -2,13 +2,15 @@ import { ModCallback } from "isaac-typescript-definitions";
|
|
|
2
2
|
import { Exported } from "../../../decorators";
|
|
3
3
|
import { Feature } from "../../private/Feature";
|
|
4
4
|
|
|
5
|
+
const v = {
|
|
6
|
+
room: {
|
|
7
|
+
preventingEntities: new Set<PtrHash>(),
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
export class PreventChildEntities extends Feature {
|
|
6
12
|
/** @internal */
|
|
7
|
-
public override v =
|
|
8
|
-
room: {
|
|
9
|
-
preventingEntities: new Set<PtrHash>(),
|
|
10
|
-
},
|
|
11
|
-
};
|
|
13
|
+
public override v = v;
|
|
12
14
|
|
|
13
15
|
/** @internal */
|
|
14
16
|
constructor() {
|
|
@@ -24,11 +26,11 @@ export class PreventChildEntities extends Feature {
|
|
|
24
26
|
private postNPCInit = (npc: EntityNPC) => {
|
|
25
27
|
const spawnerEntityMatch =
|
|
26
28
|
npc.SpawnerEntity !== undefined &&
|
|
27
|
-
|
|
29
|
+
v.room.preventingEntities.has(GetPtrHash(npc.SpawnerEntity));
|
|
28
30
|
|
|
29
31
|
const parentMatch =
|
|
30
32
|
npc.Parent !== undefined &&
|
|
31
|
-
|
|
33
|
+
v.room.preventingEntities.has(GetPtrHash(npc.Parent));
|
|
32
34
|
|
|
33
35
|
if (spawnerEntityMatch || parentMatch) {
|
|
34
36
|
npc.Remove();
|
|
@@ -49,6 +51,6 @@ export class PreventChildEntities extends Feature {
|
|
|
49
51
|
@Exported
|
|
50
52
|
public preventChildEntities(entity: Entity): void {
|
|
51
53
|
const ptrHash = GetPtrHash(entity);
|
|
52
|
-
|
|
54
|
+
v.room.preventingEntities.add(ptrHash);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -11,23 +11,25 @@ import { getEntityID } from "../../../functions/entities";
|
|
|
11
11
|
import { isCollectible } from "../../../functions/pickupVariants";
|
|
12
12
|
import { Feature } from "../../private/Feature";
|
|
13
13
|
|
|
14
|
+
const v = {
|
|
15
|
+
room: {
|
|
16
|
+
/**
|
|
17
|
+
* Index is a string containing the grid index and the InitSeed of the collectible.
|
|
18
|
+
* (e.g. "12,1123579202")
|
|
19
|
+
*
|
|
20
|
+
* (We cannot simply use the InitSeed of the collectible because Diplopia can cause multiple
|
|
21
|
+
* collectibles in the room to have the same InitSeed. However, no two collectibles should ever
|
|
22
|
+
* be on the same grid index.)
|
|
23
|
+
*
|
|
24
|
+
* (We cannot use PtrHash as an index because that stays the same when the item is rolled.)
|
|
25
|
+
*/
|
|
26
|
+
trackedCollectibles: new Map<string, CollectibleType>(),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
14
30
|
export class PreventCollectibleRotation extends Feature {
|
|
15
31
|
/** @internal */
|
|
16
|
-
public override v =
|
|
17
|
-
room: {
|
|
18
|
-
/**
|
|
19
|
-
* Index is a string containing the grid index and the InitSeed of the collectible.
|
|
20
|
-
* (e.g. "12,1123579202")
|
|
21
|
-
*
|
|
22
|
-
* (We cannot simply use the InitSeed of the collectible because Diplopia can cause multiple
|
|
23
|
-
* collectibles in the room to have the same InitSeed. However, no two collectibles should
|
|
24
|
-
* ever be on the same grid index.)
|
|
25
|
-
*
|
|
26
|
-
* (We cannot use PtrHash as an index because that stays the same when the item is rolled.)
|
|
27
|
-
*/
|
|
28
|
-
trackedCollectibles: new Map<string, CollectibleType>(),
|
|
29
|
-
},
|
|
30
|
-
};
|
|
32
|
+
public override v = v;
|
|
31
33
|
|
|
32
34
|
/** @internal */
|
|
33
35
|
constructor() {
|
|
@@ -55,7 +57,7 @@ export class PreventCollectibleRotation extends Feature {
|
|
|
55
57
|
private useCardSoulOfIsaac = () => {
|
|
56
58
|
// Soul of Isaac causes items to flip. Delete all tracked items (assuming that the player
|
|
57
59
|
// deliberately wants to roll a quest item).
|
|
58
|
-
|
|
60
|
+
v.room.trackedCollectibles.clear();
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
// ModCallback.POST_PICKUP_UPDATE (35)
|
|
@@ -73,7 +75,7 @@ export class PreventCollectibleRotation extends Feature {
|
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
const index = getMapIndex(collectible);
|
|
76
|
-
const trackedCollectibleType =
|
|
78
|
+
const trackedCollectibleType = v.room.trackedCollectibles.get(index);
|
|
77
79
|
if (
|
|
78
80
|
trackedCollectibleType !== undefined &&
|
|
79
81
|
collectible.SubType !== trackedCollectibleType
|
|
@@ -108,7 +110,7 @@ export class PreventCollectibleRotation extends Feature {
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
const index = getMapIndex(collectible);
|
|
111
|
-
|
|
113
|
+
v.room.trackedCollectibles.set(index, collectibleType);
|
|
112
114
|
|
|
113
115
|
// The item might have already shifted on the first frame that it spawns, so change it back if
|
|
114
116
|
// necessary.
|
|
@@ -23,19 +23,19 @@ import { DefaultMap } from "../../DefaultMap";
|
|
|
23
23
|
import { Feature } from "../../private/Feature";
|
|
24
24
|
import { RunInNFrames } from "./RunInNFrames";
|
|
25
25
|
|
|
26
|
+
const v = {
|
|
27
|
+
level: {
|
|
28
|
+
roomListIndexToDecorationGridIndexes: new DefaultMap<int, int[]>(() => []),
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
room: {
|
|
32
|
+
manuallyUsingShovel: false,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
26
36
|
export class PreventGridEntityRespawn extends Feature {
|
|
27
37
|
/** @internal */
|
|
28
|
-
public override v =
|
|
29
|
-
level: {
|
|
30
|
-
roomListIndexToDecorationGridIndexes: new DefaultMap<int, int[]>(
|
|
31
|
-
() => [],
|
|
32
|
-
),
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
room: {
|
|
36
|
-
manuallyUsingShovel: false,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
38
|
+
public override v = v;
|
|
39
39
|
|
|
40
40
|
private runInNFrames: RunInNFrames;
|
|
41
41
|
|
|
@@ -71,12 +71,12 @@ export class PreventGridEntityRespawn extends Feature {
|
|
|
71
71
|
_activeSlot: ActiveSlot,
|
|
72
72
|
_customVarData: int,
|
|
73
73
|
): boolean | undefined => {
|
|
74
|
-
if (
|
|
74
|
+
if (v.room.manuallyUsingShovel) {
|
|
75
75
|
return undefined;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
const roomListIndex = getRoomListIndex();
|
|
79
|
-
if (!
|
|
79
|
+
if (!v.level.roomListIndexToDecorationGridIndexes.has(roomListIndex)) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -102,12 +102,12 @@ export class PreventGridEntityRespawn extends Feature {
|
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
v.room.manuallyUsingShovel = true;
|
|
106
106
|
futurePlayer.UseActiveItem(CollectibleType.WE_NEED_TO_GO_DEEPER);
|
|
107
|
-
|
|
107
|
+
v.room.manuallyUsingShovel = false;
|
|
108
108
|
|
|
109
109
|
const decorationGridIndexes =
|
|
110
|
-
|
|
110
|
+
v.level.roomListIndexToDecorationGridIndexes.getAndSetDefault(
|
|
111
111
|
roomListIndex,
|
|
112
112
|
);
|
|
113
113
|
emptyArray(decorationGridIndexes);
|
|
@@ -131,7 +131,7 @@ export class PreventGridEntityRespawn extends Feature {
|
|
|
131
131
|
const room = game.GetRoom();
|
|
132
132
|
const roomListIndex = getRoomListIndex();
|
|
133
133
|
const decorationGridIndexes =
|
|
134
|
-
|
|
134
|
+
v.level.roomListIndexToDecorationGridIndexes.get(roomListIndex);
|
|
135
135
|
if (decorationGridIndexes === undefined) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
@@ -178,7 +178,7 @@ export class PreventGridEntityRespawn extends Feature {
|
|
|
178
178
|
const roomListIndex = getRoomListIndex();
|
|
179
179
|
|
|
180
180
|
const decorationGridIndexes =
|
|
181
|
-
|
|
181
|
+
v.level.roomListIndexToDecorationGridIndexes.getAndSetDefault(
|
|
182
182
|
roomListIndex,
|
|
183
183
|
);
|
|
184
184
|
|
|
@@ -3,14 +3,16 @@ import { Exported } from "../../../decorators";
|
|
|
3
3
|
import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
4
4
|
import { Feature } from "../../private/Feature";
|
|
5
5
|
|
|
6
|
+
const v = {
|
|
7
|
+
room: {
|
|
8
|
+
roomClearGameFrame: undefined as int | undefined,
|
|
9
|
+
roomClearRoomFrame: undefined as int | undefined,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
6
13
|
export class RoomClearFrame extends Feature {
|
|
7
14
|
/** @internal */
|
|
8
|
-
public override v =
|
|
9
|
-
room: {
|
|
10
|
-
roomClearGameFrame: undefined as int | undefined,
|
|
11
|
-
roomClearRoomFrame: undefined as int | undefined,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
15
|
+
public override v = v;
|
|
14
16
|
|
|
15
17
|
/** @internal */
|
|
16
18
|
constructor() {
|
|
@@ -31,8 +33,8 @@ export class RoomClearFrame extends Feature {
|
|
|
31
33
|
const room = game.GetRoom();
|
|
32
34
|
const roomFrameCount = room.GetFrameCount();
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
v.room.roomClearGameFrame = gameFrameCount;
|
|
37
|
+
v.room.roomClearRoomFrame = roomFrameCount;
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
/**
|
|
@@ -43,7 +45,7 @@ export class RoomClearFrame extends Feature {
|
|
|
43
45
|
*/
|
|
44
46
|
@Exported
|
|
45
47
|
public getRoomClearGameFrame(): int | undefined {
|
|
46
|
-
return
|
|
48
|
+
return v.room.roomClearGameFrame;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/**
|
|
@@ -54,6 +56,6 @@ export class RoomClearFrame extends Feature {
|
|
|
54
56
|
*/
|
|
55
57
|
@Exported
|
|
56
58
|
public getRoomClearRoomFrame(): int | undefined {
|
|
57
|
-
return
|
|
59
|
+
return v.room.roomClearGameFrame;
|
|
58
60
|
}
|
|
59
61
|
}
|
|
@@ -15,13 +15,15 @@ import {
|
|
|
15
15
|
import { RoomDescription } from "../../../interfaces/RoomDescription";
|
|
16
16
|
import { Feature } from "../../private/Feature";
|
|
17
17
|
|
|
18
|
+
const v = {
|
|
19
|
+
run: {
|
|
20
|
+
roomHistory: [] as Array<Readonly<RoomDescription>>,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
18
24
|
export class RoomHistory extends Feature {
|
|
19
25
|
/** @internal */
|
|
20
|
-
public override v =
|
|
21
|
-
run: {
|
|
22
|
-
roomHistory: [] as Array<Readonly<RoomDescription>>,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
26
|
+
public override v = v;
|
|
25
27
|
|
|
26
28
|
/** @internal */
|
|
27
29
|
constructor() {
|
|
@@ -64,7 +66,7 @@ export class RoomHistory extends Feature {
|
|
|
64
66
|
roomListIndex,
|
|
65
67
|
roomVisitedCount,
|
|
66
68
|
};
|
|
67
|
-
|
|
69
|
+
v.run.roomHistory.push(roomDescription);
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
/**
|
|
@@ -75,7 +77,7 @@ export class RoomHistory extends Feature {
|
|
|
75
77
|
*/
|
|
76
78
|
@Exported
|
|
77
79
|
public getNumRoomsEntered(): int {
|
|
78
|
-
return
|
|
80
|
+
return v.run.roomHistory.length;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
/**
|
|
@@ -86,7 +88,7 @@ export class RoomHistory extends Feature {
|
|
|
86
88
|
*/
|
|
87
89
|
@Exported
|
|
88
90
|
public getRoomHistory(): ReadonlyArray<Readonly<RoomDescription>> {
|
|
89
|
-
return
|
|
91
|
+
return v.run.roomHistory;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -100,12 +102,12 @@ export class RoomHistory extends Feature {
|
|
|
100
102
|
@Exported
|
|
101
103
|
public getPreviousRoomDescription(): Readonly<RoomDescription> {
|
|
102
104
|
const previousRoomDescription =
|
|
103
|
-
|
|
105
|
+
v.run.roomHistory[v.run.roomHistory.length - 2];
|
|
104
106
|
if (previousRoomDescription !== undefined) {
|
|
105
107
|
return previousRoomDescription;
|
|
106
108
|
}
|
|
107
109
|
|
|
108
|
-
const startingRoomDescription =
|
|
110
|
+
const startingRoomDescription = v.run.roomHistory[0];
|
|
109
111
|
if (startingRoomDescription !== undefined) {
|
|
110
112
|
return startingRoomDescription;
|
|
111
113
|
}
|
|
@@ -128,7 +130,7 @@ export class RoomHistory extends Feature {
|
|
|
128
130
|
*/
|
|
129
131
|
@Exported
|
|
130
132
|
public getLatestRoomDescription(): Readonly<RoomDescription> | undefined {
|
|
131
|
-
return getLastElement(
|
|
133
|
+
return getLastElement(v.run.roomHistory);
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
/**
|
|
@@ -25,17 +25,19 @@ interface IntervalFunction extends QueuedFunction {
|
|
|
25
25
|
numIntervalFrames: int;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
const v = {
|
|
29
|
+
run: {
|
|
30
|
+
queuedGameFunctions: [] as QueuedFunction[],
|
|
31
|
+
queuedRenderFunctions: [] as QueuedFunction[],
|
|
32
|
+
|
|
33
|
+
intervalGameFunctions: [] as IntervalFunction[],
|
|
34
|
+
intervalRenderFunctions: [] as IntervalFunction[],
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
28
38
|
export class RunInNFrames extends Feature {
|
|
29
39
|
/** @internal */
|
|
30
|
-
public override v =
|
|
31
|
-
run: {
|
|
32
|
-
queuedGameFunctions: [] as QueuedFunction[],
|
|
33
|
-
queuedRenderFunctions: [] as QueuedFunction[],
|
|
34
|
-
|
|
35
|
-
intervalGameFunctions: [] as IntervalFunction[],
|
|
36
|
-
intervalRenderFunctions: [] as IntervalFunction[],
|
|
37
|
-
},
|
|
38
|
-
};
|
|
40
|
+
public override v = v;
|
|
39
41
|
|
|
40
42
|
public override vConditionalFunc = (): boolean => false;
|
|
41
43
|
|
|
@@ -64,12 +66,12 @@ export class RunInNFrames extends Feature {
|
|
|
64
66
|
const numRoomsEntered = this.roomHistory.getNumRoomsEntered();
|
|
65
67
|
|
|
66
68
|
checkExecuteQueuedFunctions(
|
|
67
|
-
|
|
69
|
+
v.run.queuedGameFunctions,
|
|
68
70
|
gameFrameCount,
|
|
69
71
|
numRoomsEntered,
|
|
70
72
|
);
|
|
71
73
|
checkExecuteIntervalFunctions(
|
|
72
|
-
|
|
74
|
+
v.run.intervalGameFunctions,
|
|
73
75
|
gameFrameCount,
|
|
74
76
|
numRoomsEntered,
|
|
75
77
|
);
|
|
@@ -81,12 +83,12 @@ export class RunInNFrames extends Feature {
|
|
|
81
83
|
const numRoomsEntered = this.roomHistory.getNumRoomsEntered();
|
|
82
84
|
|
|
83
85
|
checkExecuteQueuedFunctions(
|
|
84
|
-
|
|
86
|
+
v.run.queuedRenderFunctions,
|
|
85
87
|
renderFrameCount,
|
|
86
88
|
numRoomsEntered,
|
|
87
89
|
);
|
|
88
90
|
checkExecuteIntervalFunctions(
|
|
89
|
-
|
|
91
|
+
v.run.intervalRenderFunctions,
|
|
90
92
|
renderFrameCount,
|
|
91
93
|
numRoomsEntered,
|
|
92
94
|
);
|
|
@@ -141,7 +143,7 @@ export class RunInNFrames extends Feature {
|
|
|
141
143
|
numRoomsEntered,
|
|
142
144
|
cancelIfRoomChanges,
|
|
143
145
|
};
|
|
144
|
-
|
|
146
|
+
v.run.queuedGameFunctions.push(queuedFunction);
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
/**
|
|
@@ -177,7 +179,7 @@ export class RunInNFrames extends Feature {
|
|
|
177
179
|
numRoomsEntered,
|
|
178
180
|
cancelIfRoomChanges,
|
|
179
181
|
};
|
|
180
|
-
|
|
182
|
+
v.run.queuedRenderFunctions.push(queuedFunction);
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
/**
|
|
@@ -285,7 +287,7 @@ export class RunInNFrames extends Feature {
|
|
|
285
287
|
cancelIfRoomChanges,
|
|
286
288
|
numIntervalFrames: numGameFrames,
|
|
287
289
|
};
|
|
288
|
-
|
|
290
|
+
v.run.intervalGameFunctions.push(intervalFunction);
|
|
289
291
|
}
|
|
290
292
|
|
|
291
293
|
/**
|
|
@@ -332,7 +334,7 @@ export class RunInNFrames extends Feature {
|
|
|
332
334
|
cancelIfRoomChanges,
|
|
333
335
|
numIntervalFrames: numRenderFrames,
|
|
334
336
|
};
|
|
335
|
-
|
|
337
|
+
v.run.intervalRenderFunctions.push(intervalFunction);
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
|
|
@@ -3,13 +3,15 @@ import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
|
3
3
|
import { emptyArray } from "../../../functions/array";
|
|
4
4
|
import { Feature } from "../../private/Feature";
|
|
5
5
|
|
|
6
|
+
const v = {
|
|
7
|
+
run: {
|
|
8
|
+
queuedFunctions: [] as Array<() => void>,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
6
12
|
export class RunNextRoom extends Feature {
|
|
7
13
|
/** @internal */
|
|
8
|
-
public override v =
|
|
9
|
-
run: {
|
|
10
|
-
queuedFunctions: [] as Array<() => void>,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
14
|
+
public override v = v;
|
|
13
15
|
|
|
14
16
|
public override vConditionalFunc = (): boolean => false;
|
|
15
17
|
|
|
@@ -24,11 +26,11 @@ export class RunNextRoom extends Feature {
|
|
|
24
26
|
|
|
25
27
|
// ModCallbackCustom.POST_NEW_ROOM_REORDERED
|
|
26
28
|
private postNewRoomReordered = () => {
|
|
27
|
-
for (const func of
|
|
29
|
+
for (const func of v.run.queuedFunctions) {
|
|
28
30
|
func();
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
emptyArray(
|
|
33
|
+
emptyArray(v.run.queuedFunctions);
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
/**
|
|
@@ -42,6 +44,6 @@ export class RunNextRoom extends Feature {
|
|
|
42
44
|
*/
|
|
43
45
|
@Exported
|
|
44
46
|
public runNextRoom(func: () => void): void {
|
|
45
|
-
|
|
47
|
+
v.run.queuedFunctions.push(func);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -10,6 +10,7 @@ import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
|
10
10
|
import { SaveDataKey } from "../../../enums/SaveDataKey";
|
|
11
11
|
import { SerializationType } from "../../../enums/SerializationType";
|
|
12
12
|
import { deepCopy } from "../../../functions/deepCopy";
|
|
13
|
+
import { log } from "../../../functions/log";
|
|
13
14
|
import { onFirstFloor } from "../../../functions/stage";
|
|
14
15
|
import { getTSTLClassName, isTSTLClass } from "../../../functions/tstlClass";
|
|
15
16
|
import { isString, isTable } from "../../../functions/types";
|
|
@@ -559,4 +560,14 @@ export class SaveDataManager extends Feature {
|
|
|
559
560
|
public saveDataManagerInMenu(): boolean {
|
|
560
561
|
return !this.loadedDataOnThisRun;
|
|
561
562
|
}
|
|
563
|
+
|
|
564
|
+
@Exported
|
|
565
|
+
public saveDataManagerLogSubscribers(): void {
|
|
566
|
+
log("List of save data manager subscribers:");
|
|
567
|
+
const keys = Object.keys(this.saveDataMap);
|
|
568
|
+
keys.sort();
|
|
569
|
+
for (const key of keys) {
|
|
570
|
+
log(`- ${key}`);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
562
573
|
}
|
|
@@ -14,13 +14,15 @@ import {
|
|
|
14
14
|
import { asNumber } from "../../../functions/types";
|
|
15
15
|
import { Feature } from "../../private/Feature";
|
|
16
16
|
|
|
17
|
+
const v = {
|
|
18
|
+
run: {
|
|
19
|
+
stageHistory: [] as Array<[stage: LevelStage, stageType: StageType]>,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
17
23
|
export class StageHistory extends Feature {
|
|
18
24
|
/** @internal */
|
|
19
|
-
public override v =
|
|
20
|
-
run: {
|
|
21
|
-
stageHistory: [] as Array<[stage: LevelStage, stageType: StageType]>,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
25
|
+
public override v = v;
|
|
24
26
|
|
|
25
27
|
/** @internal */
|
|
26
28
|
constructor() {
|
|
@@ -37,7 +39,7 @@ export class StageHistory extends Feature {
|
|
|
37
39
|
const stage = level.GetStage();
|
|
38
40
|
const stageType = level.GetStageType();
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
v.run.stageHistory.push([stage, stageType]);
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
/**
|
|
@@ -297,7 +299,7 @@ export class StageHistory extends Feature {
|
|
|
297
299
|
public getStageHistory(): ReadonlyArray<
|
|
298
300
|
[stage: LevelStage, stageType: StageType]
|
|
299
301
|
> {
|
|
300
|
-
return
|
|
302
|
+
return v.run.stageHistory;
|
|
301
303
|
}
|
|
302
304
|
|
|
303
305
|
/**
|
|
@@ -313,12 +315,12 @@ export class StageHistory extends Feature {
|
|
|
313
315
|
@Exported
|
|
314
316
|
public hasVisitedStage(stage: LevelStage, stageType?: StageType): boolean {
|
|
315
317
|
if (stageType === undefined) {
|
|
316
|
-
return
|
|
318
|
+
return v.run.stageHistory.some(
|
|
317
319
|
([previousStage]) => previousStage === stage,
|
|
318
320
|
);
|
|
319
321
|
}
|
|
320
322
|
|
|
321
|
-
return
|
|
323
|
+
return v.run.stageHistory.some(
|
|
322
324
|
([previousStage, previousStageType]) =>
|
|
323
325
|
previousStage === stage && previousStageType === stageType,
|
|
324
326
|
);
|