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.
Files changed (259) hide show
  1. package/dist/index.rollup.d.ts +11 -2
  2. package/dist/isaacscript-common.lua +779 -684
  3. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -1
  4. package/dist/src/classes/callbacks/PostAmbushFinished.lua +4 -3
  5. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -1
  6. package/dist/src/classes/callbacks/PostAmbushStarted.lua +4 -3
  7. package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -1
  8. package/dist/src/classes/callbacks/PostBombInitLate.lua +6 -5
  9. package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -1
  10. package/dist/src/classes/callbacks/PostBoneSwing.lua +5 -4
  11. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
  12. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +6 -5
  13. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -1
  14. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +6 -5
  15. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -1
  16. package/dist/src/classes/callbacks/PostCursedTeleport.lua +14 -13
  17. package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
  18. package/dist/src/classes/callbacks/PostDiceRoomActivated.lua +4 -3
  19. package/dist/src/classes/callbacks/PostEffectInitLate.d.ts.map +1 -1
  20. package/dist/src/classes/callbacks/PostEffectInitLate.lua +6 -5
  21. package/dist/src/classes/callbacks/PostEffectStateChanged.d.ts.map +1 -1
  22. package/dist/src/classes/callbacks/PostEffectStateChanged.lua +8 -7
  23. package/dist/src/classes/callbacks/PostFamiliarInitLate.d.ts.map +1 -1
  24. package/dist/src/classes/callbacks/PostFamiliarInitLate.lua +6 -5
  25. package/dist/src/classes/callbacks/PostFamiliarStateChanged.d.ts.map +1 -1
  26. package/dist/src/classes/callbacks/PostFamiliarStateChanged.lua +8 -7
  27. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts +2 -0
  28. package/dist/src/classes/callbacks/PostGameStartedReordered.d.ts.map +1 -1
  29. package/dist/src/classes/callbacks/PostGameStartedReordered.lua +3 -0
  30. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts +2 -0
  31. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.d.ts.map +1 -1
  32. package/dist/src/classes/callbacks/PostGameStartedReorderedLast.lua +3 -0
  33. package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -1
  34. package/dist/src/classes/callbacks/PostGreedModeWave.lua +4 -3
  35. package/dist/src/classes/callbacks/PostHolyMantleRemoved.d.ts.map +1 -1
  36. package/dist/src/classes/callbacks/PostHolyMantleRemoved.lua +5 -4
  37. package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
  38. package/dist/src/classes/callbacks/PostItemDischarge.lua +20 -19
  39. package/dist/src/classes/callbacks/PostKeyboardChanged.d.ts.map +1 -1
  40. package/dist/src/classes/callbacks/PostKeyboardChanged.lua +8 -7
  41. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -1
  42. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +6 -5
  43. package/dist/src/classes/callbacks/PostLaserInitLate.d.ts.map +1 -1
  44. package/dist/src/classes/callbacks/PostLaserInitLate.lua +6 -5
  45. package/dist/src/classes/callbacks/PostNPCInitLate.d.ts.map +1 -1
  46. package/dist/src/classes/callbacks/PostNPCInitLate.lua +6 -5
  47. package/dist/src/classes/callbacks/PostNPCStateChanged.d.ts.map +1 -1
  48. package/dist/src/classes/callbacks/PostNPCStateChanged.lua +8 -7
  49. package/dist/src/classes/callbacks/PostPickupCollect.d.ts.map +1 -1
  50. package/dist/src/classes/callbacks/PostPickupCollect.lua +6 -5
  51. package/dist/src/classes/callbacks/PostPickupInitLate.d.ts.map +1 -1
  52. package/dist/src/classes/callbacks/PostPickupInitLate.lua +6 -5
  53. package/dist/src/classes/callbacks/PostPickupStateChanged.d.ts.map +1 -1
  54. package/dist/src/classes/callbacks/PostPickupStateChanged.lua +8 -7
  55. package/dist/src/classes/callbacks/PostPlayerChangeHealth.d.ts.map +1 -1
  56. package/dist/src/classes/callbacks/PostPlayerChangeHealth.lua +8 -7
  57. package/dist/src/classes/callbacks/PostPlayerChangeStat.d.ts.map +1 -1
  58. package/dist/src/classes/callbacks/PostPlayerChangeStat.lua +8 -7
  59. package/dist/src/classes/callbacks/PostPlayerChangeType.d.ts.map +1 -1
  60. package/dist/src/classes/callbacks/PostPlayerChangeType.lua +8 -7
  61. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -1
  62. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +6 -5
  63. package/dist/src/classes/callbacks/PostPlayerInitLate.d.ts.map +1 -1
  64. package/dist/src/classes/callbacks/PostPlayerInitLate.lua +6 -5
  65. package/dist/src/classes/callbacks/PostProjectileInitLate.d.ts.map +1 -1
  66. package/dist/src/classes/callbacks/PostProjectileInitLate.lua +6 -5
  67. package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -1
  68. package/dist/src/classes/callbacks/PostPurchase.lua +5 -4
  69. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
  70. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +5 -4
  71. package/dist/src/classes/callbacks/PostSacrifice.d.ts.map +1 -1
  72. package/dist/src/classes/callbacks/PostSacrifice.lua +5 -4
  73. package/dist/src/classes/callbacks/PostTearInitLate.d.ts.map +1 -1
  74. package/dist/src/classes/callbacks/PostTearInitLate.lua +6 -5
  75. package/dist/src/classes/callbacks/PostTearInitVeryLate.d.ts.map +1 -1
  76. package/dist/src/classes/callbacks/PostTearInitVeryLate.lua +6 -5
  77. package/dist/src/classes/callbacks/PostTransformation.d.ts.map +1 -1
  78. package/dist/src/classes/callbacks/PostTransformation.lua +8 -7
  79. package/dist/src/classes/callbacks/PostTrinketBreak.d.ts.map +1 -1
  80. package/dist/src/classes/callbacks/PostTrinketBreak.lua +9 -8
  81. package/dist/src/classes/callbacks/PreNewLevel.d.ts.map +1 -1
  82. package/dist/src/classes/callbacks/PreNewLevel.lua +4 -3
  83. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  84. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +21 -20
  85. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
  86. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +18 -17
  87. package/dist/src/classes/features/callbackLogic/EsauJrDetection.d.ts.map +1 -1
  88. package/dist/src/classes/features/callbackLogic/EsauJrDetection.lua +11 -10
  89. package/dist/src/classes/features/callbackLogic/FlipDetection.d.ts.map +1 -1
  90. package/dist/src/classes/features/callbackLogic/FlipDetection.lua +4 -3
  91. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -1
  92. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +8 -7
  93. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
  94. package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +9 -8
  95. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -1
  96. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.lua +7 -6
  97. package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts.map +1 -1
  98. package/dist/src/classes/features/callbackLogic/PickupChangeDetection.lua +11 -10
  99. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts.map +1 -1
  100. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +20 -19
  101. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.d.ts.map +1 -1
  102. package/dist/src/classes/features/callbackLogic/PlayerReorderedCallbacks.lua +15 -14
  103. package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.d.ts.map +1 -1
  104. package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.lua +6 -5
  105. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts.map +1 -1
  106. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.lua +15 -14
  107. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.d.ts.map +1 -1
  108. package/dist/src/classes/features/callbackLogic/SlotUpdateDetection.lua +6 -5
  109. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  110. package/dist/src/classes/features/other/CollectibleItemPoolType.lua +6 -5
  111. package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
  112. package/dist/src/classes/features/other/CustomItemPools.lua +6 -5
  113. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  114. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  115. package/dist/src/classes/features/other/CustomStages.lua +17 -26
  116. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  117. package/dist/src/classes/features/other/CustomTrapdoors.lua +36 -35
  118. package/dist/src/classes/features/other/DisableAllSound.d.ts.map +1 -1
  119. package/dist/src/classes/features/other/DisableAllSound.lua +10 -9
  120. package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
  121. package/dist/src/classes/features/other/DisableInputs.lua +21 -20
  122. package/dist/src/classes/features/other/ExtraConsoleCommands.lua +19 -19
  123. package/dist/src/classes/features/other/NoSirenSteal.d.ts.map +1 -1
  124. package/dist/src/classes/features/other/NoSirenSteal.lua +5 -4
  125. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  126. package/dist/src/classes/features/other/Pause.lua +20 -19
  127. package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
  128. package/dist/src/classes/features/other/PersistentEntities.lua +20 -19
  129. package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
  130. package/dist/src/classes/features/other/PickupIndexCreation.lua +29 -28
  131. package/dist/src/classes/features/other/PlayerInventory.d.ts.map +1 -1
  132. package/dist/src/classes/features/other/PlayerInventory.lua +9 -8
  133. package/dist/src/classes/features/other/PonyDetection.d.ts.map +1 -1
  134. package/dist/src/classes/features/other/PonyDetection.lua +8 -7
  135. package/dist/src/classes/features/other/PressInput.d.ts.map +1 -1
  136. package/dist/src/classes/features/other/PressInput.lua +7 -6
  137. package/dist/src/classes/features/other/PreventChildEntities.d.ts.map +1 -1
  138. package/dist/src/classes/features/other/PreventChildEntities.lua +7 -6
  139. package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
  140. package/dist/src/classes/features/other/PreventCollectibleRotation.lua +7 -6
  141. package/dist/src/classes/features/other/PreventGridEntityRespawn.d.ts.map +1 -1
  142. package/dist/src/classes/features/other/PreventGridEntityRespawn.lua +16 -15
  143. package/dist/src/classes/features/other/RoomClearFrame.d.ts.map +1 -1
  144. package/dist/src/classes/features/other/RoomClearFrame.lua +6 -5
  145. package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
  146. package/dist/src/classes/features/other/RoomHistory.lua +9 -8
  147. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -1
  148. package/dist/src/classes/features/other/RunInNFrames.lua +14 -13
  149. package/dist/src/classes/features/other/RunNextRoom.d.ts.map +1 -1
  150. package/dist/src/classes/features/other/RunNextRoom.lua +6 -5
  151. package/dist/src/classes/features/other/SaveDataManager.d.ts +1 -0
  152. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  153. package/dist/src/classes/features/other/SaveDataManager.lua +12 -0
  154. package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
  155. package/dist/src/classes/features/other/StageHistory.lua +7 -6
  156. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
  157. package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +18 -17
  158. package/dist/src/classes/features/other/customStages/streakText.d.ts +3 -25
  159. package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
  160. package/dist/src/classes/features/other/customStages/streakText.lua +16 -26
  161. package/dist/src/classes/features/other/customStages/v.d.ts +25 -0
  162. package/dist/src/classes/features/other/customStages/v.d.ts.map +1 -0
  163. package/dist/src/classes/features/other/customStages/v.lua +16 -0
  164. package/dist/src/classes/features/other/customStages/versusScreen.d.ts +2 -8
  165. package/dist/src/classes/features/other/customStages/versusScreen.d.ts.map +1 -1
  166. package/dist/src/classes/features/other/customStages/versusScreen.lua +6 -4
  167. package/dist/src/enums/ModCallbackCustom.d.ts +6 -0
  168. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  169. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  170. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +4 -2
  171. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  172. package/dist/src/shouldFire.d.ts +1 -0
  173. package/dist/src/shouldFire.d.ts.map +1 -1
  174. package/dist/src/shouldFire.lua +5 -0
  175. package/package.json +1 -1
  176. package/src/classes/callbacks/PostAmbushFinished.ts +9 -7
  177. package/src/classes/callbacks/PostAmbushStarted.ts +9 -7
  178. package/src/classes/callbacks/PostBombInitLate.ts +9 -7
  179. package/src/classes/callbacks/PostBoneSwing.ts +9 -7
  180. package/src/classes/callbacks/PostCollectibleEmpty.ts +9 -7
  181. package/src/classes/callbacks/PostCollectibleInitFirst.ts +9 -7
  182. package/src/classes/callbacks/PostCursedTeleport.ts +20 -24
  183. package/src/classes/callbacks/PostDiceRoomActivated.ts +9 -7
  184. package/src/classes/callbacks/PostEffectInitLate.ts +9 -7
  185. package/src/classes/callbacks/PostEffectStateChanged.ts +9 -7
  186. package/src/classes/callbacks/PostFamiliarInitLate.ts +9 -7
  187. package/src/classes/callbacks/PostFamiliarStateChanged.ts +9 -7
  188. package/src/classes/callbacks/PostGameStartedReordered.ts +3 -0
  189. package/src/classes/callbacks/PostGameStartedReorderedLast.ts +3 -0
  190. package/src/classes/callbacks/PostGreedModeWave.ts +9 -7
  191. package/src/classes/callbacks/PostHolyMantleRemoved.ts +9 -7
  192. package/src/classes/callbacks/PostItemDischarge.ts +21 -27
  193. package/src/classes/callbacks/PostKeyboardChanged.ts +11 -9
  194. package/src/classes/callbacks/PostKnifeInitLate.ts +9 -7
  195. package/src/classes/callbacks/PostLaserInitLate.ts +9 -7
  196. package/src/classes/callbacks/PostNPCInitLate.ts +9 -7
  197. package/src/classes/callbacks/PostNPCStateChanged.ts +11 -12
  198. package/src/classes/callbacks/PostPickupCollect.ts +9 -7
  199. package/src/classes/callbacks/PostPickupInitLate.ts +9 -7
  200. package/src/classes/callbacks/PostPickupStateChanged.ts +9 -7
  201. package/src/classes/callbacks/PostPlayerChangeHealth.ts +10 -8
  202. package/src/classes/callbacks/PostPlayerChangeStat.ts +11 -10
  203. package/src/classes/callbacks/PostPlayerChangeType.ts +13 -11
  204. package/src/classes/callbacks/PostPlayerFatalDamage.ts +10 -8
  205. package/src/classes/callbacks/PostPlayerInitLate.ts +9 -7
  206. package/src/classes/callbacks/PostProjectileInitLate.ts +9 -7
  207. package/src/classes/callbacks/PostPurchase.ts +11 -9
  208. package/src/classes/callbacks/PostRoomClearChanged.ts +10 -8
  209. package/src/classes/callbacks/PostSacrifice.ts +9 -7
  210. package/src/classes/callbacks/PostTearInitLate.ts +9 -7
  211. package/src/classes/callbacks/PostTearInitVeryLate.ts +9 -7
  212. package/src/classes/callbacks/PostTransformation.ts +12 -10
  213. package/src/classes/callbacks/PostTrinketBreak.ts +12 -16
  214. package/src/classes/callbacks/PreNewLevel.ts +9 -7
  215. package/src/classes/features/callbackLogic/CustomGridEntities.ts +23 -21
  216. package/src/classes/features/callbackLogic/CustomRevive.ts +26 -27
  217. package/src/classes/features/callbackLogic/EsauJrDetection.ts +19 -17
  218. package/src/classes/features/callbackLogic/FlipDetection.ts +10 -8
  219. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +11 -9
  220. package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +13 -12
  221. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +10 -8
  222. package/src/classes/features/callbackLogic/PickupChangeDetection.ts +12 -10
  223. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +21 -27
  224. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +22 -29
  225. package/src/classes/features/callbackLogic/SlotDestroyedDetection.ts +9 -7
  226. package/src/classes/features/callbackLogic/SlotRenderDetection.ts +15 -13
  227. package/src/classes/features/callbackLogic/SlotUpdateDetection.ts +9 -7
  228. package/src/classes/features/other/CollectibleItemPoolType.ts +9 -7
  229. package/src/classes/features/other/CustomItemPools.ts +9 -7
  230. package/src/classes/features/other/CustomPickups.ts +0 -1
  231. package/src/classes/features/other/CustomStages.ts +16 -44
  232. package/src/classes/features/other/CustomTrapdoors.ts +53 -54
  233. package/src/classes/features/other/DisableAllSound.ts +13 -11
  234. package/src/classes/features/other/DisableInputs.ts +39 -37
  235. package/src/classes/features/other/ExtraConsoleCommands.ts +19 -19
  236. package/src/classes/features/other/NoSirenSteal.ts +11 -9
  237. package/src/classes/features/other/Pause.ts +21 -19
  238. package/src/classes/features/other/PersistentEntities.ts +33 -31
  239. package/src/classes/features/other/PickupIndexCreation.ts +35 -33
  240. package/src/classes/features/other/PlayerInventory.ts +14 -12
  241. package/src/classes/features/other/PonyDetection.ts +11 -9
  242. package/src/classes/features/other/PressInput.ts +11 -9
  243. package/src/classes/features/other/PreventChildEntities.ts +10 -8
  244. package/src/classes/features/other/PreventCollectibleRotation.ts +20 -18
  245. package/src/classes/features/other/PreventGridEntityRespawn.ts +18 -18
  246. package/src/classes/features/other/RoomClearFrame.ts +12 -10
  247. package/src/classes/features/other/RoomHistory.ts +13 -11
  248. package/src/classes/features/other/RunInNFrames.ts +19 -17
  249. package/src/classes/features/other/RunNextRoom.ts +10 -8
  250. package/src/classes/features/other/SaveDataManager.ts +11 -0
  251. package/src/classes/features/other/StageHistory.ts +11 -9
  252. package/src/classes/features/other/TaintedLazarusPlayers.ts +31 -30
  253. package/src/classes/features/other/customStages/streakText.ts +14 -44
  254. package/src/classes/features/other/customStages/v.ts +31 -0
  255. package/src/classes/features/other/customStages/versusScreen.ts +2 -10
  256. package/src/enums/ModCallbackCustom.ts +6 -0
  257. package/src/interfaces/SaveData.ts +0 -1
  258. package/src/interfaces/private/AddCallbackParametersCustom.ts +2 -0
  259. 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
