isaacscript-common 9.4.0 → 9.5.1

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,12 +1,12 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  import { CustomStage } from "../../interfaces/private/CustomStage";
3
- /** For `GridEntityType.DECORATION` (1) */
3
+ /** For `GridEntityType.DECORATION` (1). */
4
4
  export declare function setCustomDecorationGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
5
- /** For `GridEntityType.ROCK` (2) */
5
+ /** For `GridEntityType.ROCK` (2). */
6
6
  export declare function setCustomRockGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
7
- /** For `GridEntityType.PIT` (7) */
7
+ /** For `GridEntityType.PIT` (7). */
8
8
  export declare function setCustomPitGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
9
- /** For GridEntityType.DOOR (16) */
9
+ /** For `GridEntityType.DOOR` (16). */
10
10
  export declare function setCustomDoorGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
11
11
  export declare function convertVanillaTrapdoors(customStage: CustomStage, gridEntity: GridEntity): void;
12
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwCN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyDN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
1
+ {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,2CAA2C;AAC3C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwCN;AAED,qCAAqC;AACrC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyDN;AAED,oCAAoC;AACpC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED,sCAAsC;AACtC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
@@ -155,7 +155,7 @@ function removeEntitiesSpawnedFromGridEntity(self, entities, gridEntity)
155
155
  )
156
156
  removeEntities(nil, entitiesFromGridEntity)
157
157
  end
158
- --- For `GridEntityType.DECORATION` (1)
158
+ --- For `GridEntityType.DECORATION` (1).
159
159
  function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
160
160
  if customStage.decorationsPNGPath == nil and customStage.decorationsANM2Path == nil then
161
161
  return
@@ -181,7 +181,7 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
181
181
  sprite:LoadGraphics()
182
182
  end
183
183
  end
184
- --- For `GridEntityType.ROCK` (2)
184
+ --- For `GridEntityType.ROCK` (2).
185
185
  function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
186
186
  if customStage.rocksPNGPath == nil and customStage.rocksANM2Path == nil then
187
187
  return
@@ -224,7 +224,7 @@ function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
224
224
  end
225
225
  until true
226
226
  end
227
- --- For `GridEntityType.PIT` (7)
227
+ --- For `GridEntityType.PIT` (7).
228
228
  function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
229
229
  if customStage.pitsPNGPath == nil then
230
230
  return
@@ -244,7 +244,7 @@ function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
244
244
  sprite:LoadGraphics()
245
245
  end
246
246
  end
247
- --- For GridEntityType.DOOR (16)
247
+ --- For `GridEntityType.DOOR` (16).
248
248
  function ____exports.setCustomDoorGraphics(self, customStage, gridEntity)
249
249
  if customStage.doorPNGPaths == nil then
250
250
  return
@@ -1,6 +1,6 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
- /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76) */
3
+ /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76). */
4
4
  export declare const DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75;
5
5
  /** Helper function to see if a player is close enough to activate a Dice Room floor. */
6
6
  export declare function isCloseEnoughToTriggerDiceFloor(player: EntityPlayer, diceFloor: EntityEffect): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../src/functions/effects.ts"],"names":[],"mappings":";;AAEA,sEAAsE;AACtE,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,wFAAwF;AACxF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,GACtB,OAAO,CAUT"}
1
+ {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../src/functions/effects.ts"],"names":[],"mappings":";;AAEA,uEAAuE;AACvE,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,wFAAwF;AACxF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,GACtB,OAAO,CAUT"}
@@ -1,7 +1,7 @@
1
1
  local ____exports = {}
2
2
  local ____math = require("functions.math")
3
3
  local inRectangle = ____math.inRectangle
4
- --- For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76)
4
+ --- For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76).
5
5
  ____exports.DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75
6
6
  --- Helper function to see if a player is close enough to activate a Dice Room floor.
7
7
  function ____exports.isCloseEnoughToTriggerDiceFloor(self, player, diceFloor)
@@ -1,4 +1,4 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- /** For `EntityType.SLOT` (6) */
2
+ /** For `EntityType.SLOT` (6). */
3
3
  export declare function isSlot(entity: Entity): entity is EntitySlot;
4
4
  //# sourceMappingURL=entityTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entityTypes.d.ts","sourceRoot":"","sources":["../../src/functions/entityTypes.ts"],"names":[],"mappings":";AAEA,gCAAgC;AAChC,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU,CAE3D"}
1
+ {"version":3,"file":"entityTypes.d.ts","sourceRoot":"","sources":["../../src/functions/entityTypes.ts"],"names":[],"mappings":";AAEA,iCAAiC;AACjC,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU,CAE3D"}
@@ -1,7 +1,7 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
3
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
4
- --- For `EntityType.SLOT` (6)
4
+ --- For `EntityType.SLOT` (6).
5
5
  function ____exports.isSlot(self, entity)
6
6
  return entity.Type == EntityType.SLOT
7
7
  end
@@ -41,6 +41,14 @@ export declare function getRocks(variant?: number): GridEntityRock[];
41
41
  export declare function getSpikes(variant?: number): GridEntitySpikes[];
42
42
  /** Helper function to get all of the `GridEntityTNT` in the room. */
