isaacscript-common 17.2.1 → 17.3.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 (34) hide show
  1. package/dist/index.d.ts +59 -55
  2. package/dist/isaacscript-common.lua +102 -97
  3. package/dist/src/classes/features/other/CustomHotkeys.d.ts +4 -0
  4. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -4
  6. package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
  7. package/dist/src/classes/features/other/SpawnCollectible.lua +4 -4
  8. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +3 -2
  9. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/SpawnRockAltRewards.lua +4 -1
  11. package/dist/src/functions/bosses.d.ts +2 -2
  12. package/dist/src/functions/bosses.d.ts.map +1 -1
  13. package/dist/src/functions/bosses.lua +5 -5
  14. package/dist/src/functions/entities.d.ts +5 -5
  15. package/dist/src/functions/entities.d.ts.map +1 -1
  16. package/dist/src/functions/entities.lua +10 -8
  17. package/dist/src/functions/entitiesSpecific.d.ts +20 -20
  18. package/dist/src/functions/entitiesSpecific.d.ts.map +1 -1
  19. package/dist/src/functions/entitiesSpecific.lua +40 -40
  20. package/dist/src/functions/pickupsSpecific.d.ts +18 -18
  21. package/dist/src/functions/pickupsSpecific.d.ts.map +1 -1
  22. package/dist/src/functions/pickupsSpecific.lua +36 -36
  23. package/dist/src/functions/spawnCollectible.d.ts +4 -4
  24. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  25. package/dist/src/functions/spawnCollectible.lua +6 -6
  26. package/package.json +1 -1
  27. package/src/classes/features/other/CustomHotkeys.ts +4 -0
  28. package/src/classes/features/other/SpawnCollectible.ts +6 -6
  29. package/src/classes/features/other/SpawnRockAltRewards.ts +7 -3
  30. package/src/functions/bosses.ts +13 -5
  31. package/src/functions/entities.ts +14 -8
  32. package/src/functions/entitiesSpecific.ts +40 -40
  33. package/src/functions/pickupsSpecific.ts +84 -36
  34. package/src/functions/spawnCollectible.ts +6 -6
@@ -21,7 +21,7 @@ import { getRandomSeed, isRNG } from "./rng";
21
21
  * (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
22
22
  *
23
23
  * @param collectibleType The collectible type to spawn.
24
- * @param position The position to spawn the collectible at.
24
+ * @param positionOrGridIndex The position or grid index to spawn the collectible at.
25
25
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
26
26
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
27
27
  * @param options Optional. Set to true to make the collectible a "There's Options" style
@@ -32,7 +32,7 @@ import { getRandomSeed, isRNG } from "./rng";
32
32
  */
33
33
  export function spawnCollectibleUnsafe(
34
34
  collectibleType: CollectibleType,
35
- position: Vector,
35
+ positionOrGridIndex: Vector | int,
36
36
  seedOrRNG: Seed | RNG = getRandomSeed(),
37
37
  options = false,
38
38
  forceFreeItem = false,
@@ -42,7 +42,7 @@ export function spawnCollectibleUnsafe(
42
42
  const collectible = spawnPickupWithSeed(
43
43
  PickupVariant.COLLECTIBLE,
44
44
  collectibleType,
45
- position,
45
+ positionOrGridIndex,
46
46
  seed,
47
47
  VectorZero,
48
48
  spawner,
@@ -80,17 +80,17 @@ export function spawnCollectibleUnsafe(
80
80
  * Instead, this function arbitrarily spawns a collectible with `CollectibleType.SAD_ONION`, and
81
81
  * then converts it to an empty pedestal afterward.
82
82
  *
83
- * @param position The position to spawn the empty collectible at.
83
+ * @param positionOrGridIndex The position or grid index to spawn the empty collectible at.
84
84
  * @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
85
85
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
86
86
  */
87
87
  export function spawnEmptyCollectible(
88
- position: Vector,
88
+ positionOrGridIndex: Vector | int,
89
89
  seedOrRNG: Seed | RNG = getRandomSeed(),
90
90
  ): EntityPickup {
91
91
  const collectible = spawnCollectibleUnsafe(
92
92
  CollectibleType.SAD_ONION,
93
- position,
93
+ positionOrGridIndex,
94
94
  seedOrRNG,
95
95
  false,
96
96
  true,