isaacscript-common 2.0.24 → 2.0.25

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.
@@ -13,8 +13,9 @@ import { CollectibleType } from "isaac-typescript-definitions";
13
13
  * collectible. Default is false.
14
14
  * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
15
15
  * Tainted Keeper. Default is false.
16
+ * @param spawner Optional.
16
17
  */
17
- export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean): EntityPickup;
18
+ export declare function spawnCollectible(collectibleType: CollectibleType, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
18
19
  /**
19
20
  * Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
20
21
  * with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
@@ -3,6 +3,8 @@ 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 ____constants = require("constants")
7
+ local VectorZero = ____constants.VectorZero
6
8
  local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
7
9
  local preventCollectibleRotate = ____preventCollectibleRotate.preventCollectibleRotate
8
10
  local ____featuresInitialized = require("featuresInitialized")
@@ -18,7 +20,7 @@ local anyPlayerIs = ____player.anyPlayerIs
18
20
  local ____rng = require("functions.rng")
19
21
  local getRandomSeed = ____rng.getRandomSeed
20
22
  local isRNG = ____rng.isRNG
21
- function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG, options, forceFreeItem)
23
+ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG, options, forceFreeItem, spawner)
22
24
  if seedOrRNG == nil then
23
25
  seedOrRNG = getRandomSeed(nil)
24
26
  end
@@ -34,7 +36,9 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
34
36
  PickupVariant.COLLECTIBLE,
35
37
  collectibleType,
36
38
  position,
37
- seed
39
+ seed,
40
+ VectorZero,
41
+ spawner
38
42
  )
39
43
  if options then
40
44
  collectible.OptionsPickupIndex = 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,7 +25,7 @@
25
25
  "dist/**/*.d.ts"
26
26
  ],
27
27
  "dependencies": {
28
- "isaac-typescript-definitions": "^2.0.43"
28
+ "isaac-typescript-definitions": "^2.0.45"
29
29
  },
30
30
  "devDependencies": {
31
31
  "isaacscript-lint": "^1.0.157",