43
43
  export declare function getTNT(variant?: number): GridEntityTNT[];
44
+ /**
45
+ * Helper function to get all of the grid entities of type `GridEntityType.TELEPORTER` (23) in the
46
+ * room.
47
+ *
48
+ * @param variant Optional. If specified, will only get the teleporters that match the variant.
49
+ * Default is -1, which matches every variant.
50
+ */
51
+ export declare function getTeleporters(variant?: number): GridEntity[];
44
52
  /**
45
53
  * Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` (17) in the
46
54
  * room. Specify a specific trapdoor variant to select only trapdoors of that variant.
@@ -135,6 +143,18 @@ export declare function removeAllSpikes(variant?: number, updateRoom?: boolean,
135
143
  * @returns The TNTs that were removed.
136
144
  */
137
145
  export declare function removeAllTNT(variant?: number, updateRoom?: boolean, cap?: int): GridEntityTNT[];
146
+ /**
147
+ * Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
148
+ *
149
+ * @param variant Optional. If specified, will only remove the teleporters that match this variant.
150
+ * Default is -1, which matches every variant.
151
+ * @param updateRoom Optional. Whether or not to update the room after the teleporters are removed.
152
+ * Default is false. For more information, see the description of the
153
+ * `removeGridEntities` helper function.
154
+ * @param cap Optional. If specified, will only remove the given amount of teleporters.
155
+ * @returns The teleporters that were removed.
156
+ */
157
+ export declare function removeAllTeleporters(variant?: number, updateRoom?: boolean, cap?: int): GridEntity[];
138
158
  /**
139
159
  * Helper function to remove all of the `GridEntityType.TRAPDOOR` (17) in the room.
140
160
  *
@@ -179,6 +199,10 @@ export declare function spawnSpikesWithVariant(variant: int, gridIndexOrPosition
179
199
  export declare function spawnTNT(gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
180
200
  /** Helper function to spawn a `GridEntityType.TNT` (12) with a specific variant. */
181
201
  export declare function spawnTNTWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
202
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23). */
203
+ export declare function spawnTeleporter(gridIndexOrPosition: int | Vector): GridEntity | undefined;
204
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23) with a specific variant. */
205
+ export declare function spawnTeleporterWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntity | undefined;
182
206
  /** Helper function to spawn a `GridEntityType.TRAPDOOR` (17). */
183
207
  export declare function spawnTrapdoor(gridIndexOrPosition: int | Vector): GridEntity | undefined;
184
208
  /** Helper function to spawn a `GridEntityType.TRAPDOOR` (17) with a specific variant. */
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAEX,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAStC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,iBAAiB,GAAE,iBAAsB,GACxC,UAAU,EAAE,CAMd;AAKD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,UAAU,GAAE,UAAe,GAAG,aAAa,EAAE,CAepE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,WAAW,GAAE,qBAA0B,GACtC,cAAc,EAAE,CAelB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,oBAAoB,GAAE,oBAAyB,GAC9C,uBAAuB,EAAE,CAkB3B;AAED;;;;;;;GAOG;AACH,wB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,GAAG,SAAS,CAKrC;AAED,+FAA+F;AAC/F,wBAAgB,6BAA6B,CAC3C,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,uBAAuB,GAAG,SAAS,CAgBrC;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CACvB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,cAAc,GAAG,SAAS,CAE5B;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,cAAc,GAAG,SAAS,CAgB5B;AAED,8DAA8D;AAC9D,wBAAgB,WAAW,CACzB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,gBAAgB,GAAG,SAAS,CAE9B;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,gBAAgB,GAAG,SAAS,CAgB9B;AAED,4DAA4D;AAC5D,wBAAgB,QAAQ,CACtB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAE3B;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAgB3B;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAC3B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAKxB;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB"}
1
+ {"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,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sBAAsB,CACpC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,gBAAgB,GAAG,SAAS,CAgB9B;AAED,4DAA4D;AAC5D,wBAAgB,QAAQ,CACtB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAE3B;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAgB3B;AAED,mEAAmE;AACnE,wBAAgB,eAAe,CAC7B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED,2FAA2F;AAC3F,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAC3B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAKxB;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB"}
@@ -102,6 +102,10 @@ function ____exports.spawnTNTWithVariant(self, variant, gridIndexOrPosition)
102
102
  end
103
103
  return tnt
104
104
  end
105
+ --- Helper function to spawn a `GridEntityType.TELEPORTER` (23) with a specific variant.
106
+ function ____exports.spawnTeleporterWithVariant(self, variant, gridIndexOrPosition)
107
+ return spawnGridEntityWithVariant(nil, GridEntityType.TELEPORTER, variant, gridIndexOrPosition)
108
+ end
105
109
  --- Helper function to get all of the grid entities of type `GridEntityType.CRAWL_SPACE` (18) in the
106
110
  -- room.
107
111
  --
@@ -238,6 +242,20 @@ function ____exports.getTNT(self, variant)
238
242
  end
239
243
  return tntArray
240
244
  end
