isaacscript-common 30.5.1 → 30.5.3

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 (90) hide show
  1. package/dist/index.rollup.d.ts +59 -58
  2. package/dist/isaacscript-common.lua +7282 -7270
  3. package/dist/src/arrays/cachedEnumValues.d.ts +1 -1
  4. package/dist/src/arrays/cachedEnumValues.d.ts.map +1 -1
  5. package/dist/src/arrays/cachedEnumValues.lua +2 -2
  6. package/dist/src/callbackClasses.d.ts +6 -6
  7. package/dist/src/callbackClasses.d.ts.map +1 -1
  8. package/dist/src/callbackClasses.lua +30 -30
  9. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +2 -0
  10. package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -1
  11. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +2 -0
  12. package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -1
  13. package/dist/src/classes/callbacks/PostPurchase.d.ts +2 -0
  14. package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -1
  15. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts +1 -1
  16. package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.d.ts.map +1 -1
  17. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts +1 -1
  18. package/dist/src/classes/features/callbackLogic/ItemPickupDetection.d.ts.map +1 -1
  19. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts +1 -1
  20. package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.d.ts.map +1 -1
  21. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts +1 -1
  22. package/dist/src/classes/features/callbackLogic/SlotRenderDetection.d.ts.map +1 -1
  23. package/dist/src/classes/features/other/ModdedElementSets.lua +2 -2
  24. package/dist/src/classes/features/other/PreventCollectibleRotation.lua +2 -2
  25. package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +2 -2
  26. package/dist/src/functions/array.lua +2 -5
  27. package/dist/src/functions/bosses.d.ts +1 -1
  28. package/dist/src/functions/bosses.d.ts.map +1 -1
  29. package/dist/src/functions/collectibles.d.ts.map +1 -1
  30. package/dist/src/functions/collectibles.lua +3 -0
  31. package/dist/src/functions/decorators.d.ts.map +1 -1
  32. package/dist/src/functions/emptyRoom.lua +2 -2
  33. package/dist/src/functions/entities.d.ts +5 -4
  34. package/dist/src/functions/entities.d.ts.map +1 -1
  35. package/dist/src/functions/entities.lua +17 -4
  36. package/dist/src/functions/entitiesSpecific.d.ts +20 -20
  37. package/dist/src/functions/entitiesSpecific.d.ts.map +1 -1
  38. package/dist/src/functions/gridEntitiesSpecific.d.ts +10 -10
  39. package/dist/src/functions/gridEntitiesSpecific.d.ts.map +1 -1
  40. package/dist/src/functions/levelGrid.lua +2 -2
  41. package/dist/src/functions/npcs.d.ts +1 -1
  42. package/dist/src/functions/npcs.d.ts.map +1 -1
  43. package/dist/src/functions/pickups.lua +2 -2
  44. package/dist/src/functions/pickupsSpecific.d.ts +13 -13
  45. package/dist/src/functions/pickupsSpecific.d.ts.map +1 -1
  46. package/dist/src/functions/pills.lua +2 -2
  47. package/dist/src/functions/roomData.d.ts +8 -8
  48. package/dist/src/functions/roomData.d.ts.map +1 -1
  49. package/dist/src/functions/roomData.lua +6 -6
  50. package/dist/src/functions/roomShapeWalls.lua +3 -3
  51. package/dist/src/functions/serialization.d.ts.map +1 -1
  52. package/dist/src/functions/spawnCollectible.lua +2 -2
  53. package/dist/src/functions/vector.lua +1 -1
  54. package/dist/src/index.d.ts +5 -5
  55. package/dist/src/index.d.ts.map +1 -1
  56. package/dist/src/index.lua +11 -11
  57. package/dist/src/interfaces/RoomDescription.d.ts +1 -1
  58. package/dist/src/interfaces/RoomDescription.d.ts.map +1 -1
  59. package/package.json +2 -2
  60. package/src/arrays/cachedEnumValues.ts +1 -1
  61. package/src/callbackClasses.ts +6 -6
  62. package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +1 -1
  63. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +2 -2
  64. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +1 -1
  65. package/src/classes/features/callbackLogic/SlotRenderDetection.ts +1 -1
  66. package/src/classes/features/other/CustomStages.ts +4 -4
  67. package/src/classes/features/other/CustomTrapdoors.ts +1 -1
  68. package/src/classes/features/other/ModdedElementSets.ts +1 -1
  69. package/src/classes/features/other/PreventCollectibleRotation.ts +1 -1
  70. package/src/classes/features/other/extraConsoleCommands/commands.ts +1 -1
  71. package/src/functions/array.ts +5 -5
  72. package/src/functions/bosses.ts +1 -1
  73. package/src/functions/collectibles.ts +5 -1
  74. package/src/functions/decorators.ts +1 -1
  75. package/src/functions/emptyRoom.ts +1 -1
  76. package/src/functions/entities.ts +22 -7
  77. package/src/functions/entitiesSpecific.ts +20 -20
  78. package/src/functions/gridEntitiesSpecific.ts +10 -10
  79. package/src/functions/levelGrid.ts +1 -1
  80. package/src/functions/npcs.ts +1 -1
  81. package/src/functions/pickups.ts +1 -1
  82. package/src/functions/pickupsSpecific.ts +17 -13
  83. package/src/functions/pills.ts +1 -1
  84. package/src/functions/roomData.ts +8 -8
  85. package/src/functions/roomShapeWalls.ts +1 -1
  86. package/src/functions/serialization.ts +1 -1
  87. package/src/functions/spawnCollectible.ts +1 -1
  88. package/src/functions/vector.ts +1 -1
  89. package/src/index.ts +5 -5
  90. package/src/interfaces/RoomDescription.ts +1 -1
