isaacscript-common 25.3.0 → 25.5.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 (263) hide show
  1. package/dist/index.rollup.d.ts +18 -2
  2. package/dist/isaacscript-common.lua +793 -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/functions/utils.d.ts +6 -0
  170. package/dist/src/functions/utils.d.ts.map +1 -1
  171. package/dist/src/functions/utils.lua +17 -0
  172. package/dist/src/interfaces/SaveData.d.ts.map +1 -1
  173. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +4 -2
  174. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  175. package/dist/src/shouldFire.d.ts +1 -0
  176. package/dist/src/shouldFire.d.ts.map +1 -1
  177. package/dist/src/shouldFire.lua +5 -0
  178. package/package.json +2 -2
  179. package/src/classes/callbacks/PostAmbushFinished.ts +9 -7
  180. package/src/classes/callbacks/PostAmbushStarted.ts +9 -7
  181. package/src/classes/callbacks/PostBombInitLate.ts +9 -7
  182. package/src/classes/callbacks/PostBoneSwing.ts +9 -7
  183. package/src/classes/callbacks/PostCollectibleEmpty.ts +9 -7
  184. package/src/classes/callbacks/PostCollectibleInitFirst.ts +9 -7
  185. package/src/classes/callbacks/PostCursedTeleport.ts +20 -24
  186. package/src/classes/callbacks/PostDiceRoomActivated.ts +9 -7
  187. package/src/classes/callbacks/PostEffectInitLate.ts +9 -7
  188. package/src/classes/callbacks/PostEffectStateChanged.ts +9 -7
  189. package/src/classes/callbacks/PostFamiliarInitLate.ts +9 -7
  190. package/src/classes/callbacks/PostFamiliarStateChanged.ts +9 -7
  191. package/src/classes/callbacks/PostGameStartedReordered.ts +3 -0
  192. package/src/classes/callbacks/PostGameStartedReorderedLast.ts +3 -0
  193. package/src/classes/callbacks/PostGreedModeWave.ts +9 -7
  194. package/src/classes/callbacks/PostHolyMantleRemoved.ts +9 -7
  195. package/src/classes/callbacks/PostItemDischarge.ts +21 -27
  196. package/src/classes/callbacks/PostKeyboardChanged.ts +11 -9
  197. package/src/classes/callbacks/PostKnifeInitLate.ts +9 -7
  198. package/src/classes/callbacks/PostLaserInitLate.ts +9 -7
  199. package/src/classes/callbacks/PostNPCInitLate.ts +9 -7
  200. package/src/classes/callbacks/PostNPCStateChanged.ts +11 -12
  201. package/src/classes/callbacks/PostPickupCollect.ts +9 -7
  202. package/src/classes/callbacks/PostPickupInitLate.ts +9 -7
  203. package/src/classes/callbacks/PostPickupStateChanged.ts +9 -7
  204. package/src/classes/callbacks/PostPlayerChangeHealth.ts +10 -8
  205. package/src/classes/callbacks/PostPlayerChangeStat.ts +11 -10
  206. package/src/classes/callbacks/PostPlayerChangeType.ts +13 -11
  207. package/src/classes/callbacks/PostPlayerFatalDamage.ts +10 -8
  208. package/src/classes/callbacks/PostPlayerInitLate.ts +9 -7
  209. package/src/classes/callbacks/PostProjectileInitLate.ts +9 -7
  210. package/src/classes/callbacks/PostPurchase.ts +11 -9
  211. package/src/classes/callbacks/PostRoomClearChanged.ts +10 -8
  212. package/src/classes/callbacks/PostSacrifice.ts +9 -7
  213. package/src/classes/callbacks/PostTearInitLate.ts +9 -7
  214. package/src/classes/callbacks/PostTearInitVeryLate.ts +9 -7
  215. package/src/classes/callbacks/PostTransformation.ts +12 -10
  216. package/src/classes/callbacks/PostTrinketBreak.ts +12 -16
  217. package/src/classes/callbacks/PreNewLevel.ts +9 -7
  218. package/src/classes/features/callbackLogic/CustomGridEntities.ts +23 -21
  219. package/src/classes/features/callbackLogic/CustomRevive.ts +26 -27
  220. package/src/classes/features/callbackLogic/EsauJrDetection.ts +19 -17
  221. package/src/classes/features/callbackLogic/FlipDetection.ts +10 -8
  222. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +11 -9
  223. package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +13 -12
  224. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +10 -8
  225. package/src/classes/features/callbackLogic/PickupChangeDetection.ts +12 -10
  226. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +21 -27
  227. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +22 -29
  228. package/src/classes/features/callbackLogic/SlotDestroyedDetection.ts +9 -7
  229. package/src/classes/features/callbackLogic/SlotRenderDetection.ts +15 -13
  230. package/src/classes/features/callbackLogic/SlotUpdateDetection.ts +9 -7
  231. package/src/classes/features/other/CollectibleItemPoolType.ts +9 -7
  232. package/src/classes/features/other/CustomItemPools.ts +9 -7
  233. package/src/classes/features/other/CustomPickups.ts +0 -1
  234. package/src/classes/features/other/CustomStages.ts +16 -44
  235. package/src/classes/features/other/CustomTrapdoors.ts +53 -54
  236. package/src/classes/features/other/DisableAllSound.ts +13 -11
  237. package/src/classes/features/other/DisableInputs.ts +39 -37
  238. package/src/classes/features/other/ExtraConsoleCommands.ts +19 -19
  239. package/src/classes/features/other/NoSirenSteal.ts +11 -9
  240. package/src/classes/features/other/Pause.ts +21 -19
  241. package/src/classes/features/other/PersistentEntities.ts +33 -31
  242. package/src/classes/features/other/PickupIndexCreation.ts +35 -33
  243. package/src/classes/features/other/PlayerInventory.ts +14 -12
  244. package/src/classes/features/other/PonyDetection.ts +11 -9
  245. package/src/classes/features/other/PressInput.ts +11 -9
  246. package/src/classes/features/other/PreventChildEntities.ts +10 -8
  247. package/src/classes/features/other/PreventCollectibleRotation.ts +20 -18
  248. package/src/classes/features/other/PreventGridEntityRespawn.ts +18 -18
  249. package/src/classes/features/other/RoomClearFrame.ts +12 -10
  250. package/src/classes/features/other/RoomHistory.ts +13 -11
  251. package/src/classes/features/other/RunInNFrames.ts +19 -17
  252. package/src/classes/features/other/RunNextRoom.ts +10 -8
  253. package/src/classes/features/other/SaveDataManager.ts +11 -0
  254. package/src/classes/features/other/StageHistory.ts +11 -9
  255. package/src/classes/features/other/TaintedLazarusPlayers.ts +31 -30
  256. package/src/classes/features/other/customStages/streakText.ts +14 -44
  257. package/src/classes/features/other/customStages/v.ts +31 -0
  258. package/src/classes/features/other/customStages/versusScreen.ts +2 -10
  259. package/src/enums/ModCallbackCustom.ts +6 -0
  260. package/src/functions/utils.ts +23 -0
  261. package/src/interfaces/SaveData.ts +0 -1
  262. package/src/interfaces/private/AddCallbackParametersCustom.ts +2 -0
  263. package/src/shouldFire.ts +10 -0