245
+ --- Helper function to get all of the grid entities of type `GridEntityType.TELEPORTER` (23) in the
246
+ -- room.
247
+ --
248
+ -- @param variant Optional. If specified, will only get the teleporters that match the variant.
249
+ -- Default is -1, which matches every variant.
250
+ function ____exports.getTeleporters(self, variant)
251
+ if variant == nil then
252
+ variant = -1
253
+ end
254
+ if variant == -1 then
255
+ return getGridEntities(nil, GridEntityType.TELEPORTER)
256
+ end
257
+ return getMatchingGridEntities(nil, GridEntityType.TELEPORTER, variant)
258
+ end
241
259
  --- Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` (17) in the
242
260
  -- room. Specify a specific trapdoor variant to select only trapdoors of that variant.
243
261
  function ____exports.getTrapdoors(self, trapdoorVariant)
@@ -384,6 +402,25 @@ function ____exports.removeAllTNT(self, variant, updateRoom, cap)
384
402
  local tnt = ____exports.getTNT(nil, variant)
385
403
  return removeGridEntities(nil, tnt, updateRoom, cap)
386
404
  end
405
+ --- Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
406
+ --
407
+ -- @param variant Optional. If specified, will only remove the teleporters that match this variant.
408
+ -- Default is -1, which matches every variant.
409
+ -- @param updateRoom Optional. Whether or not to update the room after the teleporters are removed.
410
+ -- Default is false. For more information, see the description of the
411
+ -- `removeGridEntities` helper function.
412
+ -- @param cap Optional. If specified, will only remove the given amount of teleporters.
413
+ -- @returns The teleporters that were removed.
414
+ function ____exports.removeAllTeleporters(self, variant, updateRoom, cap)
415
+ if variant == nil then
416
+ variant = -1
417
+ end
418
+ if updateRoom == nil then
419
+ updateRoom = false
420
+ end
421
+ local teleporters = ____exports.getTeleporters(nil, variant)
422
+ return removeGridEntities(nil, teleporters, updateRoom, cap)
423
+ end
387
424
  --- Helper function to remove all of the `GridEntityType.TRAPDOOR` (17) in the room.
388
425
  --
389
426
  -- @param trapdoorVariant Optional. If specified, will only remove the trapdoors that match this
@@ -435,6 +472,10 @@ end
435
472
  function ____exports.spawnTNT(self, gridIndexOrPosition)
436
473
  return ____exports.spawnTNTWithVariant(nil, 0, gridIndexOrPosition)
437
474
  end
475
+ --- Helper function to spawn a `GridEntityType.TELEPORTER` (23).
476
+ function ____exports.spawnTeleporter(self, gridIndexOrPosition)
477
+ return ____exports.spawnTeleporterWithVariant(nil, 0, gridIndexOrPosition)
478
+ end
438
479
  --- Helper function to spawn a `GridEntityType.TRAPDOOR` (17).
439
480
  function ____exports.spawnTrapdoor(self, gridIndexOrPosition)
440
481
  return ____exports.spawnCrawlSpaceWithVariant(nil, CrawlSpaceVariant.NORMAL, gridIndexOrPosition)
@@ -1,24 +1,24 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- /** For `PickupVariant.HEART` (10) */
2
+ /** For `PickupVariant.HEART` (10). */
3
3
  export declare function isHeart(pickup: EntityPickup): pickup is EntityPickupHeart;
4
- /** For `PickupVariant.COIN` (20) */
4
+ /** For `PickupVariant.COIN` (20). */
5
5
  export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin;
6
- /** For `PickupVariant.KEY` (30) */
6
+ /** For `PickupVariant.KEY` (30). */
7
7
  export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
8
- /** For `PickupVariant.BOMB` (40) */
8
+ /** For `PickupVariant.BOMB` (40). */
9
9
  export declare function isBombPickup(pickup: EntityPickup): pickup is EntityPickupBomb;
10
- /** For `PickupVariant.POOP` (42) */
10
+ /** For `PickupVariant.POOP` (42). */
11
11
  export declare function isPoopPickup(pickup: EntityPickup): pickup is EntityPickupPoop;
12
- /** For `PickupVariant.SACK` (69) */
12
+ /** For `PickupVariant.SACK` (69). */
13
13
  export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
14
- /** For `PickupVariant.PILL` (70) */
14
+ /** For `PickupVariant.PILL` (70). */
15
15
  export declare function isPill(pickup: EntityPickup): pickup is EntityPickupPill;
16
- /** For `PickupVariant.LIL_BATTERY` (90) */
16
+ /** For `PickupVariant.LIL_BATTERY` (90). */
17
17
  export declare function isBattery(pickup: EntityPickup): pickup is EntityPickupBattery;
18
- /** For `PickupVariant.COLLECTIBLE` (100) */
18
+ /** For `PickupVariant.COLLECTIBLE` (100). */
19
19
  export declare function isCollectible(pickup: EntityPickup): pickup is EntityPickupCollectible;
20
- /** For `PickupVariant.TAROT_CARD` (300) */
20
+ /** For `PickupVariant.TAROT_CARD` (300). */
21
21
  export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard;
22
- /** For `PickupVariant.TRINKET` (350) */
22
+ /** For `PickupVariant.TRINKET` (350). */
23
23
  export declare function isTrinket(pickup: EntityPickup): pickup is EntityPickupTrinket;
24
24
  //# sourceMappingURL=pickupVariants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pickupVariants.d.ts","sourceRoot":"","sources":["../../src/functions/pickupVariants.ts"],"names":[],"mappings":";AAIA,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEzE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,eAAe,CAErE;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E;AAED,4CAA4C;AAC5C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MAAM,IAAI,gBAAgB,CAE7E;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E"}
@@ -1,47 +1,47 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
3
  local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
4
- --- For `PickupVariant.HEART` (10)
4
+ --- For `PickupVariant.HEART` (10).
5
5
  function ____exports.isHeart(self, pickup)
6
6
  return pickup.Variant == PickupVariant.HEART
7
7
  end
8
- --- For `PickupVariant.COIN` (20)
8
+ --- For `PickupVariant.COIN` (20).
9
9
  function ____exports.isCoin(self, pickup)
10
10
  return pickup.Variant == PickupVariant.COIN
11
11
  end
12
- --- For `PickupVariant.KEY` (30)
12
+ --- For `PickupVariant.KEY` (30).
13
13
  function ____exports.isKey(self, pickup)
14
14
  return pickup.Variant == PickupVariant.KEY
15
15
  end
16
- --- For `PickupVariant.BOMB` (40)
16
+ --- For `PickupVariant.BOMB` (40).
17
17
  function ____exports.isBombPickup(self, pickup)
18
18
  return pickup.Variant == PickupVariant.BOMB
19
19
  end
20
- --- For `PickupVariant.POOP` (42)
20
+ --- For `PickupVariant.POOP` (42).
21
21
  function ____exports.isPoopPickup(self, pickup)
22
22
  return pickup.Variant == PickupVariant.POOP
23
23
  end
24
- --- For `PickupVariant.SACK` (69)
24
+ --- For `PickupVariant.SACK` (69).
25
25
  function ____exports.isSack(self, pickup)
26
26
  return pickup.Variant == PickupVariant.SACK
27
27
  end
28
- --- For `PickupVariant.PILL` (70)
28
+ --- For `PickupVariant.PILL` (70).
29
29
  function ____exports.isPill(self, pickup)
30
30
  return pickup.Variant == PickupVariant.PILL
31
31
  end
32
- --- For `PickupVariant.LIL_BATTERY` (90)
32
+ --- For `PickupVariant.LIL_BATTERY` (90).
33
33
  function ____exports.isBattery(self, pickup)
34
34
  return pickup.Variant == PickupVariant.LIL_BATTERY
35
35
  end
36
- --- For `PickupVariant.COLLECTIBLE` (100)
36
+ --- For `PickupVariant.COLLECTIBLE` (100).
37
37
  function ____exports.isCollectible(self, pickup)
38
38
  return pickup.Variant == PickupVariant.COLLECTIBLE
39
39
  end
40
- --- For `PickupVariant.TAROT_CARD` (300)
40
+ --- For `PickupVariant.TAROT_CARD` (300).
41
41
  function ____exports.isCardPickup(self, pickup)
42
42
  return pickup.Variant == PickupVariant.TAROT_CARD
43
43
  end
44
- --- For `PickupVariant.TRINKET` (350)
44
+ --- For `PickupVariant.TRINKET` (350).
45
45
  function ____exports.isTrinket(self, pickup)
46
46
  return pickup.Variant == PickupVariant.TRINKET
47
47
  end
@@ -6,7 +6,11 @@ import { CoinSubType } from "isaac-typescript-definitions";
6
6
  export declare function getCoinValue(coinSubType: CoinSubType): int;
7
7
  /** Helper function to get all of the red heart pickup entities in the room. */
8
8
  export declare function getRedHearts(): EntityPickupHeart[];
9
+ /** Helper function to test if the provided pickup matches one of the various chest variants. */
9
10
  export declare function isChest(pickup: EntityPickup): boolean;
11
+ /**
12
+ * Helper function to test if the provided pickup matches one of the various red heart sub types.
13
+ */
10
14
  export declare function isRedHeart(pickup: EntityPickup): boolean;
11
15
  /**
12
16
  * Helper function to remove all of the red heart pickup entities in the room.
@@ -1 +1 @@
1
- {"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAW3D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAK1D;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,IAAI,iBAAiB,EAAE,CAGlD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAErD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,iBAAiB,EAAE,CAGjE"}
1
+ {"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAW3D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAK1D;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,IAAI,iBAAiB,EAAE,CAGlD;AAED,gGAAgG;AAChG,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,iBAAiB,EAAE,CAGjE"}
@@ -28,9 +28,11 @@ function ____exports.getRedHearts(self)
28
28
  function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
29
29
  )
30
30
  end
31
+ --- Helper function to test if the provided pickup matches one of the various chest variants.
31
32
  function ____exports.isChest(self, pickup)
32
33
  return CHEST_PICKUP_VARIANTS:has(pickup.Variant)
33
34
  end
35
+ --- Helper function to test if the provided pickup matches one of the various red heart sub types.
34
36
  function ____exports.isRedHeart(self, pickup)
35
37
  return isHeart(nil, pickup) and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
36
38
  end
package/dist/index.d.ts CHANGED
@@ -1748,7 +1748,7 @@ export declare function deserializeRNG(rng: SerializedRNG): RNG;
1748
1748
  */
1749
1749
  export declare function deserializeVector(vector: SerializedVector): Vector;
1750
1750
 
1751
- /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76) */
1751
+ /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76). */
1752
1752
  export declare const DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75;
1753
1753
 
1754
1754
  export declare function directionToDegrees(direction: Direction): int;
@@ -4969,6 +4969,15 @@ export declare function getTears(tearVariant?: TearVariant, subType?: number): E
4969
4969
  */
4970
4970
  export declare function getTearsStat(fireDelay: float): float;
4971
4971
 
4972
+ /**
4973
+ * Helper function to get all of the grid entities of type `GridEntityType.TELEPORTER` (23) in the
4974
+ * room.
4975
+ *
4976
+ * @param variant Optional. If specified, will only get the teleporters that match the variant.
4977
+ * Default is -1, which matches every variant.
4978
+ */
4979
+ export declare function getTeleporters(variant?: number): GridEntity[];
4980
+
4972
4981
  /** Helper function to get all of the `GridEntityTNT` in the room. */
4973
4982
  export declare function getTNT(variant?: number): GridEntityTNT[];
4974
4983
 
@@ -5559,7 +5568,7 @@ export declare function isArrayContiguous(array: int[]): boolean;
5559
5568
  /** Checks if an array is in the provided 2-dimensional array. */
5560
5569
  export declare function isArrayInArray<T>(arrayToMatch: T[] | readonly T[], parentArray: Array<T[] | readonly T[]>): boolean;
5561
5570
 
5562
- /** For `PickupVariant.LIL_BATTERY` (90) */
5571
+ /** For `PickupVariant.LIL_BATTERY` (90). */
5563
5572
  export declare function isBattery(pickup: EntityPickup): pickup is EntityPickupBattery;
5564
5573
 
5565
5574
  /**
@@ -5578,7 +5587,7 @@ export declare function isBlindCollectible(collectible: EntityPickup): boolean;
5578
5587
  /** Helper function to detect if a variable is of type `EntityBomb`. */
5579
5588
  export declare function isBomb(variable: unknown): variable is EntityBomb;
5580
5589
 
5581
- /** For `PickupVariant.BOMB` (40) */
5590
+ /** For `PickupVariant.BOMB` (40). */
5582
5591
  export declare function isBombPickup(pickup: EntityPickup): pickup is EntityPickupBomb;
5583
5592
 
5584
5593
  export declare function isBoolean(variable: unknown): variable is boolean;
@@ -5592,7 +5601,7 @@ export declare function isBoolean(variable: unknown): variable is boolean;
5592
5601
  */
5593
5602
  export declare function isCard(cardType: CardType): boolean;
5594
5603
 
5595
- /** For `PickupVariant.TAROT_CARD` (300) */
5604
+ /** For `PickupVariant.TAROT_CARD` (300). */
5596
5605
  export declare function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard;
5597
5606
 
5598
5607
  /** Returns whether or not the given card type matches the specified item config card type. */
@@ -5606,6 +5615,7 @@ export declare function isCardType(cardType: CardType, itemConfigCardType: ItemC
5606
5615
  */
5607
5616
  export declare function isCharacter(player: EntityPlayer, ...characters: PlayerType[]): boolean;
5608
5617
 
5618
+ /** Helper function to test if the provided pickup matches one of the various chest variants. */
5609
5619
  export declare function isChest(pickup: EntityPickup): boolean;
5610
5620
 
5611
5621
  /**
@@ -5622,10 +5632,10 @@ export declare function isCircleIntersectingRectangle(circleCenter: Vector, circ
5622
5632
  /** Helper function to see if a player is close enough to activate a Dice Room floor. */
5623
5633
  export declare function isCloseEnoughToTriggerDiceFloor(player: EntityPlayer, diceFloor: EntityEffect): boolean;
5624
5634
 
5625
- /** For `PickupVariant.COIN` (20) */
5635
+ /** For `PickupVariant.COIN` (20). */
5626
5636
  export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin;
5627
5637
 
5628
- /** For `PickupVariant.COLLECTIBLE` (100) */
5638
+ /** For `PickupVariant.COLLECTIBLE` (100). */
5629
5639
  export declare function isCollectible(pickup: EntityPickup): pickup is EntityPickupCollectible;
5630
5640
 
5631
5641
  /**
@@ -5840,7 +5850,7 @@ export declare function isGridEntityBreakableByExplosion(gridEntity: GridEntity)
5840
5850
  */
5841
5851
  export declare function isGridEntityBroken(gridEntity: GridEntity): boolean;
5842
5852
 
5843
- /** For `PickupVariant.HEART` (10) */
5853
+ /** For `PickupVariant.HEART` (10). */
5844
5854
  export declare function isHeart(pickup: EntityPickup): pickup is EntityPickupHeart;
5845
5855
 
5846
5856
  /**
@@ -5884,7 +5894,7 @@ export declare function isKColor(object: unknown): object is KColor;
5884
5894
  */
5885
5895
  export declare function isKeeper(player: EntityPlayer): boolean;
5886
5896
 
5887
- /** For `PickupVariant.KEY` (30) */
5897
+ /** For `PickupVariant.KEY` (30). */
5888
5898
  export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
5889
5899
 
5890
5900
  /**
@@ -5983,7 +5993,7 @@ export declare function isPickingUpItemTrinket(pickingUpItem: PickingUpItem): pi
5983
5993
  /** Helper function to detect if a variable is of type `EntityPickup`. */
5984
5994
  export declare function isPickup(variable: unknown): variable is EntityPickup;
5985
5995
 
5986
- /** For `PickupVariant.PILL` (70) */
5996
+ /** For `PickupVariant.PILL` (70). */
5987
5997
  export declare function isPill(pickup: EntityPickup): pickup is EntityPickupPill;
5988
5998
 
5989
5999
  /** Helper function to detect if a variable is of type `GridEntityPit`. */
@@ -6004,7 +6014,7 @@ export declare function isPocketItemObject(cardType: CardType): boolean;
6004
6014
  /** Helper function to detect if a variable is of type `GridEntityPoop`. */
6005
6015
  export declare function isPoop(variable: unknown): variable is GridEntityPoop;
6006
6016
 
6007
- /** For `PickupVariant.POOP` (42) */
6017
+ /** For `PickupVariant.POOP` (42). */
6008
6018
  export declare function isPoopPickup(pickup: EntityPickup): pickup is EntityPickupPoop;
6009
6019
 
6010
6020
  /**
@@ -6032,6 +6042,9 @@ export declare function isQuestCollectible(collectibleType: CollectibleType): bo
6032
6042
  */
6033
6043
  export declare function isRaglingDeathPatch(npc: EntityNPC): boolean;
6034
6044
 
6045
+ /**
6046
+ * Helper function to test if the provided pickup matches one of the various red heart sub types.
6047
+ */
6035
6048
  export declare function isRedHeart(pickup: EntityPickup): boolean;
6036
6049
 
6037
6050
  /**
@@ -6089,7 +6102,7 @@ export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
6089
6102
  /** Returns true for cards that have `CardType.RUNE`. */
6090
6103
  export declare function isRune(cardType: CardType): boolean;
6091
6104
 
6092
- /** For `PickupVariant.SACK` (69) */
6105
+ /** For `PickupVariant.SACK` (69). */
6093
6106
  export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
6094
6107
 
6095
6108
  /**
@@ -6160,7 +6173,7 @@ export declare function isSin(npc: EntityNPC): boolean;
6160
6173
  */
6161
6174
  export declare function isSingleUseCollectible(collectibleType: CollectibleType): boolean;
6162
6175
 
6163
- /** For `EntityType.SLOT` (6) */
6176
+ /** For `EntityType.SLOT` (6). */
6164
6177
  export declare function isSlot(entity: Entity): entity is EntitySlot;
6165
6178
 
6166
6179
  /** Returns true for cards that have `CardType.SPECIAL`. */
@@ -6200,7 +6213,7 @@ export declare function isTNT(variable: unknown): variable is GridEntityTNT;
6200
6213
 
6201
6214
  export declare function isTransformationFlying(playerForm: PlayerForm): boolean;
6202
6215
 
6203
- /** For `PickupVariant.TRINKET` (350) */
6216
+ /** For `PickupVariant.TRINKET` (350). */
6204
6217
  export declare function isTrinket(pickup: EntityPickup): pickup is EntityPickupTrinket;
6205
6218
 
6206
6219
  /**
@@ -9464,6 +9477,19 @@ export declare function removeAllSpikes(variant?: number, updateRoom?: boolean,
9464
9477
  */
9465
9478
  export declare function removeAllTears(tearVariant?: TearVariant, subType?: number, cap?: int): EntityTear[];
9466
9479
 
9480
+ /**
9481
+ * Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
9482
+ *
9483
+ * @param variant Optional. If specified, will only remove the teleporters that match this variant.
9484
+ * Default is -1, which matches every variant.
9485
+ * @param updateRoom Optional. Whether or not to update the room after the teleporters are removed.
9486
+ * Default is false. For more information, see the description of the
9487
+ * `removeGridEntities` helper function.
9488
+ * @param cap Optional. If specified, will only remove the given amount of teleporters.
9489
+ * @returns The teleporters that were removed.
9490
+ */
9491
+ export declare function removeAllTeleporters(variant?: number, updateRoom?: boolean, cap?: int): GridEntity[];
9492
+
9467
9493
  /**
9468
9494
  * Helper function to remove all of the `GridEntityTNT` in the room.
9469
9495
  *
@@ -11171,6 +11197,12 @@ export declare function spawnTear(tearVariant: TearVariant, subType: int, positi
11171
11197
  /** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
11172
11198
  export declare function spawnTearWithSeed(tearVariant: TearVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityTear;
11173
11199
 
11200
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23). */
11201
+ export declare function spawnTeleporter(gridIndexOrPosition: int | Vector): GridEntity | undefined;
11202
+
11203
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23) with a specific variant. */
11204
+ export declare function spawnTeleporterWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntity | undefined;
11205
+
11174
11206
  /** Helper function to spawn a `GridEntityType.TNT` (12). */
11175
11207
  export declare function spawnTNT(gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
11176
11208
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "9.4.0",
3
+ "version": "9.5.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "dist/index",
23
23
  "types": "dist/index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^4.0.0"
25
+ "isaac-typescript-definitions": "^4.0.2"
26
26
  }
27
27
  }
@@ -25,7 +25,7 @@ import {
25
25
  import { DEFAULT_BASE_STAGE } from "./exports";
26
26
  import v from "./v";
27
27
 
28
- /** For `GridEntityType.DECORATION` (1) */
28
+ /** For `GridEntityType.DECORATION` (1). */
29
29
  export function setCustomDecorationGraphics(
30
30
  customStage: CustomStage,
31
31
  gridEntity: GridEntity,
@@ -71,7 +71,7 @@ export function setCustomDecorationGraphics(
71
71
  }
72
72
  }
73
73
 
74
- /** For `GridEntityType.ROCK` (2) */
74
+ /** For `GridEntityType.ROCK` (2). */
75
75
  export function setCustomRockGraphics(
76
76
  customStage: CustomStage,
77
77
  gridEntity: GridEntity,
@@ -134,7 +134,7 @@ export function setCustomRockGraphics(
134
134
  }
135
135
  }
136
136
 
137
- /** For `GridEntityType.PIT` (7) */
137
+ /** For `GridEntityType.PIT` (7). */
138
138
  export function setCustomPitGraphics(
139
139
  customStage: CustomStage,
140
140
  gridEntity: GridEntity,
@@ -164,7 +164,7 @@ export function setCustomPitGraphics(
164
164
  }
165
165
  }
166
166
 
167
- /** For GridEntityType.DOOR (16) */
167
+ /** For `GridEntityType.DOOR` (16). */
168
168
  export function setCustomDoorGraphics(
169
169
  customStage: CustomStage,
170
170
  gridEntity: GridEntity,
@@ -1,6 +1,6 @@
1
1
  import { inRectangle } from "./math";
2
2
 
3
- /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76) */
3
+ /** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76). */
4
4
  export const DICE_FLOOR_TRIGGER_SQUARE_SIZE = 75;
5
5
 
6
6
  /** Helper function to see if a player is close enough to activate a Dice Room floor. */
@@ -1,6 +1,6 @@
1
1
  import { EntityType } from "isaac-typescript-definitions";
2
2
 
3
- /** For `EntityType.SLOT` (6) */
3
+ /** For `EntityType.SLOT` (6). */
4
4
  export function isSlot(entity: Entity): entity is EntitySlot {
5
5
  return entity.Type === EntityType.SLOT;
6
6
  }
@@ -173,6 +173,21 @@ export function getTNT(variant = -1): GridEntityTNT[] {
173
173
  return tntArray;
174
174
  }
175
175
 
176
+ /**
177
+ * Helper function to get all of the grid entities of type `GridEntityType.TELEPORTER` (23) in the
178
+ * room.
179
+ *
180
+ * @param variant Optional. If specified, will only get the teleporters that match the variant.
181
+ * Default is -1, which matches every variant.
182
+ */
183
+ export function getTeleporters(variant = -1): GridEntity[] {
184
+ if (variant === -1) {
185
+ return getGridEntities(GridEntityType.TELEPORTER);
186
+ }
187
+
188
+ return getMatchingGridEntities(GridEntityType.TELEPORTER, variant);
189
+ }
190
+
176
191
  /**
177
192
  * Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` (17) in the
