isaacscript-common 1.2.235 → 1.2.236

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.
@@ -100,6 +100,12 @@ export declare function setEntityRandomColor(entity: Entity): void;
100
100
  /**
101
101
  * Helper function to spawn an entity. Use this instead of the `Isaac.Spawn` method if you do not
102
102
  * need to specify the velocity or spawner.
103
+ *
104
+ * Also see the `spawnWithSeed` helper function.
105
+ */
106
+ export declare function spawn(entityType: EntityType | int, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): Entity;
107
+ /**
108
+ * Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
109
+ * need to specify the velocity or spawner.
103
110
  */
104
- export declare function spawn(entityType: EntityType | int, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
105
111
  export declare function spawnWithSeed(entityType: EntityType | int, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
@@ -157,20 +157,34 @@ function ____exports.setEntityRandomColor(self, entity)
157
157
  false
158
158
  )
159
159
  end
160
- function ____exports.spawn(self, entityType, variant, subType, position, velocity, spawner)
160
+ function ____exports.spawn(self, entityType, variant, subType, position, velocity, spawner, seed)
161
161
  if velocity == nil then
162
162
  velocity = VectorZero
163
163
  end
164
164
  if spawner == nil then
165
165
  spawner = nil
166
166
  end
167
- return Isaac.Spawn(
167
+ if seed == nil then
168
+ seed = nil
169
+ end
170
+ if seed == nil then
171
+ return Isaac.Spawn(
172
+ entityType,
173
+ variant,
174
+ subType,
175
+ position,
176
+ velocity,
177
+ spawner
178
+ )
179
+ end
180
+ return game:Spawn(
168
181
  entityType,
169
182
  variant,
170
- subType,
171
183
  position,
172
184
  velocity,
173
- spawner
185
+ spawner,
186
+ subType,
187
+ seed
174
188
  )
175
189
  end
176
190
  function ____exports.spawnWithSeed(self, entityType, variant, subType, position, seed, velocity, spawner)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.235",
3
+ "version": "1.2.236",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",