isaacscript-common 20.3.2 → 20.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 (58) hide show
  1. package/dist/index.d.ts +103 -50
  2. package/dist/isaacscript-common.lua +414 -389
  3. package/dist/src/classes/callbacks/PostSlotDestroyed.d.ts +0 -8
  4. package/dist/src/classes/callbacks/PostSlotDestroyed.d.ts.map +1 -1
  5. package/dist/src/classes/callbacks/PostSlotDestroyed.lua +3 -51
  6. package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.d.ts +36 -0
  7. package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.d.ts.map +1 -0
  8. package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.lua +91 -0
  9. package/dist/src/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/ExtraConsoleCommands.lua +2 -3
  11. package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/RoomHistory.lua +6 -1
  13. package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +69 -127
  15. package/dist/src/classes/features/other/extraConsoleCommands/subroutines.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/extraConsoleCommands/subroutines.lua +11 -22
  17. package/dist/src/enums/ISCFeature.d.ts +44 -43
  18. package/dist/src/enums/ISCFeature.d.ts.map +1 -1
  19. package/dist/src/enums/ISCFeature.lua +45 -43
  20. package/dist/src/enums/SlotDestructionType.d.ts +13 -0
  21. package/dist/src/enums/SlotDestructionType.d.ts.map +1 -1
  22. package/dist/src/features.d.ts +46 -43
  23. package/dist/src/features.d.ts.map +1 -1
  24. package/dist/src/features.lua +3 -0
  25. package/dist/src/functions/deepCopyTests.d.ts.map +1 -1
  26. package/dist/src/functions/deepCopyTests.lua +1 -3
  27. package/dist/src/functions/logMisc.d.ts.map +1 -1
  28. package/dist/src/functions/logMisc.lua +1 -3
  29. package/dist/src/functions/mergeTests.d.ts.map +1 -1
  30. package/dist/src/functions/mergeTests.lua +2 -5
  31. package/dist/src/functions/slots.d.ts +4 -0
  32. package/dist/src/functions/slots.d.ts.map +1 -0
  33. package/dist/src/functions/slots.lua +27 -0
  34. package/dist/src/functions/utils.d.ts +3 -4
  35. package/dist/src/functions/utils.d.ts.map +1 -1
  36. package/dist/src/functions/utils.lua +8 -6
  37. package/dist/src/index.d.ts +1 -0
  38. package/dist/src/index.d.ts.map +1 -1
  39. package/dist/src/index.lua +8 -0
  40. package/dist/src/interfaces/RoomDescription.d.ts +1 -0
  41. package/dist/src/interfaces/RoomDescription.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/src/classes/callbacks/PostSlotDestroyed.ts +2 -72
  44. package/src/classes/features/callbackLogic/SlotDestroyedDetection.ts +163 -0
  45. package/src/classes/features/other/ExtraConsoleCommands.ts +3 -6
  46. package/src/classes/features/other/RoomHistory.ts +6 -0
  47. package/src/classes/features/other/extraConsoleCommands/commands.ts +70 -78
  48. package/src/classes/features/other/extraConsoleCommands/subroutines.ts +11 -12
  49. package/src/enums/ISCFeature.ts +1 -0
  50. package/src/enums/SlotDestructionType.ts +14 -0
  51. package/src/features.ts +6 -0
  52. package/src/functions/deepCopyTests.ts +1 -2
  53. package/src/functions/logMisc.ts +1 -2
  54. package/src/functions/mergeTests.ts +2 -4
  55. package/src/functions/slots.ts +23 -0
  56. package/src/functions/utils.ts +7 -6
  57. package/src/index.ts +1 -0
  58. package/src/interfaces/RoomDescription.ts +1 -0
@@ -0,0 +1,27 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Set = ____lualib.Set
3
+ local __TS__New = ____lualib.__TS__New
4
+ local ____exports = {}
5
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
+ local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
7
+ local ____entityTypes = require("src.functions.entityTypes")
8
+ local isSlot = ____entityTypes.isSlot
9
+ local SLOT_MACHINE_VARIANTS = __TS__New(Set, {
10
+ SlotVariant.SLOT_MACHINE,
11
+ SlotVariant.BLOOD_DONATION_MACHINE,
12
+ SlotVariant.FORTUNE_TELLING_MACHINE,
13
+ SlotVariant.DONATION_MACHINE,
14
+ SlotVariant.SHOP_RESTOCK_MACHINE,
15
+ SlotVariant.GREED_DONATION_MACHINE,
16
+ SlotVariant.MOMS_DRESSING_TABLE,
17
+ SlotVariant.CRANE_GAME,
18
+ SlotVariant.CONFESSIONAL
19
+ })
20
+ --- Returns true for the specific variants of `EntityType.SLOT` that are machines.
21
+ function ____exports.isSlotMachine(self, entity)
22
+ if not isSlot(nil, entity) then
23
+ return false
24
+ end
25
+ return SLOT_MACHINE_VARIANTS:has(entity.Variant)
26
+ end
27
+ return ____exports
@@ -57,11 +57,10 @@ export declare function isReflectionRender(): boolean;
57
57
  */
