isaacscript-common 29.5.2 → 29.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "29.5.2",
3
+ "version": "29.5.3",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -75,7 +75,7 @@ export class PreventCollectibleRotation extends Feature {
75
75
  collectibleType: CollectibleType,
76
76
  ): boolean | undefined => {
77
77
  if (ROLL_COLLECTIBLE_TYPES.has(collectibleType)) {
78
- markRollFrame();
78
+ v.run.rollGameFrame = game.GetFrameCount();
79
79
  }
80
80
 
81
81
  return undefined;
@@ -132,8 +132,13 @@ export class PreventCollectibleRotation extends Feature {
132
132
  return;
133
133
  }
134
134
 
135
+ // It can take a frame after the activation of the D6 for the sub-type to change.
135
136
  const gameFrameCount = game.GetFrameCount();
136
- if (gameFrameCount === v.run.rollGameFrame) {
137
+ if (
138
+ v.run.rollGameFrame !== null &&
139
+ (gameFrameCount === v.run.rollGameFrame ||
140
+ gameFrameCount === v.run.rollGameFrame + 1)
141
+ ) {
137
142
  v.run.trackedCollectibles.delete(pickupIndex);
138
143
  return;
139
144
  }
@@ -178,7 +183,3 @@ export class PreventCollectibleRotation extends Feature {
178
183
  }
179
184
  }
180
185
  }
181
-
182
- function markRollFrame() {
183
- v.run.rollGameFrame = game.GetFrameCount();
184
- }