isaacscript-common 75.2.1 → 76.1.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 (43) hide show
  1. package/dist/classes/features/other/DeployJSONRoom.d.ts +0 -1
  2. package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
  3. package/dist/classes/features/other/DeployJSONRoom.lua +6 -4
  4. package/dist/classes/features/other/SpawnRockAltRewards.lua +14 -14
  5. package/dist/classes/features/other/extraConsoleCommands/commands.lua +3 -3
  6. package/dist/enums/ISCFeature.d.ts +12 -14
  7. package/dist/enums/ISCFeature.d.ts.map +1 -1
  8. package/dist/enums/ISCFeature.lua +12 -16
  9. package/dist/features.d.ts +12 -18
  10. package/dist/features.d.ts.map +1 -1
  11. package/dist/features.lua +1 -9
  12. package/dist/functions/cards.d.ts +8 -0
  13. package/dist/functions/cards.d.ts.map +1 -1
  14. package/dist/functions/cards.lua +22 -0
  15. package/dist/functions/collectibles.d.ts +8 -0
  16. package/dist/functions/collectibles.d.ts.map +1 -1
  17. package/dist/functions/collectibles.lua +19 -0
  18. package/dist/functions/spawnCollectible.d.ts +28 -6
  19. package/dist/functions/spawnCollectible.d.ts.map +1 -1
  20. package/dist/functions/spawnCollectible.lua +50 -7
  21. package/dist/functions/tears.d.ts +6 -2
  22. package/dist/functions/tears.d.ts.map +1 -1
  23. package/dist/functions/tears.lua +6 -2
  24. package/dist/index.rollup.d.ts +63 -106
  25. package/dist/isaacscript-common.lua +225 -331
  26. package/package.json +1 -1
  27. package/src/classes/features/other/DeployJSONRoom.ts +4 -12
  28. package/src/classes/features/other/SpawnRockAltRewards.ts +14 -14
  29. package/src/classes/features/other/extraConsoleCommands/commands.ts +3 -3
  30. package/src/enums/ISCFeature.ts +0 -2
  31. package/src/features.ts +1 -15
  32. package/src/functions/cards.ts +19 -0
  33. package/src/functions/collectibles.ts +25 -0
  34. package/src/functions/spawnCollectible.ts +58 -8
  35. package/src/functions/tears.ts +6 -2
  36. package/dist/classes/features/other/PreventCollectibleRotation.d.ts +0 -28
  37. package/dist/classes/features/other/PreventCollectibleRotation.d.ts.map +0 -1
  38. package/dist/classes/features/other/PreventCollectibleRotation.lua +0 -112
  39. package/dist/classes/features/other/SpawnCollectible.d.ts +0 -58
  40. package/dist/classes/features/other/SpawnCollectible.d.ts.map +0 -1
  41. package/dist/classes/features/other/SpawnCollectible.lua +0 -68
  42. package/src/classes/features/other/PreventCollectibleRotation.ts +0 -205
  43. package/src/classes/features/other/SpawnCollectible.ts +0 -124
@@ -3,11 +3,14 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
4
4
  local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
5
5
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
6
+ local ____cachedClasses = require("core.cachedClasses")
7
+ local game = ____cachedClasses.game
6
8
  local ____constants = require("core.constants")
7
9
  local VectorZero = ____constants.VectorZero
8
10
  local ____collectibleTag = require("functions.collectibleTag")
9
11
  local isQuestCollectible = ____collectibleTag.isQuestCollectible
10
12
  local ____collectibles = require("functions.collectibles")
13
+ local preventCollectibleRotation = ____collectibles.preventCollectibleRotation
11
14
  local setCollectibleEmpty = ____collectibles.setCollectibleEmpty
12
15
  local ____entitiesSpecific = require("functions.entitiesSpecific")
13
16
  local spawnPickupWithSeed = ____entitiesSpecific.spawnPickupWithSeed
@@ -19,11 +22,8 @@ local isRNG = ____rng.isRNG
19
22
  --- Helper function to spawn a collectible.
20
23
  --
21
24
  -- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
