isaacscript-common 1.2.254 → 1.2.255

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.
@@ -1,4 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
+ import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
2
3
  /**
3
4
  * Helper function to get all of the `EntityType.ENTITY_BOMB` in the room.
4
5
  *
@@ -218,7 +219,7 @@ export declare function spawnLaser(variant: LaserVariant | int, subType: int, po
218
219
  /** Helper function to spawn a `EntityType.ENTITY_LASER` (7) with a specific seed. */
219
220
  export declare function spawnLaserWithSeed(variant: LaserVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityLaser;
220
221
  /** Helper function to spawn an NPC. */
221
- export declare function spawnNPC(entityType: EntityType | int, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
222
+ export declare function spawnNPC<T extends number>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
222
223
  /** Helper function to spawn an NPC with a specific seed. */
223
224
  export declare function spawnNPCWithSeed(entityType: EntityType | int, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
224
225
  /** Helper function to spawn a `EntityType.ENTITY_PICKUP` (5). */
@@ -0,0 +1,2 @@
1
+ /** We cannot use EntityType values directly since it will break the exclusion hack. */
2
+ export declare type EntityTypeNonNPC = 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 1000;
@@ -0,0 +1,3 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.254",
3
+ "version": "1.2.255",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",