isaacscript-common 39.3.3 → 39.4.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.
@@ -4099,7 +4099,7 @@ export declare function emptyArray<T>(array: T[]): void;
4099
4099
  */
4100
4100
  export declare function emptyRoom(): void;
4101
4101
 
4102
- /** Helper function to remove all grid entities from a room except for doors, and walls. */
4102
+ /** Helper function to remove all grid entities from a room except for doors and walls. */
4103
4103
  export declare function emptyRoomGridEntities(): void;
4104
4104
 
4105
4105
  /**
@@ -5801,6 +5801,14 @@ export declare function getMapPartialMatch<T>(searchText: string, map: ReadonlyM
5801
5801
  */
5802
5802
  export declare function getMatchingGridEntities(gridEntityType: GridEntityType, variant: int): GridEntity[];
5803
5803
 
5804
+ /**
5805
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
5806
+ * will only appear in the starting room of The Chest / Dark Room.)
5807
+ *
5808
+ * Returns undefined if the room has no Mega Satan doors.
5809
+ */
5810
+ export declare function getMegaSatanDoor(): GridEntityDoor | undefined;
5811
+
5804
5812
  /**
5805
5813
  * Helper function to get the movement actions that the specified `ControllerIndex` is currently
5806
5814
  * pressing down. This returns an array because a player can be holding down more than one movement
@@ -8800,6 +8808,12 @@ export declare function isLRoomShape(roomShape: RoomShape): boolean;
8800
8808
  */
8801
8809
  export declare function isLuaDebugEnabled(): boolean;
8802
8810
 
8811
+ /**
8812
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
8813
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
8814
+ */
8815
+ export declare function isMegaSatanDoor(door: GridEntityDoor): boolean;
8816
+
8803
8817
  /**
8804
8818
  * Helper function to determine if the index of the provided room is equal to `GridRoom.MEGA_SATAN`.
8805
8819
  */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 39.3.3
3
+ isaacscript-common 39.4.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -23069,6 +23069,9 @@ end
23069
23069
  function ____exports.isBlueWombDoor(self, door)
23070
23070
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
23071
23071
  end
23072
+ function ____exports.isMegaSatanDoor(self, door)
23073
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.MEGA_SATAN)
23074
+ end
23072
23075
  function ____exports.isRepentanceDoor(self, door)
23073
23076
  return door.TargetRoomIndex == asNumber(nil, GridRoom.SECRET_EXIT)
23074
23077
  end
@@ -23181,6 +23184,13 @@ function ____exports.getDoorsToRoomIndex(self, ...)
23181
23184
  function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
23182
23185
  )
23183
23186
  end
23187
+ function ____exports.getMegaSatanDoor(self)
23188
+ local doors = ____exports.getDoors(nil)
23189
+ return __TS__ArrayFind(
23190
+ doors,
23191
+ function(____, door) return ____exports.isMegaSatanDoor(nil, door) end
23192
+ )
23193
+ end
23184
23194
  function ____exports.getOppositeDoorSlot(self, doorSlot)
23185
23195
  return OPPOSITE_DOOR_SLOTS[doorSlot]
23186
23196
  end
@@ -72,6 +72,13 @@ export declare function getDoors(...roomTypes: RoomType[]): GridEntityDoor[];
72
72
  * that match any of the N room grid indexes.
73
73
  */
74
74
  export declare function getDoorsToRoomIndex(...roomGridIndex: int[]): GridEntityDoor[];
75
+ /**
76
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
77
+ * will only appear in the starting room of The Chest / Dark Room.)
78
+ *
79
+ * Returns undefined if the room has no Mega Satan doors.
80
+ */
81
+ export declare function getMegaSatanDoor(): GridEntityDoor | undefined;
75
82
  export declare function getOppositeDoorSlot(doorSlot: DoorSlot): DoorSlot | undefined;
76
83
  /**
77
84
  * Helper function to get the door that leads to the "secret exit" off-grid room that takes you to
@@ -150,6 +157,11 @@ export declare function isDoorToMines(door: GridEntityDoor): boolean;
150
157
  */
151
158
  export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
152
159
  export declare function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean;