178
193
  * room. Specify a specific trapdoor variant to select only trapdoors of that variant.
@@ -333,6 +348,26 @@ export function removeAllTNT(
333
348
  return removeGridEntities(tnt, updateRoom, cap);
334
349
  }
335
350
 
351
+ /**
352
+ * Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
353
+ *
354
+ * @param variant Optional. If specified, will only remove the teleporters that match this variant.
355
+ * Default is -1, which matches every variant.
356
+ * @param updateRoom Optional. Whether or not to update the room after the teleporters are removed.
357
+ * Default is false. For more information, see the description of the
358
+ * `removeGridEntities` helper function.
359
+ * @param cap Optional. If specified, will only remove the given amount of teleporters.
360
+ * @returns The teleporters that were removed.
361
+ */
362
+ export function removeAllTeleporters(
363
+ variant = -1,
364
+ updateRoom = false,
365
+ cap?: int,
366
+ ): GridEntity[] {
367
+ const teleporters = getTeleporters(variant);
368
+ return removeGridEntities(teleporters, updateRoom, cap);
369
+ }
370
+
336
371
  /**
337
372
  * Helper function to remove all of the `GridEntityType.TRAPDOOR` (17) in the room.
338
373
  *
@@ -584,6 +619,25 @@ export function spawnTNTWithVariant(
584
619
  return tnt;
585
620
  }
586
621
 
622
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23). */
623
+ export function spawnTeleporter(
624
+ gridIndexOrPosition: int | Vector,
625
+ ): GridEntity | undefined {
626
+ return spawnTeleporterWithVariant(0, gridIndexOrPosition);
627
+ }
628
+
629
+ /** Helper function to spawn a `GridEntityType.TELEPORTER` (23) with a specific variant. */
630
+ export function spawnTeleporterWithVariant(
631
+ variant: int,
632
+ gridIndexOrPosition: int | Vector,
633
+ ): GridEntity | undefined {
634
+ return spawnGridEntityWithVariant(
635
+ GridEntityType.TELEPORTER,
636
+ variant,
637
+ gridIndexOrPosition,
638
+ );
639
+ }
640
+
587
641
  /** Helper function to spawn a `GridEntityType.TRAPDOOR` (17). */