22
- -- collectibles costing coins.
23
- --
24
- -- This function is unsafe because it will not correctly handle quest items being rotated by Tainted
25
- -- Isaac's rotation mechanic. To handle that, use the `spawnCollectible` helper function instead
26
- -- (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
25
+ -- collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
26
+ -- rotation mechanic.
27
27
  --
28
28
  -- If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
29
29
  -- `seedOrRNG` parameter.
@@ -38,7 +38,7 @@ local isRNG = ____rng.isRNG
38
38
  -- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
39
39
  -- Tainted Keeper. Default is false.
40
40
  -- @param spawner Optional.
41
- function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
41
+ function ____exports.spawnCollectible(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
42
42
  if options == nil then
43
43
  options = false
44
44
  end
@@ -58,6 +58,9 @@ function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGri
58
58
  VectorZero,
59
59
  spawner
60
60
  )
61
+ if isQuestCollectible(nil, collectible) then
62
+ preventCollectibleRotation(nil, collectible)
63
+ end
61
64
  if options then
62
65
  collectible.OptionsPickupIndex = 1
63
66
  end
@@ -67,6 +70,46 @@ function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGri
67
70
  end
68
71
  return collectible
69
72
  end
73
+ --- Helper function to spawn a collectible from a specific item pool.
74
+ --
75
+ -- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
76
+ -- collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
77
+ -- rotation mechanic.
78
+ --
79
+ -- If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
80
+ -- `seedOrRNG` parameter.
81
+ --
82
+ -- In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
83
+ --
84
+ -- @param itemPoolType The item pool to draw the collectible type from.
85
+ -- @param positionOrGridIndex The position or grid index to spawn the collectible at.
86
+ -- @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
87
+ -- `RNG.Next` method will be called. If `undefined` is provided, it will default to
88
+ -- a random seed.
89
+ -- @param options Optional. Set to true to make the collectible a "There's Options" style
90
+ -- collectible. Default is false.
91
+ -- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
92
+ -- Tainted Keeper. Default is false.
93
+ -- @param spawner Optional.
94
+ function ____exports.spawnCollectibleFromPool(self, itemPoolType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
95
+ if options == nil then
96
+ options = false
97
+ end
98
+ if forceFreeItem == nil then
99
+ forceFreeItem = false
100
+ end
101
+ local itemPool = game:GetItemPool()
102
+ local collectibleType = itemPool:GetCollectible(itemPoolType)
103
+ return ____exports.spawnCollectible(
104
+ nil,
105
+ collectibleType,
106
+ positionOrGridIndex,
107
+ seedOrRNG,
108
+ options,
109
+ forceFreeItem,
110
+ spawner
111
+ )
112
+ end
70
113
  --- Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
71
114
  -- with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
72
115
  -- current room's item pool.
@@ -84,7 +127,7 @@ end
84
127
  -- `RNG.Next` method will be called. If `undefined` is provided, it will default to
85
128
  -- a random seed.
86
129
  function ____exports.spawnEmptyCollectible(self, positionOrGridIndex, seedOrRNG)
87
- local collectible = ____exports.spawnCollectibleUnsafe(
130
+ local collectible = ____exports.spawnCollectible(
88
131
  nil,
89
132
  CollectibleType.BROKEN_SHOVEL_1,
90
133
  positionOrGridIndex,
@@ -35,8 +35,12 @@ export declare function getTearsStat(fireDelay: float): float;
35
35
  * Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
36
36
  * ground, a wall, or a grid entity.
37
37
  *
38
- * Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
39
- * die if they hit an enemy, but they will die if they hit a wall or object.)
38
+ * Note that tears are still considered to be missed if they hit a poop or fire, so you may want to
39
+ * handle those separately using the `POST_GRID_ENTITY_COLLISION` and `POST_ENTITY_COLLISION`
40
+ * callbacks, respectively.
41
+ *
42
+ * Under the hood, this function uses the `Entity.IsDead` method. (Tears will not die if they hit an
43
+ * enemy, but they will die if they hit a wall or object.)
40
44
  */
41
45
  export declare function isMissedTear(tear: EntityTear): boolean;
42
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAuBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB1D"}
1
+ {"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAuBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAgB1D"}
@@ -37,8 +37,12 @@ end
37
37
  --- Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
38
38
  -- ground, a wall, or a grid entity.
39
39
  --
40
- -- Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
41
- -- die if they hit an enemy, but they will die if they hit a wall or object.)
40
+ -- Note that tears are still considered to be missed if they hit a poop or fire, so you may want to
41
+ -- handle those separately using the `POST_GRID_ENTITY_COLLISION` and `POST_ENTITY_COLLISION`
42
+ -- callbacks, respectively.
43
+ --
44
+ -- Under the hood, this function uses the `Entity.IsDead` method. (Tears will not die if they hit an
45
+ -- enemy, but they will die if they hit a wall or object.)
42
46
  function ____exports.isMissedTear(self, tear)
43
47
  return tear:IsDead()
44
48
  end
@@ -3588,7 +3588,6 @@ export declare function deleteSetsFromSet<T>(mainSet: Set<T>, ...setsToRemove: A
3588
3588
 
3589
3589
  declare class DeployJSONRoom extends Feature {
3590
3590
  private readonly preventGridEntityRespawn;
3591
- private readonly spawnCollectible;
3592
3591
  private spawnAllEntities;
3593
3592
  private spawnNormalEntityForJSONRoom;
3594
3593
  /**
@@ -8190,6 +8189,15 @@ export declare function hasAnyTrinket(player: EntityPlayer): boolean;
8190
8189
  */
8191
8190
  export declare function hasArmor(entity: Entity): boolean;
8192
8191
 
8192
+ /**
8193
+ * Helper function to check if a player is holding a specific card in one of their pocket item
8194
+ * slots.
8195
+ *
8196
+ * This function is variadic, meaning that you can pass as many cards as you want to check for. The
8197
+ * function will return true if the player has any of the cards.
8198
+ */
8199
+ export declare function hasCard(player: EntityPlayer, ...cardTypes: CardType[]): boolean;
8200
+
8193
8201
  /**
8194
8202
  * Helper function to check to see if a player has one or more collectibles.
8195
8203
  *
@@ -9000,20 +9008,18 @@ export declare enum ISCFeature {
9000
9008
  PONY_DETECTION = 41,
9001
9009
  PRESS_INPUT = 42,
9002
9010
  PREVENT_CHILD_ENTITIES = 43,
9003
- PREVENT_COLLECTIBLE_ROTATION = 44,
9004
- PREVENT_GRID_ENTITY_RESPAWN = 45,
9005
- ROOM_CLEAR_FRAME = 46,
9006
- ROOM_HISTORY = 47,
9007
- RUN_IN_N_FRAMES = 48,
9008
- RUN_NEXT_ROOM = 49,
9009
- RUN_NEXT_RUN = 50,
9010
- SAVE_DATA_MANAGER = 51,
9011
- SPAWN_ALT_ROCK_REWARDS = 52,
9012
- SPAWN_COLLECTIBLE = 53,
9013
- STAGE_HISTORY = 54,
9014
- START_AMBUSH = 55,
9015
- TAINTED_LAZARUS_PLAYERS = 56,
9016
- UNLOCK_ACHIEVEMENTS_DETECTION = 57
9011
+ PREVENT_GRID_ENTITY_RESPAWN = 44,
9012
+ ROOM_CLEAR_FRAME = 45,
9013
+ ROOM_HISTORY = 46,
9014
+ RUN_IN_N_FRAMES = 47,
9015
+ RUN_NEXT_ROOM = 48,
9016
+ RUN_NEXT_RUN = 49,
9017
+ SAVE_DATA_MANAGER = 50,
9018
+ SPAWN_ALT_ROCK_REWARDS = 51,
9019
+ STAGE_HISTORY = 52,
9020
+ START_AMBUSH = 53,
9021
+ TAINTED_LAZARUS_PLAYERS = 54,
9022
+ UNLOCK_ACHIEVEMENTS_DETECTION = 55
9017
9023
  }
9018
9024
 
9019
9025
  /**
@@ -9067,7 +9073,6 @@ declare interface ISCFeatureToClass {
9067
9073
  [ISCFeature.PONY_DETECTION]: PonyDetection;
9068
9074
  [ISCFeature.PRESS_INPUT]: PressInput;
9069
9075
  [ISCFeature.PREVENT_CHILD_ENTITIES]: PreventChildEntities;
9070
- [ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: PreventCollectibleRotation;
9071
9076
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: PreventGridEntityRespawn;
9072
9077
  [ISCFeature.ROOM_CLEAR_FRAME]: RoomClearFrame;
9073
9078
  [ISCFeature.ROOM_HISTORY]: RoomHistory;
@@ -9076,7 +9081,6 @@ declare interface ISCFeatureToClass {
9076
9081
  [ISCFeature.RUN_NEXT_RUN]: RunNextRun;
9077
9082
  [ISCFeature.SAVE_DATA_MANAGER]: SaveDataManager;
9078
9083
  [ISCFeature.SPAWN_ALT_ROCK_REWARDS]: SpawnRockAltRewards;
9079
- [ISCFeature.SPAWN_COLLECTIBLE]: SpawnCollectible;
9080
9084
  [ISCFeature.STAGE_HISTORY]: StageHistory;
9081
9085
  [ISCFeature.START_AMBUSH]: StartAmbush;
9082
9086
  [ISCFeature.TAINTED_LAZARUS_PLAYERS]: TaintedLazarusPlayers;
@@ -9569,8 +9573,12 @@ export declare function isMirrorRoom(roomData: RoomConfig): boolean;
9569
9573
  * Helper function to check if a tear hit an enemy. A tear is considered to be missed if it hit the
9570
9574
  * ground, a wall, or a grid entity.
9571
9575
  *
9572
- * Under the hood, this function uses the `Entity.IsDead` method to determine this. (Tears will not
9573
- * die if they hit an enemy, but they will die if they hit a wall or object.)
9576
+ * Note that tears are still considered to be missed if they hit a poop or fire, so you may want to
9577
+ * handle those separately using the `POST_GRID_ENTITY_COLLISION` and `POST_ENTITY_COLLISION`
9578
+ * callbacks, respectively.
9579
+ *
9580
+ * Under the hood, this function uses the `Entity.IsDead` method. (Tears will not die if they hit an
9581
+ * enemy, but they will die if they hit a wall or object.)
9574
9582
  */
9575
9583
  export declare function isMissedTear(tear: EntityTear): boolean;
9576
9584
 
@@ -15511,31 +15519,14 @@ declare class PreventChildEntities extends Feature {
15511
15519
  preventChildEntities(entity: Entity): void;
15512
15520
  }
15513
15521
 
15514
- declare class PreventCollectibleRotation extends Feature {
15515
- private readonly pickupIndexCreation;
15516
- private readonly runInNFrames;
15517
- private readonly preUseItem;
15518
- /**
15519
- * Soul of Isaac causes items to flip. We assume that the player deliberately wants to roll a
15520
- * quest item, so we delete all tracked items in the current room.
15521
- */
15522
- private readonly postUseCardSoulOfIsaac;
15523
- private readonly postDiceRoomActivated;
15524
- private readonly postPickupChanged;
15525
- /**
15526
- * Helper function to prevent a collectible from being affected by Tainted Isaac's rotation
15527
- * mechanic. (This mechanic also happens from Glitched Crown and Binge Eater.) This is useful
15528
- * because quest items that are manually spawned by mods will be automatically be affected by this
15529
- * mechanic.
15530
- *
15531
- * It is required to pass the intended collectible type to this function since it is possible for
15532
- * collectibles to rotate on the first frame that they are spawned.
15533
- *
15534
- * In order to use this function, you must upgrade your mod with
15535
- * `ISCFeature.PREVENT_COLLECTIBLE_ROTATION`.
15536
- */
15537
- preventCollectibleRotation(collectible: EntityPickup, collectibleType: CollectibleType): void;
15538
- }
15522
+ /**
15523
+ * Helper function to remove the rotation behavior from a collectible. This will happen by default
15524
+ * when collectibles are spawned when playing as Tainted Isaac or when having Binge Eater.
15525
+ *
15526
+ * Under the hood, this is accomplished by morphing the collectible with the `ignoreModifiers`
15527
+ * argument set to true.
15528
+ */
15529
+ export declare function preventCollectibleRotation(collectible: EntityPickup): void;
15539
15530
 
15540
15531
  declare class PreventGridEntityRespawn extends Feature {
15541
15532
  private readonly runInNFrames;
@@ -17771,71 +17762,12 @@ export declare function spawnCoin(coinSubType: CoinSubType, positionOrGridIndex:
17771
17762
  */
17772
17763
  export declare function spawnCoinWithSeed(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
17773
17764
 
17774
- declare class SpawnCollectible extends Feature {
17775
- private readonly preventCollectibleRotation;
17776
- /**
17777
- * Helper function to spawn a collectible.
17778
- *
17779
- * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
17780
- * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
17781
- * rotation mechanic.
17782
- *
17783
- * If you do not need to handle quest items being rotated (i.e. the collectible is guaranteed not
17784
- * to be a quest item), then you can use the `spawnCollectibleUnsafe` helper function instead
17785
- * (which does not require an upgraded mod).
17786
- *
17787
- * If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
17788
- * `seedOrRNG` parameter.
17789
- *
17790
- * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
17791
- *
17792
- * @param collectibleType The collectible type to spawn.
17793
- * @param positionOrGridIndex The position or grid index to spawn the collectible at.
17794
- * @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
17795
- * `RNG.Next` method will be called. If `undefined` is provided, it will default
17796
- * to a random seed.
17797
- * @param options Optional. Set to true to make the collectible a "There's Options" style
17798
- * collectible. Default is false.
17799
- * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
17800
- * Tainted Keeper. Default is false.
17801
- * @param spawner Optional.
17802
- */
17803
- spawnCollectible(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
17804
- /**
17805
- * Helper function to spawn a collectible from a specific item pool.
17806
- *
17807
- * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
17808
- * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
17809
- * rotation mechanic.
17810
- *
17811
- * If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
17812
- * `seedOrRNG` parameter.
17813
- *
17814
- * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
17815
- *
17816
- * @param itemPoolType The item pool to draw the collectible type from.
17817
- * @param positionOrGridIndex The position or grid index to spawn the collectible at.
17818
- * @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
17819
- * `RNG.Next` method will be called. If `undefined` is provided, it will default
17820
- * to a random seed.
17821
- * @param options Optional. Set to true to make the collectible a "There's Options" style
17822
- * collectible. Default is false.
17823
- * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
17824
- * Tainted Keeper. Default is false.
17825
- * @param spawner Optional.
17826
- */
17827
- spawnCollectibleFromPool(itemPoolType: ItemPoolType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
17828
- }
17829
-
17830
17765
  /**
17831
17766
  * Helper function to spawn a collectible.
17832
17767
  *
17833
17768
  * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
17834
- * collectibles costing coins.
17835
- *
17836
- * This function is unsafe because it will not correctly handle quest items being rotated by Tainted
17837
- * Isaac's rotation mechanic. To handle that, use the `spawnCollectible` helper function instead
17838
- * (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
17769
+ * collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
17770
+ * rotation mechanic.
17839
17771
  *
17840
17772
  * If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
17841
17773
  * `seedOrRNG` parameter.
@@ -17851,7 +17783,32 @@ declare class SpawnCollectible extends Feature {
17851
17783
  * Tainted Keeper. Default is false.
17852
17784
  * @param spawner Optional.
17853
17785
  */
17854
- export declare function spawnCollectibleUnsafe(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
17786
+ export declare function spawnCollectible(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
17787
+
17788
+ /**
17789
+ * Helper function to spawn a collectible from a specific item pool.
17790
+ *
17791
+ * Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
17792
+ * collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
17793
+ * rotation mechanic.
17794
+ *
17795
+ * If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
17796
+ * `seedOrRNG` parameter.
17797
+ *
17798
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
17799
+ *
17800
+ * @param itemPoolType The item pool to draw the collectible type from.
17801
+ * @param positionOrGridIndex The position or grid index to spawn the collectible at.
17802
+ * @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
17803
+ * `RNG.Next` method will be called. If `undefined` is provided, it will default to
17804
+ * a random seed.
17805
+ * @param options Optional. Set to true to make the collectible a "There's Options" style
17806
+ * collectible. Default is false.
17807
+ * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
17808
+ * Tainted Keeper. Default is false.
17809
+ * @param spawner Optional.
17810
+ */
17811
+ export declare function spawnCollectibleFromPool(itemPoolType: ItemPoolType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
17855
17812
 
17856
17813
  /** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
17857
17814
  export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;