160
+ /**
161
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
162
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
163
+ */
164
+ export declare function isMegaSatanDoor(door: GridEntityDoor): boolean;
153
165
  /**
154
166
  * Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
155
167
  * you to the Repentance floor.
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,QAAQ,EAKR,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,QAAQ,EAAE,CAWZ;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAEvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EACL,QAAQ,EAAE,GACV,SAAS,QAAQ,EAAE,GACnB,GAAG,CAAC,QAAQ,CAAC,GACb,WAAW,CAAC,QAAQ,CAAC,GACxB,QAAQ,CAAC,YAAY,CAAC,CASxB;AAED,wBAAgB,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,cAAc,GAAG,SAAS,CAG5D;AAED,wBAAgB,gBAAgB,I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Ae,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAE9D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAM9D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAUnD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKvD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,CAK5D;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
@@ -103,6 +103,11 @@ end
103
103
  function ____exports.isBlueWombDoor(self, door)
104
104
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
105
105
  end
106
+ --- Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
107
+ -- (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
108
+ function ____exports.isMegaSatanDoor(self, door)
109
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.MEGA_SATAN)
110
+ end
106
111
  --- Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
107
112
  -- you to the Repentance floor.
108
113
  function ____exports.isRepentanceDoor(self, door)
@@ -254,6 +259,17 @@ function ____exports.getDoorsToRoomIndex(self, ...)
254
259
  function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
255
260
  )
256
261
  end
262
+ --- Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
263
+ -- will only appear in the starting room of The Chest / Dark Room.)
264
+ --
265
+ -- Returns undefined if the room has no Mega Satan doors.
266
+ function ____exports.getMegaSatanDoor(self)
267
+ local doors = ____exports.getDoors(nil)
268
+ return __TS__ArrayFind(
269
+ doors,
270
+ function(____, door) return ____exports.isMegaSatanDoor(nil, door) end
271
+ )
272
+ end
257
273
  function ____exports.getOppositeDoorSlot(self, doorSlot)
258
274
  return OPPOSITE_DOOR_SLOTS[doorSlot]
259
275
  end
@@ -5,6 +5,6 @@
5
5
  * effects (1000), doors, and walls.
6
6
  */
7
7
  export declare function emptyRoom(): void;
8
- /** Helper function to remove all grid entities from a room except for doors, and walls. */
8
+ /** Helper function to remove all grid entities from a room except for doors and walls. */
9
9
  export declare function emptyRoomGridEntities(): void;
10
10
  //# sourceMappingURL=emptyRoom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emptyRoom.d.ts","sourceRoot":"","sources":["../../../src/functions/emptyRoom.ts"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC;AAmCD,2FAA2F;AAC3F,wBAAgB,qBAAqB,IAAI,IAAI,CAyB5C"}
1
+ {"version":3,"file":"emptyRoom.d.ts","sourceRoot":"","sources":["../../../src/functions/emptyRoom.ts"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC;AAmCD,0FAA0F;AAC1F,wBAAgB,qBAAqB,IAAI,IAAI,CAyB5C"}
@@ -39,7 +39,7 @@ function emptyRoomEntities(self)
39
39
  ::__continue4::
40
40
  end
41
41
  end
42
- --- Helper function to remove all grid entities from a room except for doors, and walls.
42
+ --- Helper function to remove all grid entities from a room except for doors and walls.
43
43
  function ____exports.emptyRoomGridEntities(self)
44
44
  local removedOneOrMoreGridEntities = false
45
45
  for ____, gridEntity in ipairs(getGridEntities(nil)) do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "39.3.3",
3
+ "version": "39.4.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -234,6 +234,17 @@ export function getDoorsToRoomIndex(...roomGridIndex: int[]): GridEntityDoor[] {
234
234
  return doors.filter((door) => roomGridIndexesSet.has(door.TargetRoomIndex));
235
235
  }
236
236
 
237
+ /**
238
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
239
+ * will only appear in the starting room of The Chest / Dark Room.)
240
+ *
241
+ * Returns undefined if the room has no Mega Satan doors.
242
+ */
243
+ export function getMegaSatanDoor(): GridEntityDoor | undefined {
244
+ const doors = getDoors();
245
+ return doors.find((door) => isMegaSatanDoor(door));
246
+ }
247
+
237
248
  export function getOppositeDoorSlot(doorSlot: DoorSlot): DoorSlot | undefined {
238
249
  return OPPOSITE_DOOR_SLOTS[doorSlot];
239
250
  }
@@ -454,6 +465,14 @@ export function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean {
454
465
  return isSecretRoomDoor(door) && animation === "Hidden";
455
466
  }
456
467
 
468
+ /**
469
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
470
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
471
+ */
472
+ export function isMegaSatanDoor(door: GridEntityDoor): boolean {
473
+ return door.TargetRoomIndex === asNumber(GridRoom.MEGA_SATAN);
474
+ }
475
+
457
476
  /**
458
477
  * Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
459
478
  * you to the Repentance floor.
@@ -64,7 +64,7 @@ function emptyRoomEntities() {
64
64
  }
65
65
  }
66
66
 
67
- /** Helper function to remove all grid entities from a room except for doors, and walls. */
67
+ /** Helper function to remove all grid entities from a room except for doors and walls. */
68
68
  export function emptyRoomGridEntities(): void {
69
69
  let removedOneOrMoreGridEntities = false;
70
70
  for (const gridEntity of getGridEntities()) {