isaacscript-common 39.2.2 → 39.3.0

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.
@@ -4775,7 +4775,7 @@ export declare function getBatteries(batterySubType?: BatterySubType | -1): Enti
4775
4775
 
4776
4776
  /**
4777
4777
  * Helper function to get the door that leads to the off-grid room that contains the hole to the
4778
- * Blue Womb.
4778
+ * Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)
4779
4779
  *
4780
4780
  * Returns undefined if the room has no Blue Womb doors.
4781
4781
  */
@@ -7494,6 +7494,14 @@ export declare function getVanillaTrinketTypeRange(): TrinketType[];
7494
7494
  */
7495
7495
  export declare function getVisibleHearts(player: EntityPlayer): int;
7496
7496
 
7497
+ /**
7498
+ * Helper function to get the door that leads to the off-grid room that contains the portal to The
7499
+ * Void. (In vanilla, the door will only appear in the Hush Boss Room.)
7500
+ *
7501
+ * Returns undefined if the room has no Void doors.
7502
+ */
7503
+ export declare function getVoidDoor(): GridEntityDoor | undefined;
7504
+
7497
7505
  /**
7498
7506
  * Helper function to restore the player's trinkets back to the way they were before the
7499
7507
  * `temporarilyRemoveTrinket` function was used. It will re-smelt any smelted trinkets that were
@@ -8217,6 +8225,11 @@ export declare function isBitSet128(object: unknown): object is BitSet128;
8217
8225
  */
8218
8226
  export declare function isBlindCollectible(collectible: EntityPickup): boolean;
8219
8227
 
8228
+ /**
8229
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
8230
+ * contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss
8231
+ * Room.)
8232
+ */
8220
8233
  export declare function isBlueWombDoor(door: GridEntityDoor): boolean;
8221
8234
 
8222
8235
  /** Helper function to detect if a variable is of type `EntityBomb`. */
@@ -9355,6 +9368,12 @@ export declare function isVanillaWallGridIndex(gridIndex: int): boolean;
9355
9368
  /** Helper function to check if something is an instantiated `Vector` object. */
9356
9369
  export declare function isVector(object: unknown): object is Vector;
9357
9370
 
9371
+ /**
9372
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
9373
+ * contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)
9374
+ */
9375
+ export declare function isVoidDoor(door: GridEntityDoor): boolean;
9376
+
9358
9377
  /**
9359
9378
  * A cached version of the class returned from the `Isaac.GetItemConfig()` constructor.
9360
9379
  *
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 39.2.2
3
+ isaacscript-common 39.3.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -23077,6 +23077,9 @@ function ____exports.isSecretRoomDoor(self, door)
23077
23077
  local fileName = sprite:GetFilename()
23078
23078
  return string.lower(fileName) == "gfx/grid/door_08_holeinwall.anm2"
23079
23079
  end
23080
+ function ____exports.isVoidDoor(self, door)
23081
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.THE_VOID)
23082
+ end
23080
23083
  function ____exports.removeDoor(self, door)
23081
23084
  local room = game:GetRoom()
23082
23085
  room:RemoveDoor(door.Slot)
@@ -23212,6 +23215,13 @@ function ____exports.getUnusedDoorSlots(self)
23212
23215
  function(____, doorSlot) return doorSlot ~= DoorSlot.NO_DOOR_SLOT and room:IsDoorSlotAllowed(doorSlot) and room:GetDoor(doorSlot) == nil end
23213
23216
  )
23214
23217
  end
23218
+ function ____exports.getVoidDoor(self)
23219
+ local doors = ____exports.getDoors(nil)
23220
+ return __TS__ArrayFind(
23221
+ doors,
23222
+ function(____, door) return ____exports.isVoidDoor(nil, door) end
23223
+ )
23224
+ end
23215
23225
  function ____exports.hasDoorType(self, ...)
23216
23226
  local roomTypes = {...}
23217
23227
  local doors = ____exports.getDoors(nil)
@@ -18,7 +18,7 @@ export declare function doorSlotsToDoorSlotFlags(doorSlots: DoorSlot[] | readonl
18
18
  export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
19
19
  /**
20
20
  * Helper function to get the door that leads to the off-grid room that contains the hole to the
21
- * Blue Womb.
21
+ * Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)
22
22
  *
23
23
  * Returns undefined if the room has no Blue Womb doors.
24
24
  */