58
58
  export declare function isVanillaConsoleCommand(commandName: string): boolean;
59
59
  /**
60
- * Helper function to print something to the in-game console. Use this instead of invoking the
61
- * `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
62
- * of the message (which `Isaac.ConsoleOutput` does not do by default).
60
+ * Helper function to log a message to the "log.txt" file and to print it to the screen at the same
61
+ * time.
63
62
  */
64
- export declare function printConsole(msg: string): void;
63
+ export declare function logAndPrint(msg: string): void;
65
64
  /** Helper function to print whether something was enabled or disabled to the in-game console. */
66
65
  export declare function printEnabled(enabled: boolean, description: string): void;
67
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAWlE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EA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M,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAqB1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,4BAA4B,CAE1C,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,KACzB,IAAI,CAAG"}
@@ -5,6 +5,8 @@ local ____cachedClasses = require("src.core.cachedClasses")
5
5
  local game = ____cachedClasses.game
6
6
  local ____consoleCommandsSet = require("src.sets.consoleCommandsSet")
7
7
  local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
8
+ local ____log = require("src.functions.log")
9
+ local log = ____log.log
8
10
  --- Helper function to return an array of integers with the specified range, inclusive on the lower
9
11
  -- end and exclusive on the high end. (The "e" stands for exclusive.)
10
12
  --
@@ -89,16 +91,16 @@ end
89
91
  function ____exports.isVanillaConsoleCommand(self, commandName)
90
92
  return CONSOLE_COMMANDS_SET:has(commandName)
91
93
  end