588
642
  export function spawnTrapdoor(
589
643
  gridIndexOrPosition: int | Vector,
@@ -2,59 +2,59 @@
2
2
 
3
3
  import { PickupVariant } from "isaac-typescript-definitions";
4
4
 
5
- /** For `PickupVariant.HEART` (10) */
5
+ /** For `PickupVariant.HEART` (10). */
6
6
  export function isHeart(pickup: EntityPickup): pickup is EntityPickupHeart {
7
7
  return pickup.Variant === PickupVariant.HEART;
8
8
  }
9
9
 
10
- /** For `PickupVariant.COIN` (20) */
10
+ /** For `PickupVariant.COIN` (20). */
11
11
  export function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin {
12
12
  return pickup.Variant === PickupVariant.COIN;
13
13
  }
14
14
 
15
- /** For `PickupVariant.KEY` (30) */
15
+ /** For `PickupVariant.KEY` (30). */
16
16
  export function isKey(pickup: EntityPickup): pickup is EntityPickupKey {
17
17
  return pickup.Variant === PickupVariant.KEY;
18
18
  }
19
19
 
20
- /** For `PickupVariant.BOMB` (40) */
20
+ /** For `PickupVariant.BOMB` (40). */
21
21
  export function isBombPickup(pickup: EntityPickup): pickup is EntityPickupBomb {
22
22
  return pickup.Variant === PickupVariant.BOMB;
23
23
  }
24
24
 
25
- /** For `PickupVariant.POOP` (42) */
25
+ /** For `PickupVariant.POOP` (42). */
26
26
  export function isPoopPickup(pickup: EntityPickup): pickup is EntityPickupPoop {
27
27
  return pickup.Variant === PickupVariant.POOP;
28
28
  }
29
29
 
30
- /** For `PickupVariant.SACK` (69) */
30
+ /** For `PickupVariant.SACK` (69). */
31
31
  export function isSack(pickup: EntityPickup): pickup is EntityPickupSack {
32
32
  return pickup.Variant === PickupVariant.SACK;
33
33
  }
34
34
 
35
- /** For `PickupVariant.PILL` (70) */
35
+ /** For `PickupVariant.PILL` (70). */
36
36
  export function isPill(pickup: EntityPickup): pickup is EntityPickupPill {
37
37
  return pickup.Variant === PickupVariant.PILL;
38
38
  }
39
39
 
40
- /** For `PickupVariant.LIL_BATTERY` (90) */
40
+ /** For `PickupVariant.LIL_BATTERY` (90). */
41
41
  export function isBattery(pickup: EntityPickup): pickup is EntityPickupBattery {
42
42
  return pickup.Variant === PickupVariant.LIL_BATTERY;
43
43
  }
44
44
 
45
- /** For `PickupVariant.COLLECTIBLE` (100) */
45
+ /** For `PickupVariant.COLLECTIBLE` (100). */
46
46
  export function isCollectible(
47
47
  pickup: EntityPickup,
48
48
  ): pickup is EntityPickupCollectible {
49
49
  return pickup.Variant === PickupVariant.COLLECTIBLE;
50
50
  }
51
51
 
52
- /** For `PickupVariant.TAROT_CARD` (300) */
52
+ /** For `PickupVariant.TAROT_CARD` (300). */
53
53
  export function isCardPickup(pickup: EntityPickup): pickup is EntityPickupCard {
54
54
  return pickup.Variant === PickupVariant.TAROT_CARD;
55
55
  }
56
56
 
57
- /** For `PickupVariant.TRINKET` (350) */
57
+ /** For `PickupVariant.TRINKET` (350). */
58
58
  export function isTrinket(pickup: EntityPickup): pickup is EntityPickupTrinket {
59
59
  return pickup.Variant === PickupVariant.TRINKET;
60
60
  }
@@ -26,10 +26,14 @@ export function getRedHearts(): EntityPickupHeart[] {
26
26
  return hearts.filter((heart) => RED_HEART_SUB_TYPES_SET.has(heart.SubType));
27
27
  }
28
28
 
29
+ /** Helper function to test if the provided pickup matches one of the various chest variants. */
29
30
  export function isChest(pickup: EntityPickup): boolean {
30
31
  return CHEST_PICKUP_VARIANTS.has(pickup.Variant);
31
32
  }
32
33
 
34
+ /**
35
+ * Helper function to test if the provided pickup matches one of the various red heart sub types.
36
+ */
33
37
  export function isRedHeart(pickup: EntityPickup): boolean {
34
38
  return isHeart(pickup) && RED_HEART_SUB_TYPES_SET.has(pickup.SubType);
35
39
  }