@@ -94,6 +94,13 @@ export declare function getRoomShapeDoorSlotCoordinates(roomShape: RoomShape, do
94
94
  * doors.
95
95
  */
96
96
  export declare function getUnusedDoorSlots(): DoorSlot[];
97
+ /**
98
+ * Helper function to get the door that leads to the off-grid room that contains the portal to The
99
+ * Void. (In vanilla, the door will only appear in the Hush Boss Room.)
100
+ *
101
+ * Returns undefined if the room has no Void doors.
102
+ */
103
+ export declare function getVoidDoor(): GridEntityDoor | undefined;
97
104
  /**
98
105
  * Helper function to check if the current room has one or more doors that lead to the given room
99
106
  * type.
@@ -108,6 +115,11 @@ export declare function hasDoorType(...roomTypes: RoomType[]): boolean;
108
115
  */
109
116
  export declare function hasUnusedDoorSlot(): boolean;
110
117
  export declare function isAngelRoomDoor(door: GridEntityDoor): boolean;
118
+ /**
119
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
120
+ * contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss
121
+ * Room.)
122
+ */
111
123
  export declare function isBlueWombDoor(door: GridEntityDoor): boolean;
112
124
  export declare function isDevilRoomDoor(door: GridEntityDoor): boolean;
113
125
  /** Helper function to see if a door slot could exist for a given room shape. */
@@ -152,6 +164,11 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
152
164
  * Secret Room door.
153
165
  */
154
166
  export declare function isSecretRoomDoor(door: GridEntityDoor): boolean;
167
+ /**
168
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
169
+ * contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)
170
+ */
171
+ export declare function isVoidDoor(door: GridEntityDoor): boolean;
155
172
  /**
156
173
  * Helper function to reset an unlocked door back to a locked state. Doing this is non-trivial
157
174
  * because in addition to calling the `GridEntityDoor.SetLocked` method, you must also:
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src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,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
@@ -97,6 +97,9 @@ function ____exports.getDoors(self, ...)
97
97
  end
98
98
  return doors
99
99
  end
100
+ --- Helper function to check if the provided door is the one that leads to the off-grid room that
101
+ -- contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss
102
+ -- Room.)
100
103
  function ____exports.isBlueWombDoor(self, door)
101
104
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
102
105
  end
@@ -116,6 +119,11 @@ function ____exports.isSecretRoomDoor(self, door)
116
119
  local fileName = sprite:GetFilename()
117
120
  return string.lower(fileName) == "gfx/grid/door_08_holeinwall.anm2"
118
121
  end
122
+ --- Helper function to check if the provided door is the one that leads to the off-grid room that
123
+ -- contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)
124
+ function ____exports.isVoidDoor(self, door)
125
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.THE_VOID)
126
+ end
119
127
  --- Helper function to remove a single door.
120
128
  function ____exports.removeDoor(self, door)
121
129
  local room = game:GetRoom()
@@ -180,7 +188,7 @@ function ____exports.getAngelRoomDoor(self)
180
188
  return ____temp_0
181
189
  end
182
190
  --- Helper function to get the door that leads to the off-grid room that contains the hole to the
183
- -- Blue Womb.
191
+ -- Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)
184
192
  --
185
193
  -- Returns undefined if the room has no Blue Womb doors.
186
194
  function ____exports.getBlueWombDoor(self)
@@ -289,6 +297,17 @@ function ____exports.getUnusedDoorSlots(self)
289
297
  function(____, doorSlot) return doorSlot ~= DoorSlot.NO_DOOR_SLOT and room:IsDoorSlotAllowed(doorSlot) and room:GetDoor(doorSlot) == nil end
290
298
  )
291
299
  end
300
+ --- Helper function to get the door that leads to the off-grid room that contains the portal to The
301
+ -- Void. (In vanilla, the door will only appear in the Hush Boss Room.)
302
+ --
303
+ -- Returns undefined if the room has no Void doors.
304
+ function ____exports.getVoidDoor(self)
305
+ local doors = ____exports.getDoors(nil)
306
+ return __TS__ArrayFind(
307
+ doors,
308
+ function(____, door) return ____exports.isVoidDoor(nil, door) end
309
+ )
310
+ end
292
311
  --- Helper function to check if the current room has one or more doors that lead to the given room
293
312
  -- type.
294
313
  --
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "39.2.2",
3
+ "version": "39.3.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -106,7 +106,7 @@ export function getAngelRoomDoor(): GridEntityDoor | undefined {
106
106
 
107
107
  /**
108
108
  * Helper function to get the door that leads to the off-grid room that contains the hole to the
109
- * Blue Womb.
109
+ * Blue Womb. (In vanilla, the door will only appear in the It Lives Boss Room.)
110
110
  *
111
111
  * Returns undefined if the room has no Blue Womb doors.
112
112
  */
@@ -306,6 +306,17 @@ export function getUnusedDoorSlots(): DoorSlot[] {
306
306
  );
307
307
  }
308
308
 
309
+ /**
310
+ * Helper function to get the door that leads to the off-grid room that contains the portal to The
311
+ * Void. (In vanilla, the door will only appear in the Hush Boss Room.)
312
+ *
313
+ * Returns undefined if the room has no Void doors.
314
+ */
315
+ export function getVoidDoor(): GridEntityDoor | undefined {
316
+ const doors = getDoors();
317
+ return doors.find((door) => isVoidDoor(door));
318
+ }
319
+
309
320
  /**
310
321
  * Helper function to check if the current room has one or more doors that lead to the given room
311
322
  * type.
@@ -334,6 +345,11 @@ export function isAngelRoomDoor(door: GridEntityDoor): boolean {
334
345
  return door.TargetRoomType === RoomType.ANGEL;
335
346
  }
336
347
 
348
+ /**
349
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
350
+ * contains the hole to the Blue Womb. (In vanilla, the door will only appear in the It Lives Boss
351
+ * Room.)
352
+ */
337
353
  export function isBlueWombDoor(door: GridEntityDoor): boolean {
338
354
  return door.TargetRoomIndex === asNumber(GridRoom.BLUE_WOMB);
339
355
  }
@@ -462,6 +478,14 @@ export function isSecretRoomDoor(door: GridEntityDoor): boolean {
462
478
  return fileName.toLowerCase() === "gfx/grid/door_08_holeinwall.anm2"; // cspell:ignore holeinwall
463
479
  }
464
480
 
481
+ /**
482
+ * Helper function to check if the provided door is the one that leads to the off-grid room that
483
+ * contains the portal to The Void. (In vanilla, the door will only appear in the Hush Boss Room.)
484
+ */
485
+ export function isVoidDoor(door: GridEntityDoor): boolean {
486
+ return door.TargetRoomIndex === asNumber(GridRoom.THE_VOID);
487
+ }
488
+
465
489
  /**
466
490
  * Helper function to reset an unlocked door back to a locked state. Doing this is non-trivial
467
491
  * because in addition to calling the `GridEntityDoor.SetLocked` method, you must also: