isaacscript-common 33.2.0 → 33.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.
@@ -7737,6 +7737,13 @@ export declare function inRange(num: int, start: int, end: int): boolean;
7737
7737
  */
7738
7738
  export declare function inRectangle(position: Vector, topLeft: Vector, bottomRight: Vector): boolean;
7739
7739
 
7740
+ /**
7741
+ * Helper function to check if the current room shape matches one of the given room shapes.
7742
+ *
7743
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
7744
+ */
7745
+ export declare function inRoomShape(...roomShapes: RoomShape[]): boolean;
7746
+
7740
7747
  /**
7741
7748
  * Helper function to check if the current room matches one of the given room types.
7742
7749
  *
@@ -8731,6 +8738,13 @@ export declare function isRock(variable: unknown): variable is GridEntityRock;
8731
8738
  */
8732
8739
  export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
8733
8740
 
8741
+ /**
8742
+ * Helper function to check if the provided room matches one of the given room shapes.
8743
+ *
8744
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
8745
+ */
8746
+ export declare function isRoomShape(roomData: RoomConfig, ...roomShapes: RoomShape[]): boolean;
8747
+
8734
8748
  /**
8735
8749
  * Helper function to see if a given room shape will grant a single charge or a double charge to the
8736
8750
  * player's active item(s).
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 33.2.0
3
+ isaacscript-common 33.3.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -27686,6 +27686,10 @@ end
27686
27686
  function ____exports.isMirrorRoom(self, roomData)
27687
27687
  return roomData.Type == RoomType.DEFAULT and (roomData.StageID == StageID.DOWNPOUR or roomData.StageID == StageID.DROSS) and roomData.Subtype == asNumber(nil, DownpourRoomSubType.MIRROR)
27688
27688
  end
27689
+ function ____exports.isRoomShape(self, roomData, ...)
27690
+ local roomShapes = {...}
27691
+ return __TS__ArrayIncludes(roomShapes, roomData.Shape)
27692
+ end
27689
27693
  function ____exports.isRoomType(self, roomData, ...)
27690
27694
  local roomTypes = {...}
27691
27695
  return __TS__ArrayIncludes(roomTypes, roomData.Type)
@@ -27822,6 +27826,10 @@ function ____exports.inMirrorRoom(self)
27822
27826
  local roomData = getRoomData(nil)
27823
27827
  return ____exports.isMirrorRoom(nil, roomData)
27824
27828
  end
27829
+ function ____exports.inRoomShape(self, ...)
27830
+ local roomData = getRoomData(nil)
27831
+ return ____exports.isRoomShape(nil, roomData, ...)
27832
+ end
27825
27833
  function ____exports.inRoomType(self, ...)
27826
27834
  local roomData = getRoomData(nil)
27827
27835
  return ____exports.isRoomType(nil, roomData, ...)
@@ -27901,12 +27909,12 @@ function ____exports.setRoomCleared(self)
27901
27909
  for ____, door in ipairs(getDoors(nil)) do
27902
27910
  do
27903
27911
  if isHiddenSecretRoomDoor(nil, door) then
27904
- goto __continue76
27912
+ goto __continue78
27905
27913
  end
27906
27914
  openDoorFast(nil, door)
27907
27915
  door.ExtraVisible = false
27908
27916
  end
27909
- ::__continue76::
27917
+ ::__continue78::
27910
27918
  end
27911
27919
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
27912
27920
  game:ShakeScreen(0)
@@ -1,5 +1,5 @@
1
1
  import type { BackdropType, BossID, ItemPoolType, MinibossID } from "isaac-typescript-definitions";
2
- import { Dimension, RoomType } from "isaac-typescript-definitions";
2
+ import { Dimension, RoomShape, RoomType } from "isaac-typescript-definitions";
3
3
  /**
4
4
  * Helper function for quickly switching to a new room without playing a particular animation. Use
5
5
  * this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
@@ -167,6 +167,12 @@ export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
167
167
  * rooms are marked with a specific sub-type.)
168
168
  */
169
169
  export declare function inMirrorRoom(): boolean;
170
+ /**
171
+ * Helper function to check if the current room shape matches one of the given room shapes.
172
+ *
173
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
174
+ */
175
+ export declare function inRoomShape(...roomShapes: RoomShape[]): boolean;
170
176
  /**
171
177
  * Helper function to check if the current room matches one of the given room types.
172
178
  *
@@ -280,6 +286,12 @@ export declare function isMinibossRoomOf(roomData: RoomConfig, minibossID: Minib
280
286
  * rooms are marked with a specific sub-type.)
281
287
  */
282
288
  export declare function isMirrorRoom(roomData: RoomConfig): boolean;
289
+ /**
290
+ * Helper function to check if the provided room matches one of the given room shapes.
291
+ *
292
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
293
+ */
294
+ export declare function isRoomShape(roomData: RoomConfig, ...roomShapes: RoomShape[]): boolean;
283
295
  /**
284
296
  * Helper function to check if the provided room matches one of the given room types.
285
297
  *
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,SAAS,EAQT,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAuCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAcnD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,EAC3B,iCAAiC,UAAQ,GACxC,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAclC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE1D;AAED;;;;;;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AE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -213,6 +213,13 @@ end
213
213
  function ____exports.isMirrorRoom(self, roomData)
214
214
  return roomData.Type == RoomType.DEFAULT and (roomData.StageID == StageID.DOWNPOUR or roomData.StageID == StageID.DROSS) and roomData.Subtype == asNumber(nil, DownpourRoomSubType.MIRROR)
215
215
  end
216
+ --- Helper function to check if the provided room matches one of the given room shapes.
217
+ --
218
+ -- This function is variadic, which means you can pass as many room shapes as you want to match for.
219
+ function ____exports.isRoomShape(self, roomData, ...)
220
+ local roomShapes = {...}
221
+ return __TS__ArrayIncludes(roomShapes, roomData.Shape)
222
+ end
216
223
  --- Helper function to check if the provided room matches one of the given room types.
217
224
  --
218
225
  -- This function is variadic, which means you can pass as many room types as you want to match for.
@@ -442,6 +449,13 @@ function ____exports.inMirrorRoom(self)
442
449
  local roomData = getRoomData(nil)
443
450
  return ____exports.isMirrorRoom(nil, roomData)
444
451
  end
452
+ --- Helper function to check if the current room shape matches one of the given room shapes.
453
+ --
454
+ -- This function is variadic, which means you can pass as many room shapes as you want to match for.
455
+ function ____exports.inRoomShape(self, ...)
456
+ local roomData = getRoomData(nil)
457
+ return ____exports.isRoomShape(nil, roomData, ...)
458
+ end
445
459
  --- Helper function to check if the current room matches one of the given room types.
446
460
  --
447
461
  -- This function is variadic, which means you can pass as many room types as you want to match for.
@@ -557,12 +571,12 @@ function ____exports.setRoomCleared(self)
557
571
  for ____, door in ipairs(getDoors(nil)) do
558
572
  do
559
573
  if isHiddenSecretRoomDoor(nil, door) then
560
- goto __continue76
574
+ goto __continue78
561
575
  end
562
576
  openDoorFast(nil, door)
563
577
  door.ExtraVisible = false
564
578
  end
565
- ::__continue76::
579
+ ::__continue78::
566
580
  end
567
581
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
568
582
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "33.2.0",
3
+ "version": "33.3.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -413,6 +413,16 @@ export function inMirrorRoom(): boolean {
413
413
  return isMirrorRoom(roomData);
414
414
  }
415
415
 
416
+ /**
417
+ * Helper function to check if the current room shape matches one of the given room shapes.
418
+ *
419
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
420
+ */
421
+ export function inRoomShape(...roomShapes: RoomShape[]): boolean {
422
+ const roomData = getRoomData();
423
+ return isRoomShape(roomData, ...roomShapes);
424
+ }
425
+
416
426
  /**
417
427
  * Helper function to check if the current room matches one of the given room types.
418
428
  *
@@ -674,6 +684,18 @@ export function isMirrorRoom(roomData: RoomConfig): boolean {
674
684
  );
675
685
  }
676
686
 
687
+ /**
688
+ * Helper function to check if the provided room matches one of the given room shapes.
689
+ *
690
+ * This function is variadic, which means you can pass as many room shapes as you want to match for.
691
+ */
692
+ export function isRoomShape(
693
+ roomData: RoomConfig,
694
+ ...roomShapes: RoomShape[]
695
+ ): boolean {
696
+ return roomShapes.includes(roomData.Shape);
697
+ }
698
+
677
699
  /**
678
700
  * Helper function to check if the provided room matches one of the given room types.
679
701
  *