92
- --- Helper function to print something to the in-game console. Use this instead of invoking the
93
- -- `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
94
- -- of the message (which `Isaac.ConsoleOutput` does not do by default).
95
- function ____exports.printConsole(self, msg)
96
- Isaac.ConsoleOutput(msg .. "\n")
94
+ --- Helper function to log a message to the "log.txt" file and to print it to the screen at the same
95
+ -- time.
96
+ function ____exports.logAndPrint(self, msg)
97
+ log(nil, msg)
98
+ print(msg)
97
99
  end
98
100
  --- Helper function to print whether something was enabled or disabled to the in-game console.
99
101
  function ____exports.printEnabled(self, enabled, description)
100
102
  local enabledText = enabled and "Enabled" or "Disabled"
101
- ____exports.printConsole(nil, ((enabledText .. " ") .. description) .. ".")
103
+ print(((enabledText .. " ") .. description) .. ".")
102
104
  end
103
105
  --- Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
104
106
  --
@@ -103,6 +103,7 @@ export * from "./functions/run";
103
103
  export * from "./functions/seeds";
104
104
  export * from "./functions/serialization";
105
105
  export * from "./functions/set";
106
+ export * from "./functions/slots";
106
107
  export * from "./functions/sound";
107
108
  export * from "./functions/spawnCollectible";
108
109
  export * from "./functions/sprites";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CA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;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -839,6 +839,14 @@ do
839
839
  end
840
840
  end
841
841
  end
842
+ do
843
+ local ____export = require("src.functions.slots")
844
+ for ____exportKey, ____exportValue in pairs(____export) do
845
+ if ____exportKey ~= "default" then
846
+ ____exports[____exportKey] = ____exportValue
847
+ end
848
+ end
849
+ end
842
850
  do
843
851
  local ____export = require("src.functions.sound")
844
852
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -1,6 +1,7 @@
1
1
  import { Dimension, LevelStage, RoomType, StageID, StageType } from "isaac-typescript-definitions";
2
2
  /** This is used by the room history feature of the standard library. */
3
3
  export interface RoomDescription {
4
+ startSeedString: string;
4
5
  stage: LevelStage;
5
6
  stageType: StageType;
6
7
  stageID: StageID;
@@ -1 +1 @@
1
- {"version":3,"file":"RoomDescription.d.ts","sourceRoot":"","sources":["../../../src/interfaces/RoomDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAEtC,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,EAAE,GAAG,CAAC;CACvB"}
1
+ {"version":3,"file":"RoomDescription.d.ts","sourceRoot":"","sources":["../../../src/interfaces/RoomDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAEtC,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,EAAE,GAAG,CAAC;CACvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "20.3.2",
3
+ "version": "20.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -1,84 +1,14 @@
1
- import {
2
- EntityGridCollisionClass,
3
- EntityType,
4
- ModCallback,
5
- } from "isaac-typescript-definitions";
6
- import { game } from "../../core/cachedClasses";
1
+ import { ISCFeature } from "../../enums/ISCFeature";
7
2
  import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
8
- import { SlotDestructionType } from "../../enums/SlotDestructionType";
9
3
  import { shouldFireSlot } from "../../shouldFire";
10
4
  import { CustomCallback } from "../private/CustomCallback";
11
5
 
12
- const PRIZE_GAME_FRAME_DELAY_UNTIL_REMOVAL = 3;
13
-
14
6
  export class PostSlotDestroyed extends CustomCallback<ModCallbackCustom.POST_SLOT_DESTROYED> {
15
- public override v = {
16
- room: {
17
- brokenSlots: new Set<PtrHash>(),
18
- slotPrizeAnimationGameFrame: new Map<PtrHash, int>(),
19
- },
20
- };
21
-
22
7
  constructor() {
23
8
  super();
24
9
 
25
- this.callbacksUsed = [
26
- // 67
27
- [
28
- ModCallback.POST_ENTITY_REMOVE,
29
- this.postEntityRemoveSlot,
30
- [EntityType.SLOT],
31
- ],
32
- ];
33
-
34
- this.customCallbacksUsed = [
35
- [
36
- ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED,
37
- this.postSlotAnimationChanged,
38
- ],
39
- ];
10
+ this.featuresUsed = [ISCFeature.SLOT_DESTROYED_DETECTION];
40
11
  }
41
12
 
42
13
  protected override shouldFire = shouldFireSlot;
43
-
44
- // ModCallback.POST_ENTITY_REMOVE (67)
45
- // EntityType.SLOT (6)
46
- private postEntityRemoveSlot = (entity: Entity) => {
47
- const slot = entity as EntitySlot;
48
- const ptrHash = GetPtrHash(slot);
49
- const gameFrameCount = game.GetFrameCount();
50
-
51
- const prizeFrame = this.v.room.slotPrizeAnimationGameFrame.get(ptrHash);
52
- if (prizeFrame === undefined) {
53
- return;
54
- }
55
-
56
- if (prizeFrame + PRIZE_GAME_FRAME_DELAY_UNTIL_REMOVAL === gameFrameCount) {
57
- this.fire(slot, SlotDestructionType.COLLECTIBLE_PAYOUT);
58
- }
59
- };
60
-
61
- // ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED
62
- private postSlotAnimationChanged = (slot: EntitySlot) => {
63
- const ptrHash = GetPtrHash(slot);
64
- const gameFrameCount = game.GetFrameCount();
65
-
66
- const alreadyBroken = this.v.room.brokenSlots.has(ptrHash);
67
- if (alreadyBroken) {
68
- return;
69
- }
70
-
71
- if (slot.GridCollisionClass === EntityGridCollisionClass.GROUND) {
72
- this.v.room.brokenSlots.add(ptrHash);
73
- this.fire(slot, SlotDestructionType.NORMAL);
74
- }
75
-
76
- const sprite = slot.GetSprite();
77
- const animation = sprite.GetAnimation();
78
- if (animation === "Prize") {
79
- this.v.room.slotPrizeAnimationGameFrame.set(ptrHash, gameFrameCount);
80
- } else {
81
- this.v.room.slotPrizeAnimationGameFrame.delete(ptrHash);
82
- }
83
- };
84
14
  }
@@ -0,0 +1,163 @@
1
+ // For machines, destruction is detected in two ways:
2
+
3
+ // 1) The main way is via a change in grid entity class. This happens when the machine is destroyed
4
+ // with a bomb, for example. For this case, the slot will remain until the player leaves the
5
+ // room.
6
+
7
+ // 2) In the specific case of a machine spawning a collectible, the machine will be immediately
8
+ // removed. The collectible will not have the `SpawnerEntity` or `Parent` in this case. Thus, we
9
+ // store all despawning slots in an array and then cross reference the array when a new pickup
10
+ // spawns.
11
+
12
+ // For beggars, destruction is detected by monitoring for when a beggar despawns mid-room. Beggars
13
+ // that are paying out with a collectible will always be playing the "Teleport" animation.
14
+ // Otherwise, the beggar won't be playing any animation in particular.
15
+
16
+ import {
17
+ EntityGridCollisionClass,
18
+ EntityType,
19
+ ModCallback,
20
+ PickupVariant,
21
+ } from "isaac-typescript-definitions";
22
+ import { game } from "../../../core/cachedClasses";
23
+ import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
24
+ import { SlotDestructionType } from "../../../enums/SlotDestructionType";
25
+ import { isSlotMachine } from "../../../functions/slots";
26
+ import { vectorEquals } from "../../../functions/vector";
27
+ import { PostSlotDestroyed } from "../../callbacks/PostSlotDestroyed";
28
+ import { Feature } from "../../private/Feature";
29
+ import { RoomHistory } from "../other/RoomHistory";
30
+
31
+ type DespawnedSlotTuple = [
32
+ gameFrame: int,
33
+ position: Vector,
34
+ entityPtr: EntityPtr,
35
+ ];
36
+
37
+ export class SlotDestroyedDetection extends Feature {
38
+ public override v = {
39
+ room: {
40
+ destroyedSlotSet: new Set<PtrHash>(),
41
+ despawnedSlots: [] as DespawnedSlotTuple[],
42
+ },
43
+ };
44
+
45
+ private postSlotDestroyed: PostSlotDestroyed;
46
+ private roomHistory: RoomHistory;
47
+
48
+ constructor(postSlotDestroyed: PostSlotDestroyed, roomHistory: RoomHistory) {
49
+ super();
50
+
51
+ this.callbacksUsed = [
52
+ // 34
53
+ [
54
+ ModCallback.POST_PICKUP_INIT,
55
+ this.postPickupInitCollectible,
56
+ [PickupVariant.COLLECTIBLE],
57
+ ],
58
+
59
+ // 67
60
+ [
61
+ ModCallback.POST_ENTITY_REMOVE,
62
+ this.postEntityRemoveSlot,
63
+ [EntityType.SLOT],
64
+ ],
65
+ ];
66
+
67
+ this.customCallbacksUsed = [
68
+ [ModCallbackCustom.POST_SLOT_UPDATE, this.postSlotUpdate],
69
+ ];
70
+
71
+ this.postSlotDestroyed = postSlotDestroyed;
72
+ this.roomHistory = roomHistory;
73
+ }
74
+
75
+ // ModCallback.POST_PICKUP_INIT (34)
76
+ // PickupVariant.COLLECTIBLE (100)
77
+ private postPickupInitCollectible = (pickup: EntityPickup) => {
78
+ const gameFrameCount = game.GetFrameCount();
79
+
80
+ // Go through the despawning slots to see if they match this pickup.
81
+ for (const despawnedSlotTuple of this.v.room.despawnedSlots) {
82
+ const [gameFrame, position, entityPtr] = despawnedSlotTuple;
83
+ if (
84
+ gameFrame === gameFrameCount &&
85
+ vectorEquals(position, pickup.Position)
86
+ ) {
87
+ const entity = entityPtr.Ref;
88
+ if (entity !== undefined) {
89
+ const slot = entity as EntitySlot;
90
+ this.postSlotDestroyed.fire(
91
+ slot,
92
+ SlotDestructionType.COLLECTIBLE_PAYOUT,
93
+ );
94
+ }
95
+ }
96
+ }
97
+ };
98
+
99
+ // ModCallback.POST_ENTITY_REMOVE (67)
100
+ // EntityType.SLOT (6)
101
+ private postEntityRemoveSlot = (entity: Entity) => {
102
+ const slot = entity as EntitySlot;
103
+
104
+ // The `POST_ENTITY_REMOVE` callback will fire for slots that are naturally despawning as a
105
+ // player leaves a room. We want to ignore all slots that despawn for this reason.
106
+ if (this.roomHistory.isLeavingRoom()) {
107
+ return;
108
+ }
109
+
110
+ if (isSlotMachine(slot)) {
111
+ this.postEntityRemoveSlotMachine(slot);
112
+ } else {
113
+ this.postEntityRemoveBeggar(slot);
114
+ }
115
+ };
116
+
117
+ private postEntityRemoveSlotMachine(slot: EntitySlot) {
118
+ const gameFrameCount = game.GetFrameCount();
119
+ const entityPtr = EntityPtr(slot);
120
+ const despawnedSlotTuple: DespawnedSlotTuple = [
121
+ gameFrameCount,
122
+ slot.Position,
123
+ entityPtr,
124
+ ];
125
+ this.v.room.despawnedSlots.push(despawnedSlotTuple);
126
+ }
127
+
128
+ private postEntityRemoveBeggar(slot: EntitySlot) {
129
+ const sprite = slot.GetSprite();
130
+ const animation = sprite.GetAnimation();
131
+ const slotDestructionType =
132
+ animation === "Teleport"
133
+ ? SlotDestructionType.COLLECTIBLE_PAYOUT
134
+ : SlotDestructionType.NORMAL;
135
+ this.postSlotDestroyed.fire(slot, slotDestructionType);
136
+ }
137
+
138
+ // ModCallbackCustom.POST_SLOT_UPDATE
139
+ private postSlotUpdate = (slot: EntitySlot) => {
140
+ const ptrHash = GetPtrHash(slot);
141
+
142
+ const alreadyDestroyed = this.v.room.destroyedSlotSet.has(ptrHash);
143
+ if (alreadyDestroyed) {
144
+ return;
145
+ }
146
+
147
+ this.checkDestroyedFromCollisionClass(slot);
148
+ };
149
+
150
+ /**
151
+ * Slots normally have an entity collision class of `EntityCollisionClass.ALL` (4) and a grid
152
+ * collision class of `EntityGridCollisionClass.NONE` (0). When they are destroyed with a bomb,
153
+ * the entity collision class stays the same, but the grid collision class switches to
154
+ * `EntityGridCollisionClass.GROUND` (5).
155
+ */
156
+ private checkDestroyedFromCollisionClass(slot: EntitySlot) {
157
+ if (slot.GridCollisionClass === EntityGridCollisionClass.GROUND) {
158
+ const ptrHash = GetPtrHash(slot);
159
+ this.v.room.destroyedSlotSet.add(ptrHash);
160
+ this.postSlotDestroyed.fire(slot, SlotDestructionType.NORMAL);
161
+ }
162
+ }
163
+ }
@@ -10,10 +10,7 @@ import { Exported } from "../../../decorators";
10
10
  import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
11
11
  import { addFlag, bitFlags } from "../../../functions/flag";
12
12
  import { getMapPartialMatch } from "../../../functions/map";
13
- import {
14
- isVanillaConsoleCommand,
15
- printConsole,
16
- } from "../../../functions/utils";
13
+ import { isVanillaConsoleCommand } from "../../../functions/utils";
17
14
  import { Feature } from "../../private/Feature";
18
15
  import * as commands from "./extraConsoleCommands/commands";
19
16
  import { v } from "./extraConsoleCommands/v";
@@ -176,12 +173,12 @@ export class ExtraConsoleCommands extends Feature {
176
173
  private executeCmd = (command: string, params: string) => {
177
174
  const resultTuple = getMapPartialMatch(command, this.commandFunctionMap);
178
175
  if (resultTuple === undefined) {
179
- printConsole("That is an invalid console command.");
176
+ print("That is an invalid console command.");
180
177
  return;
181
178
  }
182
179
 
183
180
  const [commandName, commandFunction] = resultTuple;
184
- printConsole(`Command: ${commandName}`);
181
+ print(`Command: ${commandName}`);
185
182
  commandFunction(params);
186
183
  };
187
184
 
@@ -39,6 +39,8 @@ export class RoomHistory extends Feature {
39
39
  const stageType = level.GetStageType();
40
40
  const room = game.GetRoom();
41
41
  const roomType = room.GetType();
42
+ const seeds = game.GetSeeds();
43
+ const startSeedString = seeds.GetStartSeedString();
42
44
  const stageID = getRoomStageID();
43
45
  const dimension = getDimension();
44
46
  const roomVariant = getRoomVariant();
@@ -49,6 +51,7 @@ export class RoomHistory extends Feature {
49
51
  const roomVisitedCount = getRoomVisitedCount();
50
52
 
51
53
  const roomDescription: RoomDescription = {
54
+ startSeedString,
52
55
  stage,
53
56
  stageType,
54
57
  stageID,
@@ -133,6 +136,8 @@ export class RoomHistory extends Feature {
133
136
  const level = game.GetLevel();
134
137
  const stage = level.GetStage();
135
138
  const stageType = level.GetStageType();
139
+ const seeds = game.GetSeeds();
140
+ const startSeedString = seeds.GetStartSeedString();
136
141
  const roomListIndex = getRoomListIndex();
137
142
  const roomVisitedCount = getRoomVisitedCount();
138
143
  const latestRoomDescription = this.getLatestRoomDescription();
@@ -144,6 +149,7 @@ export class RoomHistory extends Feature {
144
149
  }
145
150
 
146
151
  return (
152
+ startSeedString !== latestRoomDescription.startSeedString ||
147
153
  stage !== latestRoomDescription.stage ||
148
154
  stageType !== latestRoomDescription.stageType ||
149
155
  roomListIndex !== latestRoomDescription.roomListIndex ||