- this.v.run.playersInventory,
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
- this.v.run.playersInventory,
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
- this.v.run.playersInventory,
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
- this.v.run.playersIsPonyActive,
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(this.v.run.playersIsPonyActive, player);
58
+ setAddPlayer(v.run.playersIsPonyActive, player);
57
59
  } else {
58
- setDeletePlayer(this.v.run.playersIsPonyActive, player);
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(this.v.run.playersIsPonyActive, player);
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 = this.v.run.buttonActionTuples.length - 1; i >= 0; 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 = this.v.run.buttonActionTuples[i]!;
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
- this.v.run.buttonActionTuples.splice(i);
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
- this.v.run.buttonActionTuples.push([playerIndex, buttonAction]);
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
- this.v.room.preventingEntities.has(GetPtrHash(npc.SpawnerEntity));
29
+ v.room.preventingEntities.has(GetPtrHash(npc.SpawnerEntity));
28
30
 
29
31
  const parentMatch =
30
32
  npc.Parent !== undefined &&
31
- this.v.room.preventingEntities.has(GetPtrHash(npc.Parent));
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
- this.v.room.preventingEntities.add(ptrHash);
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
- this.v.room.trackedCollectibles.clear();
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 = this.v.room.trackedCollectibles.get(index);
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
- this.v.room.trackedCollectibles.set(index, collectibleType);
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 (this.v.room.manuallyUsingShovel) {
74
+ if (v.room.manuallyUsingShovel) {
75
75
  return undefined;
76
76
  }
77
77
 
78
78
  const roomListIndex = getRoomListIndex();
79
- if (!this.v.level.roomListIndexToDecorationGridIndexes.has(roomListIndex)) {
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
- this.v.room.manuallyUsingShovel = true;
105
+ v.room.manuallyUsingShovel = true;
106
106
  futurePlayer.UseActiveItem(CollectibleType.WE_NEED_TO_GO_DEEPER);
107
- this.v.room.manuallyUsingShovel = false;
107
+ v.room.manuallyUsingShovel = false;
108
108
 
109
109
  const decorationGridIndexes =
110
- this.v.level.roomListIndexToDecorationGridIndexes.getAndSetDefault(
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
- this.v.level.roomListIndexToDecorationGridIndexes.get(roomListIndex);
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
- this.v.level.roomListIndexToDecorationGridIndexes.getAndSetDefault(
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
- this.v.room.roomClearGameFrame = gameFrameCount;
35
- this.v.room.roomClearRoomFrame = roomFrameCount;
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 this.v.room.roomClearGameFrame;
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 this.v.room.roomClearGameFrame;
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
- this.v.run.roomHistory.push(roomDescription);
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 this.v.run.roomHistory.length;
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 this.v.run.roomHistory;
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
- this.v.run.roomHistory[this.v.run.roomHistory.length - 2];
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 = this.v.run.roomHistory[0];
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(this.v.run.roomHistory);
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
- this.v.run.queuedGameFunctions,
69
+ v.run.queuedGameFunctions,
68
70
  gameFrameCount,
69
71
  numRoomsEntered,
70
72
  );
71
73
  checkExecuteIntervalFunctions(
72
- this.v.run.intervalGameFunctions,
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
- this.v.run.queuedRenderFunctions,
86
+ v.run.queuedRenderFunctions,
85
87
  renderFrameCount,
86
88
  numRoomsEntered,
87
89
  );
88
90
  checkExecuteIntervalFunctions(
89
- this.v.run.intervalRenderFunctions,
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
- this.v.run.queuedGameFunctions.push(queuedFunction);
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
- this.v.run.queuedRenderFunctions.push(queuedFunction);
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
- this.v.run.intervalGameFunctions.push(intervalFunction);
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
- this.v.run.intervalRenderFunctions.push(intervalFunction);
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 this.v.run.queuedFunctions) {
29
+ for (const func of v.run.queuedFunctions) {
28
30
  func();
29
31
  }
30
32
 
31
- emptyArray(this.v.run.queuedFunctions);
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
- this.v.run.queuedFunctions.push(func);
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
- this.v.run.stageHistory.push([stage, stageType]);
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 this.v.run.stageHistory;
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 this.v.run.stageHistory.some(
318
+ return v.run.stageHistory.some(
317
319
  ([previousStage]) => previousStage === stage,
318
320
  );
319
321
  }
320
322
 
321
- return this.v.run.stageHistory.some(
323
+ return v.run.stageHistory.some(
322
324
  ([previousStage, previousStageType]) =>
323
325
  previousStage === stage && previousStageType === stageType,
324
326
  );