@@ -1717,9 +1717,10 @@ export declare enum CornerType {
1717
1717
  * @param entityType Optional. Default is -1, which matches every entity type.
1718
1718
  * @param variant Optional. Default is -1, which matches every variant.
1719
1719
  * @param subType Optional. Default is -1, which matches every sub-type.
1720
- * @param ignoreFriendly Optional. Default is false.
1720
+ * @param ignoreFriendly Optional. Default is false. Will throw a runtime error if set to true and
1721
+ * the `entityType` is equal to -1.
1721
1722
  */
1722
- export declare function countEntities(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): int;
1723
+ export declare function countEntities(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): int;
1723
1724
 
1724
1725
  /**
1725
1726
  * Helper function to count the number of bits that are set to 1 in a binary representation of a
@@ -3582,7 +3583,7 @@ export declare function doesAnyEntityExist(entityTypes: EntityType[] | readonly
3582
3583
  * @param subType Optional. Default is -1, which matches every sub-type.
3583
3584
  * @param ignoreFriendly Optional. Default is false.
3584
3585
  */
3585
- export declare function doesEntityExist(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): boolean;
3586
+ export declare function doesEntityExist(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): boolean;
3586
3587
 
3587
3588
  /**
3588
3589
  * Returns whether or not all of the player's soul-heart-type hearts are black hearts.
@@ -4354,7 +4355,7 @@ export declare function getAdjacentRoomGridIndexes(roomGridIndex?: int): readonl
4354
4355
  * is -1, which matches every sub-type.
4355
4356
  * @param ignoreFriendly Optional. Default is false.
4356
4357
  */
4357
- export declare function getAliveBosses(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
4358
+ export declare function getAliveBosses(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
4358
4359
 
4359
4360
  /**
4360
4361
  * Helper function to get all of the non-dead NPCs in the room.
@@ -4370,7 +4371,7 @@ export declare function getAliveBosses(entityType?: EntityType, variant?: number
4370
4371
  * -1, which matches every sub-type.
4371
4372
  * @param ignoreFriendly Optional. Default is false.
4372
4373
  */
4373
- export declare function getAliveNPCs(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
4374
+ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
4374
4375
 
4375
4376
  /**
4376
4377
  * Helper function to get the set of every boss in the game.
@@ -4474,7 +4475,7 @@ export declare function getAzazelBrimstoneDistance(playerOrTearHeight: EntityPla
4474
4475
  * @param batterySubType Optional. If specified, will only get the batteries that match the
4475
4476
  * sub-type. Default is -1, which matches every sub-type.
4476
4477
  */
4477
- export declare function getBatteries(batterySubType?: BatterySubType): EntityPickupBattery[];
4478
+ export declare function getBatteries(batterySubType?: BatterySubType | -1): EntityPickupBattery[];
4478
4479
 
4479
4480
  /**
4480
4481
  * Helper function to get the door that leads to the off-grid room that contains the hole to the
@@ -4491,7 +4492,7 @@ export declare function getBlueWombDoor(): GridEntityDoor | undefined;
4491
4492
  * @param bombSubType Optional. If specified, will only get the bombs that match the sub-type.
4492
4493
  * Default is -1, which matches every sub-type.
4493
4494
  */
4494
- export declare function getBombPickups(bombSubType?: BombSubType): EntityPickupBomb[];
4495
+ export declare function getBombPickups(bombSubType?: BombSubType | -1): EntityPickupBomb[];
4495
4496
 
4496
4497
  /** Helper function to find out how large a bomb explosion is based on the damage inflicted. */
4497
4498
  export declare function getBombRadiusFromDamage(damage: float): float;
@@ -4514,7 +4515,7 @@ export declare function getBombRadiusFromDamage(damage: float): float;
4514
4515
  * @param subType Optional. If specified, will only get the bombs that match the sub-type. Default
4515
4516
  * is -1, which matches every sub-type.
4516
4517
  */
4517
- export declare function getBombs(bombVariant?: BombVariant, subType?: number): EntityBomb[];
4518
+ export declare function getBombs(bombVariant?: BombVariant | -1, subType?: number): EntityBomb[];
4518
4519
 
4519
4520
  /**
4520
4521
  * Helper function to safely get boolean values from a Lua table. Will throw an error if the
@@ -4567,7 +4568,7 @@ export declare function getCardName(cardType: CardType): string;
4567
4568
  * @param cardType Optional. If specified, will only get the cards that match the sub-type. Default
4568
4569
  * is -1, which matches every sub-type.
4569
4570
  */
4570
- export declare function getCards(cardType?: CardType): EntityPickupCard[];
4571
+ export declare function getCards(cardType?: CardType | -1): EntityPickupCard[];
4571
4572
 
4572
4573
  /** Get the proper name for a `Challenge` enum. This will only work for vanilla challenges. */
4573
4574
  export declare function getChallengeName(challenge: Challenge): string;
@@ -4666,7 +4667,7 @@ export declare function getClosestVectorTo(referenceVector: Vector, vectors: Vec
4666
4667
  * @param coinSubType Optional. If specified, will only get the coins that match the sub-type.
4667
4668
  * Default is -1, which matches every sub-type.
4668
4669
  */
4669
- export declare function getCoins(coinSubType?: CoinSubType): EntityPickupCoin[];
4670
+ export declare function getCoins(coinSubType?: CoinSubType | -1): EntityPickupCoin[];
4670
4671
 
4671
4672
  /**
4672
4673
  * Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
@@ -4758,7 +4759,7 @@ export declare function getCollectibleQuality(collectibleOrCollectibleType: Enti
4758
4759
  * @param collectibleType Optional. If specified, will only get the collectibles that match the
4759
4760
  * sub-type. Default is -1, which matches every sub-type.
4760
4761
  */
4761
- export declare function getCollectibles(collectibleType?: CollectibleType): EntityPickupCollectible[];
4762
+ export declare function getCollectibles(collectibleType?: CollectibleType | -1): EntityPickupCollectible[];
4762
4763
 
4763
4764
  /**
4764
4765
  * Helper function to get the tags of a collectible (which is the composition of zero or more
@@ -4806,7 +4807,7 @@ export declare function getConstituentsFromGridEntityID(gridEntityID: GridEntity
4806
4807
  * @param crawlSpaceVariant Optional. If specified, will only get the crawl spaces that match the
4807
4808
  * variant. Default is -1, which matches every variant.
4808
4809
  */
4809
- export declare function getCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant): GridEntity[];
4810
+ export declare function getCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant | -1): GridEntity[];
4810
4811
 
4811
4812
  /**
4812
4813
  * Helper function to get the actual bit flag for modded curses.
@@ -4923,7 +4924,7 @@ export declare function getEffectiveStage(): LevelStage;
4923
4924
  * @param subType Optional. If specified, will only get the effects that match the sub-type. Default
4924
4925
  * is -1, which matches every sub-type.
4925
4926
  */
4926
- export declare function getEffects(effectVariant?: EffectVariant, subType?: number): EntityEffect[];
4927
+ export declare function getEffects(effectVariant?: EffectVariant | -1, subType?: number): EntityEffect[];
4927
4928
 
4928
4929
  /**
4929
4930
  * Helper function to get an array of temporary effects for a player. This is helpful so that you
@@ -4971,7 +4972,7 @@ export declare function getEnglishLevelName(stage?: LevelStage, stageType?: Stag
4971
4972
  * returned. Default is false. Will only be taken into account if the
4972
4973
  * `entityType` is specified.
4973
4974
  */
4974
- export declare function getEntities(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
4975
+ export declare function getEntities(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
4975
4976
 
4976
4977
  /**
4977
4978
  * Helper function to get all the fields on an entity. For example, this is useful for comparing it
@@ -5100,7 +5101,7 @@ export declare function getFalsePHDPillEffect(pillEffect: PillEffect): PillEffec
5100
5101
  * @param subType Optional. If specified, will only get the familiars that match the sub-type.
5101
5102
  * Default is -1, which matches every sub-type.
5102
5103
  */
5103
- export declare function getFamiliars(familiarVariant?: FamiliarVariant, subType?: number): EntityFamiliar[];
5104
+ export declare function getFamiliars(familiarVariant?: FamiliarVariant | -1, subType?: number): EntityFamiliar[];
5104
5105
 
5105
5106
  /**
5106
5107
  * Helper function to compare two different arrays of entities. Returns the entities that are in the
@@ -5265,7 +5266,7 @@ export declare function getHeartRowLength(player: EntityPlayer): int;
5265
5266
  * @param heartSubType Optional. If specified, will only get the hearts that match the sub-type.
5266
5267
  * Default is -1, which matches every sub-type.
5267
5268
  */
5268
- export declare function getHearts(heartSubType?: HeartSubType): EntityPickupHeart[];
5269
+ export declare function getHearts(heartSubType?: HeartSubType | -1): EntityPickupHeart[];
5269
5270
 
5270
5271
  /**
5271
5272
  * Helper function to get the width of the first player's hearts on the UI. This is useful for
@@ -5366,7 +5367,7 @@ export declare function getKBitOfN(k: int, n: int): int;
5366
5367
  * @param keySubType Optional. If specified, will only get the keys that match the sub-type. Default
5367
5368
  * is -1, which matches every sub-type.
5368
5369
  */
5369
- export declare function getKeys(keySubType?: KeySubType): EntityPickupKey[];
5370
+ export declare function getKeys(keySubType?: KeySubType | -1): EntityPickupKey[];
5370
5371
 
5371
5372
  /**
5372
5373
  * Helper function to get all of the knives in the room.
@@ -5385,7 +5386,7 @@ export declare function getKeys(keySubType?: KeySubType): EntityPickupKey[];
5385
5386
  * @param subType Optional. If specified, will only get the knives that match the sub-type. Default
5386
5387
  * is -1, which matches every sub-type.
5387
5388
  */
5388
- export declare function getKnives(knifeVariant?: KnifeVariant, subType?: number): EntityKnife[];
5389
+ export declare function getKnives(knifeVariant?: KnifeVariant | -1, subType?: number): EntityKnife[];
5389
5390
 
5390
5391
  /**
5391
5392
  * Helper function to convert the language abbreviation from `Options.Language` to the "full"
@@ -5413,7 +5414,7 @@ export declare function getLanguageName(): string;
5413
5414
  * @param subType Optional. If specified, will only get the lasers that match the sub-type. Default
5414
5415
  * is -1, which matches every sub-type.
5415
5416
  */
5416
- export declare function getLasers(laserVariant?: LaserVariant, subType?: number): EntityLaser[];
5417
+ export declare function getLasers(laserVariant?: LaserVariant | -1, subType?: number): EntityLaser[];
5417
5418
 
5418
5419
  /**
5419
5420
  * Helper function to return the last element of an array.
@@ -5601,7 +5602,7 @@ export declare function getNormalPillColors(): PillColor[];
5601
5602
  * returned. Default is false. Will only be taken into account if the
5602
5603
  * `entityType` is specified.
5603
5604
  */
5604
- export declare function getNPCs(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
5605
+ export declare function getNPCs(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
5605
5606
 
5606
5607
  /**
5607
5608
  * Helper function to safely get number values from specific keys on a Lua table. Will throw an
@@ -5697,7 +5698,7 @@ export declare function getPHDPillEffect(pillEffect: PillEffect): PillEffect;
5697
5698
  * @param subType Optional. If specified, will only get the pickups that match the sub-type. Default
5698
5699
  * is -1, which matches every sub-type.
5699
5700
  */
5700
- export declare function getPickups(pickupVariant?: PickupVariant, subType?: number): EntityPickup[];
5701
+ export declare function getPickups(pickupVariant?: PickupVariant | -1, subType?: number): EntityPickup[];
5701
5702
 
5702
5703
  /**
5703
5704
  * Helper function to get a pill effect class from a PillEffect enum value. In this context, the
@@ -5734,7 +5735,7 @@ export declare function getPillEffectType(pillEffect: PillEffect): ItemConfigPil
5734
5735
  * @param pillColor Optional. If specified, will only get the pills that match the sub-type. Default
5735
5736
  * is -1, which matches every sub-type.
5736
5737
  */
5737
- export declare function getPills(pillColor?: PillColor): EntityPickupPill[];
5738
+ export declare function getPills(pillColor?: PillColor | -1): EntityPickupPill[];
5738
5739
 
5739
5740
  /**
5740
5741
  * Helper function to get all of the `GridEntityPit` in the room.
@@ -5742,7 +5743,7 @@ export declare function getPills(pillColor?: PillColor): EntityPickupPill[];
5742
5743
  * @param pitVariant Optional. If specified, will only get the pits that match the variant. Default
5743
5744
  * is -1, which matches every variant.
5744
5745
  */
5745
- export declare function getPits(pitVariant?: PitVariant): GridEntityPit[];
5746
+ export declare function getPits(pitVariant?: PitVariant | -1): GridEntityPit[];
5746
5747
 
5747
5748
  /**
5748
5749
  * Returns the number of slots that the player has remaining for new heart containers, accounting
@@ -5985,7 +5986,7 @@ export declare function getPocketItems(player: EntityPlayer): PocketItemDescript
5985
5986
  * @param poopVariant Optional. If specified, will only get the poops that match the variant.
5986
5987
  * Default is -1, which matches every variant.
5987
5988
  */
5988
- export declare function getPoops(poopVariant?: PoopGridEntityVariant): GridEntityPoop[];
5989
+ export declare function getPoops(poopVariant?: PoopGridEntityVariant | -1): GridEntityPoop[];
5989
5990
 
5990
5991
  /**
5991
5992
  * Helper function to get all of the `GridEntityPressurePlate` in the room.
@@ -5993,7 +5994,7 @@ export declare function getPoops(poopVariant?: PoopGridEntityVariant): GridEntit
5993
5994
  * @param pressurePlateVariant Optional. If specified, will only get the pressure plates that match
5994
5995
  * the variant. Default is -1, which matches every variant.
5995
5996
  */
5996
- export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVariant): GridEntityPressurePlate[];
5997
+ export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVariant | -1): GridEntityPressurePlate[];
5997
5998
 
5998
5999
  /**
5999
6000
  * Helper function to get all of the projectiles in the room.
@@ -6012,7 +6013,7 @@ export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVa
6012
6013
  * @param subType Optional. If specified, will only get the projectiles that match the sub-type.
6013
6014
  * Default is -1, which matches every sub-type.
6014
6015
  */
6015
- export declare function getProjectiles(projectileVariant?: ProjectileVariant, subType?: number): EntityProjectile[];
6016
+ export declare function getProjectiles(projectileVariant?: ProjectileVariant | -1, subType?: number): EntityProjectile[];
6016
6017
 
6017
6018
  /**
6018
6019
  * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
@@ -6420,7 +6421,7 @@ export declare function getRoomListIndex(roomGridIndex?: int): int;
6420
6421
  * Helper function to get the name of the room as it appears in the STB/XML data.
6421
6422
  *
6422
6423
  * @param roomGridIndex Optional. Default is the current room index.
6423
- * @returns The room name. Returns "Unknown" if the type was not found.
6424
+ * @returns The room name. Returns "Unknown" if the room data was not found.
6424
6425
  */
6425
6426
  export declare function getRoomName(roomGridIndex?: int): string;
6426
6427
 
@@ -6443,7 +6444,7 @@ export declare function getRooms(includeExtraDimensionalRooms?: boolean): RoomDe
6443
6444
  * Helper function to get the name of the room as it appears in the STB/XML data.
6444
6445
  *
6445
6446
  * @param roomGridIndex Optional. Default is the current room index.
6446
- * @returns The room name. Returns "Unknown" if the type was not found.
6447
+ * @returns The room name. Returns "Unknown"if the room data was not found.
6447
6448
  */
6448
6449
  export declare function getRoomShape(roomGridIndex?: int): RoomShape | undefined;
6449
6450
 
@@ -6589,9 +6590,9 @@ export declare function getRoomsOutsideGrid(): RoomDescriptor[];
6589
6590
  * would have a stage ID of 7.
6590
6591
  *
6591
6592
  * @param roomGridIndex Optional. Default is the current room index.
6592
- * @returns The room stage ID. Returns -1 if the stage ID was not found.
6593
+ * @returns The room stage ID. Returns -1 if the room data was not found.
6593
6594
  */
6594
- export declare function getRoomStageID(roomGridIndex?: int): StageID;
6595
+ export declare function getRoomStageID(roomGridIndex?: int): StageID | -1;
6595
6596
 
6596
6597
  /**
6597
6598
  * Helper function to get the sub-type for a room from the XML/STB data. The room sub-type will
@@ -6600,7 +6601,7 @@ export declare function getRoomStageID(roomGridIndex?: int): StageID;
6600
6601
  * Room and a sub-type of 1 will correspond to an Angel Room shop for The Stairway.
6601
6602
  *
6602
6603
  * @param roomGridIndex Optional. Default is the current room index.
6603
- * @returns The room sub-type. Returns -1 if the sub-type was not found.
6604
+ * @returns The room sub-type. Returns -1 if the room data was not found.
6604
6605
  */
6605
6606
  export declare function getRoomSubType(roomGridIndex?: int): int;
6606
6607
 
@@ -6608,9 +6609,9 @@ export declare function getRoomSubType(roomGridIndex?: int): int;
6608
6609
  * Helper function for getting the type of the room with the given grid index.
6609
6610
  *
6610
6611
  * @param roomGridIndex Optional. Default is the current room index.
6611
- * @returns The room data type. Returns -1 if the type was not found.
6612
+ * @returns The room data type. Returns -1 if the room data was not found.
6612
6613
  */
6613
- export declare function getRoomType(roomGridIndex?: int): RoomType;
6614
+ export declare function getRoomType(roomGridIndex?: int): RoomType | -1;
6614
6615
 
6615
6616
  /**
6616
6617
  * Helper function to get the proper name of a room type.
@@ -6625,7 +6626,7 @@ export declare function getRoomTypeName(roomType: RoomType): string;
6625
6626
  * command of `goto d.123` while on the Basement.
6626
6627
  *
6627
6628
  * @param roomGridIndex Optional. Default is the current room index.
6628
- * @returns The room variant. Returns -1 if the variant was not found.
6629
+ * @returns The room variant. Returns -1 if the room data was not found.
6629
6630
  */
6630
6631
  export declare function getRoomVariant(roomGridIndex?: int): int;
6631
6632
 
@@ -6645,7 +6646,7 @@ export declare function getRoomVisitedCount(roomGridIndex?: int): int;
6645
6646
  * @param sackSubType Optional. If specified, will only get the sacks that match the sub-type.
6646
6647
  * Default is -1, which matches every sub-type.
6647
6648
  */
6648
- export declare function getSacks(sackSubType?: SackSubType): EntityPickupSack[];
6649
+ export declare function getSacks(sackSubType?: SackSubType | -1): EntityPickupSack[];
6649
6650
 
6650
6651
  export declare function getScreenBottomCenterPos(): Readonly<Vector>;
6651
6652
 
@@ -6718,7 +6719,7 @@ export declare function getSirenHelper(familiar: EntityFamiliar): Entity | undef
6718
6719
  * @param subType Optional. If specified, will only get the slots that match the sub-type. Default
6719
6720
  * is -1, which matches every sub-type.
6720
6721
  */
6721
- export declare function getSlots(slotVariant?: SlotVariant, subType?: number): EntitySlot[];
6722
+ export declare function getSlots(slotVariant?: SlotVariant | -1, subType?: number): EntitySlot[];
6722
6723
 
6723
6724
  /**
6724
6725
  * Helper function to get a sorted array based on the contents of a set.
@@ -6798,7 +6799,7 @@ export declare function getTaintedMagdaleneNonTemporaryMaxHearts(player: EntityP
6798
6799
  * @param subType Optional. If specified, will only get the tears that match the sub-type. Default
6799
6800
  * is -1, which matches every sub-type.
6800
6801
  */
6801
- export declare function getTears(tearVariant?: TearVariant, subType?: number): EntityTear[];
6802
+ export declare function getTears(tearVariant?: TearVariant | -1, subType?: number): EntityTear[];
6802
6803
 
6803
6804
  /**
6804
6805
  * - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
@@ -6899,7 +6900,7 @@ export declare function getTransformationsForCollectibleType(collectibleType: Co
6899
6900
  * @param trapdoorVariant Optional. If specified, will only get the trapdoors that match the
6900
6901
  * variant. Default is -1, which matches every variant.
6901
6902
  */
6902
- export declare function getTrapdoors(trapdoorVariant?: TrapdoorVariant): GridEntity[];
6903
+ export declare function getTrapdoors(trapdoorVariant?: TrapdoorVariant | -1): GridEntity[];
6903
6904
 
6904
6905
  /**
6905
6906
  * Helper function to log what is happening in functions that recursively move through nested data
@@ -6941,7 +6942,7 @@ export declare function getTrinketName(trinketType: TrinketType): string;
6941
6942
  * @param trinketType Optional. If specified, will only get the trinkets that match the sub-type.
6942
6943
  * Default is -1, which matches every sub-type.
6943
6944
  */
6944
- export declare function getTrinkets(trinketType?: TrinketType): EntityPickupTrinket[];
6945
+ export declare function getTrinkets(trinketType?: TrinketType | -1): EntityPickupTrinket[];
6945
6946
 
6946
6947
  /**
6947
6948
  * Helper function to get the constructor from an instantiated TypeScriptToLua class, which is
@@ -13786,7 +13787,7 @@ export declare function removeAllActiveItems(player: EntityPlayer): void;
13786
13787
  * @param cap Optional. If specified, will only remove the given amount of cards.
13787
13788
  * @returns The batteries that were removed.
13788
13789
  */
13789
- export declare function removeAllBatteries(batterySubType?: BatterySubType, cap?: int): EntityPickupBattery[];
13790
+ export declare function removeAllBatteries(batterySubType?: BatterySubType | -1, cap?: int): EntityPickupBattery[];
13790
13791
 
13791
13792
  /**
13792
13793
  * Helper function to remove all of the bomb pickups in the room. (Specifically, this refers to bomb
@@ -13797,7 +13798,7 @@ export declare function removeAllBatteries(batterySubType?: BatterySubType, cap?
13797
13798
  * @param cap Optional. If specified, will only remove the given amount of bombs.
13798
13799
  * @returns The bombs that were removed.
13799
13800
  */
13800
- export declare function removeAllBombPickups(bombSubType?: BombSubType, cap?: int): EntityPickupBomb[];
13801
+ export declare function removeAllBombPickups(bombSubType?: BombSubType | -1, cap?: int): EntityPickupBomb[];
13801
13802
 
13802
13803
  /**
13803
13804
  * Helper function to remove all of the bombs in the room. (Specifically, this refers to the
@@ -13810,7 +13811,7 @@ export declare function removeAllBombPickups(bombSubType?: BombSubType, cap?: in
13810
13811
  * @param cap Optional. If specified, will only remove the given amount of bombs.
13811
13812
  * @returns An array of the bombs that were removed.
13812
13813
  */
13813
- export declare function removeAllBombs(bombVariant?: BombVariant, subType?: number, cap?: int): EntityBomb[];
13814
+ export declare function removeAllBombs(bombVariant?: BombVariant | -1, subType?: number, cap?: int): EntityBomb[];
13814
13815
 
13815
13816
  /**
13816
13817
  * Helper function to remove all of the cards in the room.
@@ -13820,7 +13821,7 @@ export declare function removeAllBombs(bombVariant?: BombVariant, subType?: numb
13820
13821
  * @param cap Optional. If specified, will only remove the given amount of cards.
13821
13822
  * @returns The cards that were removed.
13822
13823
  */
13823
- export declare function removeAllCards(cardType?: CardType, cap?: int): EntityPickupCard[];
13824
+ export declare function removeAllCards(cardType?: CardType | -1, cap?: int): EntityPickupCard[];
13824
13825
 
13825
13826
  export declare function removeAllCharacters(string: string, character: string): string;
13826
13827
 
@@ -13855,7 +13856,7 @@ export declare function removeAllCollectibles(collectibleType?: CollectibleType,
13855
13856
  * @param cap Optional. If specified, will only remove the given amount of crawl spaces.
13856
13857
  * @returns The crawl spaces that were removed.
13857
13858
  */
13858
- export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant, updateRoom?: boolean, cap?: int): GridEntity[];
13859
+ export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant | -1, updateRoom?: boolean, cap?: int): GridEntity[];
13859
13860
 
13860
13861
  /**
13861
13862
  * Helper function to remove all of the doors in the room. By default, it will remove every door.
@@ -13877,7 +13878,7 @@ export declare function removeAllDoors(...roomTypes: RoomType[]): int;
13877
13878
  * @param cap Optional. If specified, will only remove the given amount of effects.
13878
13879
  * @returns An array of the effects that were removed.
13879
13880
  */
13880
- export declare function removeAllEffects(effectVariant?: EffectVariant, subType?: number, cap?: int): EntityEffect[];
13881
+ export declare function removeAllEffects(effectVariant?: EffectVariant | -1, subType?: number, cap?: int): EntityEffect[];
13881
13882
 
13882
13883
  /**
13883
13884
  * Helper function to remove all of the familiars in the room.
@@ -13889,7 +13890,7 @@ export declare function removeAllEffects(effectVariant?: EffectVariant, subType?
13889
13890
  * @param cap Optional. If specified, will only remove the given amount of familiars.
13890
13891
  * @returns An array of the familiars that were removed.
13891
13892
  */
13892
- export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant, subType?: number, cap?: int): EntityFamiliar[];
13893
+ export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant | -1, subType?: number, cap?: int): EntityFamiliar[];
13893
13894
 
13894
13895
  /**
13895
13896
  * Helper function to all grid entities in the room except for ones matching the grid entity types
@@ -13941,7 +13942,7 @@ export declare function removeAllKeys(keySubType?: KeySubType, cap?: int): Entit
13941
13942
  * @param cap Optional. If specified, will only remove the given amount of knives.
13942
13943
  * @returns An array of the knives that were removed.
13943
13944
  */
13944
- export declare function removeAllKnives(knifeVariant?: KnifeVariant, subType?: number, cap?: int): EntityKnife[];
13945
+ export declare function removeAllKnives(knifeVariant?: KnifeVariant | -1, subType?: number, cap?: int): EntityKnife[];
13945
13946
 
13946
13947
  /**
13947
13948
  * Helper function to remove all of the lasers in the room.
@@ -13953,7 +13954,7 @@ export declare function removeAllKnives(knifeVariant?: KnifeVariant, subType?: n
13953
13954
  * @param cap Optional. If specified, will only remove the given amount of lasers.
13954
13955
  * @returns An array of the lasers that were removed.
13955
13956
  */
13956
- export declare function removeAllLasers(laserVariant?: LaserVariant, subType?: number, cap?: int): EntityLaser[];
13957
+ export declare function removeAllLasers(laserVariant?: LaserVariant | -1, subType?: number, cap?: int): EntityLaser[];
13957
13958
 
13958
13959
  /**
13959
13960
  * Helper function to remove all of the matching entities in the room.
@@ -14000,7 +14001,7 @@ export declare function removeAllMatchingGridEntities(...gridEntityType: GridEnt
14000
14001
  * @param cap Optional. If specified, will only remove the given amount of NPCs.
14001
14002
  * @returns An array of the NPCs that were removed.
14002
14003
  */
14003
- export declare function removeAllNPCs(entityType?: EntityType, variant?: number, subType?: number, cap?: int): EntityNPC[];
14004
+ export declare function removeAllNPCs(entityType?: EntityType | -1, variant?: number, subType?: number, cap?: int): EntityNPC[];
14004
14005
 
14005
14006
  /**
14006
14007
  * Helper function to remove all of the pickups in the room.
@@ -14012,7 +14013,7 @@ export declare function removeAllNPCs(entityType?: EntityType, variant?: number,
14012
14013
  * @param cap Optional. If specified, will only remove the given amount of pickups.
14013
14014
  * @returns An array of the pickups that were removed.
14014
14015
  */
14015
- export declare function removeAllPickups(pickupVariant?: PickupVariant, subType?: number, cap?: int): EntityPickup[];
14016
+ export declare function removeAllPickups(pickupVariant?: PickupVariant | -1, subType?: number, cap?: int): EntityPickup[];
14016
14017
 
14017
14018
  /**
14018
14019
  * Helper function to remove all of the pills in the room.
@@ -14035,7 +14036,7 @@ export declare function removeAllPills(pillColor?: PillColor, cap?: int): Entity
14035
14036
  * @param cap Optional. If specified, will only remove the given amount of pits.
14036
14037
  * @returns The pits that were removed.
14037
14038
  */
14038
- export declare function removeAllPits(pitVariant?: PitVariant, updateRoom?: boolean, cap?: int): GridEntityPit[];
14039
+ export declare function removeAllPits(pitVariant?: PitVariant | -1, updateRoom?: boolean, cap?: int): GridEntityPit[];
14039
14040
 
14040
14041
  export declare function removeAllPlayerHealth(player: EntityPlayer): void;
14041
14042
 
@@ -14061,7 +14062,7 @@ export declare function removeAllPlayerTrinkets(player: EntityPlayer): void;
14061
14062
  * @param cap Optional. If specified, will only remove the given amount of poops.
14062
14063
  * @returns The poops that were removed.
14063
14064
  */
14064
- export declare function removeAllPoops(poopVariant?: PoopGridEntityVariant, updateRoom?: boolean, cap?: int): GridEntityPoop[];
14065
+ export declare function removeAllPoops(poopVariant?: PoopGridEntityVariant | -1, updateRoom?: boolean, cap?: int): GridEntityPoop[];
14065
14066
 
14066
14067
  /**
14067
14068
  * Helper function to remove all of the `GridEntityPressurePlate` in the room.
@@ -14074,7 +14075,7 @@ export declare function removeAllPoops(poopVariant?: PoopGridEntityVariant, upda
14074
14075
  * @param cap Optional. If specified, will only remove the given amount of pressure plates.
14075
14076
  * @returns The pressure plates that were removed.
14076
14077
  */
14077
- export declare function removeAllPressurePlates(pressurePlateVariant?: PressurePlateVariant, updateRoom?: boolean, cap?: int): GridEntityPressurePlate[];
14078
+ export declare function removeAllPressurePlates(pressurePlateVariant?: PressurePlateVariant | -1, updateRoom?: boolean, cap?: int): GridEntityPressurePlate[];
14078
14079
 
14079
14080
  /**
14080
14081
  * Helper function to remove all of the projectiles in the room.
@@ -14086,7 +14087,7 @@ export declare function removeAllPressurePlates(pressurePlateVariant?: PressureP
14086
14087
  * @param cap Optional. If specified, will only remove the given amount of projectiles.
14087
14088
  * @returns An array of the projectiles that were removed.
14088
14089
  */
14089
- export declare function removeAllProjectiles(projectileVariant?: ProjectileVariant, subType?: number, cap?: int): EntityProjectile[];
14090
+ export declare function removeAllProjectiles(projectileVariant?: ProjectileVariant | -1, subType?: number, cap?: int): EntityProjectile[];
14090
14091
 
14091
14092
  /**
14092
14093
  * Helper function to remove all of the red heart pickup entities in the room.
@@ -14131,7 +14132,7 @@ export declare function removeAllSacks(sackSubType?: SackSubType, cap?: int): En
14131
14132
  * @param cap Optional. If specified, will only remove the given amount of slots.
14132
14133
  * @returns An array of the slots that were removed.
14133
14134
  */
14134
- export declare function removeAllSlots(slotVariant?: SlotVariant, subType?: number, cap?: int): Entity[];
14135
+ export declare function removeAllSlots(slotVariant?: SlotVariant | -1, subType?: number, cap?: int): Entity[];
14135
14136
 
14136
14137
  /**
14137
14138
  * Helper function to remove all of the `GridEntitySpikes` in the room.
@@ -14156,7 +14157,7 @@ export declare function removeAllSpikes(variant?: number, updateRoom?: boolean,
14156
14157
  * @param cap Optional. If specified, will only remove the given amount of tears.
14157
14158
  * @returns An array of the tears that were removed.
14158
14159
  */
14159
- export declare function removeAllTears(tearVariant?: TearVariant, subType?: number, cap?: int): EntityTear[];
14160
+ export declare function removeAllTears(tearVariant?: TearVariant | -1, subType?: number, cap?: int): EntityTear[];
14160
14161
 
14161
14162
  /**
14162
14163
  * Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
@@ -14195,7 +14196,7 @@ export declare function removeAllTNT(variant?: number, updateRoom?: boolean, cap
14195
14196
  * @param cap Optional. If specified, will only remove the given amount of trapdoors.
14196
14197
  * @returns The trapdoors that were removed.
14197
14198
  */
14198
- export declare function removeAllTrapdoors(trapdoorVariant?: TrapdoorVariant, updateRoom?: boolean, cap?: int): GridEntity[];
14199
+ export declare function removeAllTrapdoors(trapdoorVariant?: TrapdoorVariant | -1, updateRoom?: boolean, cap?: int): GridEntity[];
14199
14200
 
14200
14201
  /**
14201
14202
  * Helper function to remove all of the trinkets in the room.
@@ -14495,7 +14496,7 @@ export declare interface RoomDescription {
14495
14496
  startSeedString: string;
14496
14497
  stage: LevelStage;
14497
14498
  stageType: StageType;
14498
- stageID: StageID;
14499
+ stageID: StageID | -1;
14499
14500
  dimension: Dimension;
14500
14501
  roomType: RoomType;
14501
14502
  roomVariant: int;