@@ -29,15 +29,17 @@ interface InitialDescription {
29
29
  fallingAcceleration: float;
30
30
  }
31
31
 
32
+ const v = {
33
+ run: {
34
+ isPseudoPaused: false,
35
+ shouldUnpause: false,
36
+ initialDescriptions: new Map<PtrHash, InitialDescription>(),
37
+ },
38
+ };
39
+
32
40
  export class Pause extends Feature {
33
41
  /** @internal */
34
- public override v = {
35
- run: {
36
- isPseudoPaused: false,
37
- shouldUnpause: false,
38
- initialDescriptions: new Map<PtrHash, InitialDescription>(),
39
- },
40
- };
42
+ public override v = v;
41
43
 
42
44
  private disableInputs: DisableInputs;
43
45
 
@@ -62,7 +64,7 @@ export class Pause extends Feature {
62
64
 
63
65
  // ModCallback.POST_UPDATE (1)
64
66
  private postUpdate = () => {
65
- if (!this.v.run.isPseudoPaused) {
67
+ if (!v.run.isPseudoPaused) {
66
68
  return;
67
69
  }
68
70
 
@@ -77,7 +79,7 @@ export class Pause extends Feature {
77
79
 
78
80
  for (const tearOrProjectile of tearsAndProjectiles) {
79
81
  const ptrHash = GetPtrHash(tearOrProjectile);
80
- const initialDescription = this.v.run.initialDescriptions.get(ptrHash);
82
+ const initialDescription = v.run.initialDescriptions.get(ptrHash);
81
83
  if (initialDescription === undefined) {
82
84
  continue;
83
85
  }
@@ -107,10 +109,10 @@ export class Pause extends Feature {
107
109
  return;
108
110
  }
109
111
 
110
- if (!this.v.run.shouldUnpause) {
112
+ if (!v.run.shouldUnpause) {
111
113
  return;
112
114
  }
113
- this.v.run.shouldUnpause = false;
115
+ v.run.shouldUnpause = false;
114
116
 
115
117
  // Returning a value of 1 for a single sub-frame will be enough for the game to register an
116
118
  // unpause but not enough for a tear to actually be fired.
@@ -119,7 +121,7 @@ export class Pause extends Feature {
119
121
 
120
122
  @Exported
121
123
  public isPaused(): boolean {
122
- return this.v.run.isPseudoPaused;
124
+ return v.run.isPseudoPaused;
123
125
  }
124
126
 
125
127
  /**
@@ -135,18 +137,18 @@ export class Pause extends Feature {
135
137
  */
136
138
  @Exported
137
139
  public pause(): void {
138
- if (this.v.run.isPseudoPaused) {
140
+ if (v.run.isPseudoPaused) {
139
141
  logError(
140
142
  "Failed to pseudo-pause the game, since it was already pseudo-paused.",
141
143
  );
142
144
  return;
143
145
  }
144
- this.v.run.isPseudoPaused = true;
146
+ v.run.isPseudoPaused = true;
145
147
 
146
148
  // Tears/projectiles in the room will move slightly on every frame, even when the Pause
147
149
  // collectible is active. Thus, we manually reset the initial positions and heights on every
148
150
  // frame.
149
- this.v.run.initialDescriptions.clear();
151
+ v.run.initialDescriptions.clear();
150
152
  const tearsAndProjectiles = [...getTears(), ...getProjectiles()];
151
153
  for (const tearOrProjectile of tearsAndProjectiles) {
152
154
  const ptrHash = GetPtrHash(tearOrProjectile);
@@ -160,7 +162,7 @@ export class Pause extends Feature {
160
162
  ? tearOrProjectile.FallingAcceleration
161
163
  : tearOrProjectile.FallingAccel,
162
164
  };
163
- this.v.run.initialDescriptions.set(ptrHash, initialDescription);
165
+ v.run.initialDescriptions.set(ptrHash, initialDescription);
164
166
  }
165
167
 
166
168
  const firstPlayer = Isaac.GetPlayer();
@@ -197,14 +199,14 @@ export class Pause extends Feature {
197
199
  */
198
200
  @Exported
199
201
  public unpause(): void {
200
- if (!this.v.run.isPseudoPaused) {
202
+ if (!v.run.isPseudoPaused) {
201
203
  logError(
202
204
  "Failed to pseudo-unpause the game, since it was not already pseudo-paused.",
203
205
  );
204
206
  return;
205
207
  }
206
- this.v.run.isPseudoPaused = false;
207
- this.v.run.shouldUnpause = true;
208
+ v.run.isPseudoPaused = false;
209
+ v.run.shouldUnpause = true;
208
210
 
209
211
  const tstlClassName = getTSTLClassName(this);
210
212
  if (tstlClassName === undefined) {
@@ -23,28 +23,30 @@ interface PersistentEntityDescription {
23
23
 
24
24
  type PersistentEntityTuple = [index: int, entityPtr: EntityPtr];
25
25
 
26
+ const v = {
27
+ run: {
28
+ /** Iterates upward as new persistent entities are created. */
29
+ persistentEntityIndexCounter: 0,
30
+ },
31
+
32
+ level: {
33
+ /**
34
+ * Indexed by persistent entity index.
35
+ *
36
+ * When the entity is spawned in the currently room, its corresponding entry in this map will be
37
+ * temporarily deleted (until the entity itself is despawned).
38
+ */
39
+ persistentEntities: new Map<int, PersistentEntityDescription>(),
40
+ },
41
+
42
+ room: {
43
+ spawnedPersistentEntities: new Map<PtrHash, PersistentEntityTuple>(),
44
+ },
45
+ };
46
+
26
47
  export class PersistentEntities extends Feature {
27
48
  /** @internal */
28
- public override v = {
29
- run: {
30
- /** Iterates upward as new persistent entities are created. */
31
- persistentEntityIndexCounter: 0,
32
- },
33
-
34
- level: {
35
- /**
36
- * Indexed by persistent entity index.
37
- *
38
- * When the entity is spawned in the currently room, its corresponding entry in this map will
39
- * be temporarily deleted (until the entity itself is despawned).
40
- */
41
- persistentEntities: new Map<int, PersistentEntityDescription>(),
42
- },
43
-
44
- room: {
45
- spawnedPersistentEntities: new Map<PtrHash, PersistentEntityTuple>(),
46
- },
47
- };
49
+ public override v = v;
48
50
 
49
51
  private roomHistory: RoomHistory;
50
52
 
@@ -69,7 +71,7 @@ export class PersistentEntities extends Feature {
69
71
  // ModCallback.POST_ENTITY_REMOVE (67)
70
72
  private postEntityRemove = (entity: Entity) => {
71
73
  const ptrHash = GetPtrHash(entity);
72
- const tuple = this.v.room.spawnedPersistentEntities.get(ptrHash);
74
+ const tuple = v.room.spawnedPersistentEntities.get(ptrHash);
73
75
  if (tuple === undefined) {
74
76
  return;
75
77
  }
@@ -105,19 +107,19 @@ export class PersistentEntities extends Feature {
105
107
  roomListIndex: previousRoomDescription.roomListIndex,
106
108
  position: entity.Position,
107
109
  };
108
- this.v.level.persistentEntities.set(index, persistentEntityDescription);
110
+ v.level.persistentEntities.set(index, persistentEntityDescription);
109
111
  }
110
112
 
111
113
  // ModCallbackCustom.POST_NEW_ROOM_REORDERED
112
114
  private postNewRoomReordered = () => {
113
115
  const roomListIndex = getRoomListIndex();
114
- const persistentEntities = [...this.v.level.persistentEntities.entries()];
116
+ const persistentEntities = [...v.level.persistentEntities.entries()];
115
117
  const persistentEntitiesInThisRoom = persistentEntities.filter(
116
118
  ([_index, description]) => roomListIndex === description.roomListIndex,
117
119
  );
118
120
 
119
121
  for (const [index, description] of persistentEntitiesInThisRoom) {
120
- this.v.level.persistentEntities.delete(index);
122
+ v.level.persistentEntities.delete(index);
121
123
  this.spawnAndTrack(
122
124
  description.entityType,
123
125
  description.variant,
@@ -146,7 +148,7 @@ export class PersistentEntities extends Feature {
146
148
 
147
149
  // Keep track that we spawned it so that we can respawn it if the player re-enters the room.
148
150
  const tuple: [int, EntityPtr] = [index, EntityPtr(entity)];
149
- this.v.room.spawnedPersistentEntities.set(ptrHash, tuple);
151
+ v.room.spawnedPersistentEntities.set(ptrHash, tuple);
150
152
 
151
153
  return entity;
152
154
  }
@@ -168,15 +170,15 @@ export class PersistentEntities extends Feature {
168
170
  persistentEntityIndex: int,
169
171
  removeEntity = true,
170
172
  ): void {
171
- this.v.level.persistentEntities.delete(persistentEntityIndex);
173
+ v.level.persistentEntities.delete(persistentEntityIndex);
172
174
 
173
- for (const [ptrHash, tuple] of this.v.room.spawnedPersistentEntities) {
175
+ for (const [ptrHash, tuple] of v.room.spawnedPersistentEntities) {
174
176
  const [index, entityPtr] = tuple;
175
177
  if (index !== persistentEntityIndex) {
176
178
  continue;
177
179
  }
178
180
 
179
- this.v.room.spawnedPersistentEntities.delete(ptrHash);
181
+ v.room.spawnedPersistentEntities.delete(ptrHash);
180
182
 
181
183
  if (removeEntity && entityPtr.Ref !== undefined) {
182
184
  entityPtr.Ref.Remove();
@@ -209,16 +211,16 @@ export class PersistentEntities extends Feature {
209
211
  subType: int,
210
212
  position: Vector,
211
213
  ): [Entity, int] {
212
- this.v.run.persistentEntityIndexCounter++;
214
+ v.run.persistentEntityIndexCounter++;
213
215
 
214
216
  const entity = this.spawnAndTrack(
215
217
  entityType,
216
218
  variant,
217
219
  subType,
218
220
  position,
219
- this.v.run.persistentEntityIndexCounter,
221
+ v.run.persistentEntityIndexCounter,
220
222
  );
221
223
 
222
- return [entity, this.v.run.persistentEntityIndexCounter];
224
+ return [entity, v.run.persistentEntityIndexCounter];
223
225
  }
224
226
  }
@@ -21,28 +21,30 @@ interface PickupDescription {
21
21
  initSeed: Seed;
22
22
  }
23
23
 
24
+ const v = {
25
+ run: {
26
+ /** Is incremented before assignment. Thus, the first pickup will have an index of 1. */
27
+ pickupCounter: 0 as PickupIndex,
28
+
29
+ pickupDataTreasureRooms: new Map<PickupIndex, PickupDescription>(),
30
+ pickupDataBossRooms: new Map<PickupIndex, PickupDescription>(),
31
+ },
32
+
33
+ level: {
34
+ /** Indexed by room list index. */
35
+ pickupData: new DefaultMap<int, Map<PickupIndex, PickupDescription>>(
36
+ () => new Map(),
37
+ ),
38
+ },
39
+
40
+ room: {
41
+ pickupIndexes: new Map<PtrHash, PickupIndex>(),
42
+ },
43
+ };
44
+
24
45
  export class PickupIndexCreation extends Feature {
25
46
  /** @internal */
26
- public override v = {
27
- run: {
28
- /** Is incremented before assignment. Thus, the first pickup will have an index of 1. */
29
- pickupCounter: 0 as PickupIndex,
30
-
31
- pickupDataTreasureRooms: new Map<PickupIndex, PickupDescription>(),
32
- pickupDataBossRooms: new Map<PickupIndex, PickupDescription>(),
33
- },
34
-
35
- level: {
36
- /** Indexed by room list index. */
37
- pickupData: new DefaultMap<int, Map<PickupIndex, PickupDescription>>(
38
- () => new Map(),
39
- ),
40
- },
41
-
42
- room: {
43
- pickupIndexes: new Map<PtrHash, PickupIndex>(),
44
- },
45
- };
47
+ public override v = v;
46
48
 
47
49
  private roomHistory: RoomHistory;
48
50
  private saveDataManager: SaveDataManager;
@@ -81,7 +83,7 @@ export class PickupIndexCreation extends Feature {
81
83
  // callback but should not incur a new pickup counter. (For example, the collectible rotation
82
84
  // with Tainted Isaac.) For these situations, we will already be tracking an index for this
83
85
  // pointer hash.
84
- if (this.v.room.pickupIndexes.has(ptrHash)) {
86
+ if (v.room.pickupIndexes.has(ptrHash)) {
85
87
  return;
86
88
  }
87
89
 
@@ -97,13 +99,13 @@ export class PickupIndexCreation extends Feature {
97
99
  !isFirstVisit &&
98
100
  roomFrameCount <= 0
99
101
  ) {
100
- this.v.room.pickupIndexes.set(ptrHash, pickupIndexFromLevelData);
102
+ v.room.pickupIndexes.set(ptrHash, pickupIndexFromLevelData);
101
103
  return;
102
104
  }
103
105
 
104
106
  // This is a brand new pickup that we have not previously seen on this run.
105
- this.v.run.pickupCounter++;
106
- this.v.room.pickupIndexes.set(ptrHash, this.v.run.pickupCounter);
107
+ v.run.pickupCounter++;
108
+ v.room.pickupIndexes.set(ptrHash, v.run.pickupCounter);
107
109
  }
108
110
 
109
111
  private getPickupIndexFromPreviousData(
@@ -111,7 +113,7 @@ export class PickupIndexCreation extends Feature {
111
113
  ): PickupIndex | undefined {
112
114
  const roomListIndex = getRoomListIndex();
113
115
  const pickupDescriptions =
114
- this.v.level.pickupData.getAndSetDefault(roomListIndex);
116
+ v.level.pickupData.getAndSetDefault(roomListIndex);
115
117
 
116
118
  let pickupIndex = getStoredPickupIndex(pickup, pickupDescriptions);
117
119
  if (pickupIndex === undefined) {
@@ -129,7 +131,7 @@ export class PickupIndexCreation extends Feature {
129
131
 
130
132
  private checkDespawningFromPlayerLeavingRoom(entity: Entity) {
131
133
  const ptrHash = GetPtrHash(entity);
132
- const pickupIndex = this.v.room.pickupIndexes.get(ptrHash);
134
+ const pickupIndex = v.room.pickupIndexes.get(ptrHash);
133
135
  if (pickupIndex === undefined) {
134
136
  return;
135
137
  }
@@ -157,7 +159,7 @@ export class PickupIndexCreation extends Feature {
157
159
  }
158
160
 
159
161
  const previousRoomListIndex = previousRoomDescription.roomListIndex;
160
- const pickupDescriptions = this.v.level.pickupData.getAndSetDefault(
162
+ const pickupDescriptions = v.level.pickupData.getAndSetDefault(
161
163
  previousRoomListIndex,
162
164
  );
163
165
 
@@ -196,11 +198,11 @@ export class PickupIndexCreation extends Feature {
196
198
 
197
199
  switch (roomType) {
198
200
  case RoomType.TREASURE: {
199
- return this.v.run.pickupDataTreasureRooms;
201
+ return v.run.pickupDataTreasureRooms;
200
202
  }
201
203
 
202
204
  case RoomType.BOSS: {
203
- return this.v.run.pickupDataBossRooms;
205
+ return v.run.pickupDataBossRooms;
204
206
  }
205
207
 
206
208
  default: {
@@ -223,11 +225,11 @@ export class PickupIndexCreation extends Feature {
223
225
 
224
226
  switch (roomType) {
225
227
  case RoomType.TREASURE: {
226
- return getStoredPickupIndex(pickup, this.v.run.pickupDataTreasureRooms);
228
+ return getStoredPickupIndex(pickup, v.run.pickupDataTreasureRooms);
227
229
  }
228
230
 
229
231
  case RoomType.BOSS: {
230
- return getStoredPickupIndex(pickup, this.v.run.pickupDataBossRooms);
232
+ return getStoredPickupIndex(pickup, v.run.pickupDataBossRooms);
231
233
  }
232
234
 
233
235
  default: {
@@ -255,13 +257,13 @@ export class PickupIndexCreation extends Feature {
255
257
  @Exported
256
258
  public getPickupIndex(pickup: EntityPickup): PickupIndex {
257
259
  const ptrHash = GetPtrHash(pickup);
258
- const pickupIndexInitial = this.v.room.pickupIndexes.get(ptrHash);
260
+ const pickupIndexInitial = v.room.pickupIndexes.get(ptrHash);
259
261
  if (pickupIndexInitial !== undefined) {
260
262
  return pickupIndexInitial;
261
263
  }
262
264
 
263
265
  this.setPickupIndex(pickup);
264
- const pickupIndex = this.v.room.pickupIndexes.get(ptrHash);
266
+ const pickupIndex = v.room.pickupIndexes.get(ptrHash);
265
267
  if (pickupIndex !== undefined) {
266
268
  return pickupIndex;
267
269
  }
@@ -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.