isaacscript-common 71.0.2 → 71.2.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.
@@ -3749,8 +3749,8 @@ declare class DisableInputs extends Feature {
3749
3749
  /**
3750
3750
  * Helper function to disable specific inputs, like opening the console.
3751
3751
  *
3752
- * This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
3753
- * disable all inputs, see the `disableAllInputs` function.
3752
+ * This function is variadic, meaning that you can specify as many inputs as you want to disable.
3753
+ * (To disable all inputs, see the `disableAllInputs` function.
3754
3754
  *
3755
3755
  * Use the `enableAllInputs` helper function to set things back to normal.
3756
3756
  *
@@ -8082,7 +8082,15 @@ export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes
8082
8082
  */
8083
8083
  export declare function hasCollectibleInActiveSlot(player: EntityPlayer, collectibleType: CollectibleType, ...activeSlots: ActiveSlot[]): boolean;
8084
8084
 
8085
- export declare function hasCurse(curse: LevelCurse): boolean;
8085
+ /**
8086
+ * Helper function to check if the current floor has a particular curse.
8087
+ *
8088
+ * This function is variadic, meaning that you can specify as many curses as you want. The function
8089
+ * will return true if the level has one or more of the curses.
8090
+ *
8091
+ * Under the hood, this function uses the `Level.GetCurses` method.
8092
+ */
8093
+ export declare function hasCurse(...curses: LevelCurse[]): boolean;
8086
8094
 
8087
8095
  /**
8088
8096
  * Helper function to check if the current room has one or more doors that lead to the given room
@@ -8654,13 +8662,14 @@ export declare function isAllPressurePlatesPushed(): boolean;
8654
8662
  * @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
8655
8663
  * the array will be ignored. If not specified, then all rooms will be
8656
8664
  * checked. Undefined by default.
8657
- * @param includeSecretAndSuperSecretRoom Optional. Whether to include the Secret Room and the Super
8658
- * Secret Room. Default is false.
8665
+ * @param includeSecretRoom Optional. Whether to include the Secret Room. Default is false.
8666
+ * @param includeSuperSecretRoom Optional. Whether to include the Super Secret Room. Default is
8667
+ * false.
8659
8668
  * @param includeUltraSecretRoom Optional. Whether to include the Ultra Secret Room. Default is
8660
8669
  * false.
8661
8670
  * @allowEmptyVariadic
8662
8671
  */
8663
- export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[] | readonly RoomType[], includeSecretAndSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
8672
+ export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[] | readonly RoomType[], includeSecretRoom?: boolean, includeSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
8664
8673
 
8665
8674
  export declare function isAngelRoomDoor(door: GridEntityDoor): boolean;
8666
8675
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 71.0.2
3
+ isaacscript-common 71.2.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -28479,9 +28479,12 @@ function ____exports.inStartingRoom(self)
28479
28479
  local roomGridIndex = getRoomGridIndex(nil)
28480
28480
  return roomGridIndex == startingRoomGridIndex and inDimension(nil, Dimension.MAIN)
28481
28481
  end
28482
- function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndSuperSecretRoom, includeUltraSecretRoom)
28483
- if includeSecretAndSuperSecretRoom == nil then
28484
- includeSecretAndSuperSecretRoom = false
28482
+ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretRoom, includeSuperSecretRoom, includeUltraSecretRoom)
28483
+ if includeSecretRoom == nil then
28484
+ includeSecretRoom = false
28485
+ end
28486
+ if includeSuperSecretRoom == nil then
28487
+ includeSuperSecretRoom = false
28485
28488
  end
28486
28489
  if includeUltraSecretRoom == nil then
28487
28490
  includeUltraSecretRoom = false
@@ -28497,10 +28500,16 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndS
28497
28500
  function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
28498
28501
  )
28499
28502
  end
28500
- if not includeSecretAndSuperSecretRoom then
28503
+ if not includeSecretRoom then
28504
+ matchingRooms = __TS__ArrayFilter(
28505
+ matchingRooms,
28506
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET end
28507
+ )
28508
+ end
28509
+ if not includeSuperSecretRoom then
28501
28510
  matchingRooms = __TS__ArrayFilter(
28502
28511
  matchingRooms,
28503
- function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
28512
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
28504
28513
  )
28505
28514
  end
28506
28515
  if not includeUltraSecretRoom then
@@ -28567,12 +28576,12 @@ function ____exports.setRoomCleared(self)
28567
28576
  for ____, door in ipairs(getDoors(nil)) do
28568
28577
  do
28569
28578
  if isHiddenSecretRoomDoor(nil, door) then
28570
- goto __continue91
28579
+ goto __continue93
28571
28580
  end
28572
28581
  openDoorFast(nil, door)
28573
28582
  door.ExtraVisible = false
28574
28583
  end
28575
- ::__continue91::
28584
+ ::__continue93::
28576
28585
  end
28577
28586
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
28578
28587
  game:ShakeScreen(0)
@@ -55077,6 +55086,8 @@ end
55077
55086
  return ____exports
55078
55087
  end,
55079
55088
  ["src.functions.curses"] = function(...)
55089
+ local ____lualib = require("lualib_bundle")
55090
+ local __TS__ArraySome = ____lualib.__TS__ArraySome
55080
55091
  local ____exports = {}
55081
55092
  local ____cachedClasses = require("src.core.cachedClasses")
55082
55093
  local game = ____cachedClasses.game
@@ -55089,10 +55100,14 @@ function ____exports.getCurseIDByName(self, name)
55089
55100
  end
55090
55101
  return 1 << curseID - 1
55091
55102
  end
55092
- function ____exports.hasCurse(self, curse)
55103
+ function ____exports.hasCurse(self, ...)
55104
+ local curses = {...}
55093
55105
  local level = game:GetLevel()
55094
- local curses = level:GetCurses()
55095
- return hasFlag(nil, curses, curse)
55106
+ local levelCurses = level:GetCurses()
55107
+ return __TS__ArraySome(
55108
+ curses,
55109
+ function(____, curse) return hasFlag(nil, levelCurses, curse) end
55110
+ )
55096
55111
  end
55097
55112
  return ____exports
55098
55113
  end,
@@ -27,8 +27,8 @@ export declare class DisableInputs extends Feature {
27
27
  /**
28
28
  * Helper function to disable specific inputs, like opening the console.
29
29
  *
30
- * This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
31
- * disable all inputs, see the `disableAllInputs` function.
30
+ * This function is variadic, meaning that you can specify as many inputs as you want to disable.
31
+ * (To disable all inputs, see the `disableAllInputs` function.
32
32
  *
33
33
  * Use the `enableAllInputs` helper function to set things back to normal.
34
34
  *
@@ -8,5 +8,13 @@ import type { LevelCurse } from "isaac-typescript-definitions";
8
8
  * a bit flag.
9
9
  */
10
10
  export declare function getCurseIDByName(name: string): LevelCurse;
11
- export declare function hasCurse(curse: LevelCurse): boolean;
11
+ /**
12
+ * Helper function to check if the current floor has a particular curse.
13
+ *
14
+ * This function is variadic, meaning that you can specify as many curses as you want. The function
15
+ * will return true if the level has one or more of the curses.
16
+ *
17
+ * Under the hood, this function uses the `Level.GetCurses` method.
18
+ */
19
+ export declare function hasCurse(...curses: LevelCurse[]): boolean;
12
20
  //# sourceMappingURL=curses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"curses.d.ts","sourceRoot":"","sources":["../../../src/functions/curses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAWzD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAInD"}
1
+ {"version":3,"file":"curses.d.ts","sourceRoot":"","sources":["../../../src/functions/curses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAWzD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAKzD"}
@@ -1,3 +1,5 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__ArraySome = ____lualib.__TS__ArraySome
1
3
  local ____exports = {}
2
4
  local ____cachedClasses = require("src.core.cachedClasses")
3
5
  local game = ____cachedClasses.game
@@ -16,9 +18,19 @@ function ____exports.getCurseIDByName(self, name)
16
18
  end
17
19
  return 1 << curseID - 1
18
20
  end
19
- function ____exports.hasCurse(self, curse)
21
+ --- Helper function to check if the current floor has a particular curse.
22
+ --
23
+ -- This function is variadic, meaning that you can specify as many curses as you want. The function
24
+ -- will return true if the level has one or more of the curses.
25
+ --
26
+ -- Under the hood, this function uses the `Level.GetCurses` method.
27
+ function ____exports.hasCurse(self, ...)
28
+ local curses = {...}
20
29
  local level = game:GetLevel()
21
- local curses = level:GetCurses()
22
- return hasFlag(nil, curses, curse)
30
+ local levelCurses = level:GetCurses()
31
+ return __TS__ArraySome(
32
+ curses,
33
+ function(____, curse) return hasFlag(nil, levelCurses, curse) end
34
+ )
23
35
  end
24
36
  return ____exports
@@ -249,13 +249,14 @@ export declare function is2x1Room(roomData: RoomConfig): boolean;
249
249
  * @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
250
250
  * the array will be ignored. If not specified, then all rooms will be
251
251
  * checked. Undefined by default.
252
- * @param includeSecretAndSuperSecretRoom Optional. Whether to include the Secret Room and the Super
253
- * Secret Room. Default is false.
252
+ * @param includeSecretRoom Optional. Whether to include the Secret Room. Default is false.
253
+ * @param includeSuperSecretRoom Optional. Whether to include the Super Secret Room. Default is
254
+ * false.
254
255
  * @param includeUltraSecretRoom Optional. Whether to include the Ultra Secret Room. Default is
255
256
  * false.
256
257
  * @allowEmptyVariadic
257
258
  */
258
- export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[] | readonly RoomType[], includeSecretAndSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
259
+ export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[] | readonly RoomType[], includeSecretRoom?: boolean, includeSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
259
260
  /**
260
261
  * Helper function to check to see if the current room is an angel shop.
261
262
  *
@@ -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,EAUT,SAAS,EACT,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;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,4BAA4B,UAAQ,GACnC,cAAc,EAAE,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;;;;;;;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"}
@@ -571,14 +571,18 @@ end
571
571
  -- @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
572
572
  -- the array will be ignored. If not specified, then all rooms will be
573
573
  -- checked. Undefined by default.
574
- -- @param includeSecretAndSuperSecretRoom Optional. Whether to include the Secret Room and the Super
575
- -- Secret Room. Default is false.
574
+ -- @param includeSecretRoom Optional. Whether to include the Secret Room. Default is false.
575
+ -- @param includeSuperSecretRoom Optional. Whether to include the Super Secret Room. Default is
576
+ -- false.
576
577
  -- @param includeUltraSecretRoom Optional. Whether to include the Ultra Secret Room. Default is
577
578
  -- false.
578
579
  -- @allowEmptyVariadic
579
- function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndSuperSecretRoom, includeUltraSecretRoom)
580
- if includeSecretAndSuperSecretRoom == nil then
581
- includeSecretAndSuperSecretRoom = false
580
+ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretRoom, includeSuperSecretRoom, includeUltraSecretRoom)
581
+ if includeSecretRoom == nil then
582
+ includeSecretRoom = false
583
+ end
584
+ if includeSuperSecretRoom == nil then
585
+ includeSuperSecretRoom = false
582
586
  end
583
587
  if includeUltraSecretRoom == nil then
584
588
  includeUltraSecretRoom = false
@@ -594,10 +598,16 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndS
594
598
  function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
595
599
  )
596
600
  end
597
- if not includeSecretAndSuperSecretRoom then
601
+ if not includeSecretRoom then
602
+ matchingRooms = __TS__ArrayFilter(
603
+ matchingRooms,
604
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET end
605
+ )
606
+ end
607
+ if not includeSuperSecretRoom then
598
608
  matchingRooms = __TS__ArrayFilter(
599
609
  matchingRooms,
600
- function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
610
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
601
611
  )
602
612
  end
603
613
  if not includeUltraSecretRoom then
@@ -679,12 +689,12 @@ function ____exports.setRoomCleared(self)
679
689
  for ____, door in ipairs(getDoors(nil)) do
680
690
  do
681
691
  if isHiddenSecretRoomDoor(nil, door) then
682
- goto __continue91
692
+ goto __continue93
683
693
  end
684
694
  openDoorFast(nil, door)
685
695
  door.ExtraVisible = false
686
696
  end
687
- ::__continue91::
697
+ ::__continue93::
688
698
  end
689
699
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
690
700
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "71.0.2",
3
+ "version": "71.2.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -146,8 +146,8 @@ export class DisableInputs extends Feature {
146
146
  /**
147
147
  * Helper function to disable specific inputs, like opening the console.
148
148
  *
149
- * This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
150
- * disable all inputs, see the `disableAllInputs` function.
149
+ * This function is variadic, meaning that you can specify as many inputs as you want to disable.
150
+ * (To disable all inputs, see the `disableAllInputs` function.
151
151
  *
152
152
  * Use the `enableAllInputs` helper function to set things back to normal.
153
153
  *
@@ -23,8 +23,17 @@ export function getCurseIDByName(name: string): LevelCurse {
23
23
  return (1 << (curseID - 1)) as LevelCurse;
24
24
  }
25
25
 
26
- export function hasCurse(curse: LevelCurse): boolean {
26
+ /**
27
+ * Helper function to check if the current floor has a particular curse.
28
+ *
29
+ * This function is variadic, meaning that you can specify as many curses as you want. The function
30
+ * will return true if the level has one or more of the curses.
31
+ *
32
+ * Under the hood, this function uses the `Level.GetCurses` method.
33
+ */
34
+ export function hasCurse(...curses: LevelCurse[]): boolean {
27
35
  const level = game.GetLevel();
28
- const curses = level.GetCurses();
29
- return hasFlag(curses, curse);
36
+ const levelCurses = level.GetCurses();
37
+
38
+ return curses.some((curse) => hasFlag(levelCurses, curse));
30
39
  }
@@ -539,15 +539,17 @@ export function is2x1Room(roomData: RoomConfig): boolean {
539
539
  * @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
540
540
  * the array will be ignored. If not specified, then all rooms will be
541
541
  * checked. Undefined by default.
542
- * @param includeSecretAndSuperSecretRoom Optional. Whether to include the Secret Room and the Super
543
- * Secret Room. Default is false.
542
+ * @param includeSecretRoom Optional. Whether to include the Secret Room. Default is false.
543
+ * @param includeSuperSecretRoom Optional. Whether to include the Super Secret Room. Default is
544
+ * false.
544
545
  * @param includeUltraSecretRoom Optional. Whether to include the Ultra Secret Room. Default is
545
546
  * false.
546
547
  * @allowEmptyVariadic
547
548
  */
548
549
  export function isAllRoomsClear(
549
550
  onlyCheckRoomTypes?: RoomType[] | readonly RoomType[],
550
- includeSecretAndSuperSecretRoom = false,
551
+ includeSecretRoom = false,
552
+ includeSuperSecretRoom = false,
551
553
  includeUltraSecretRoom = false,
552
554
  ): boolean {
553
555
  const roomsInsideGrid = getRoomsInsideGrid();
@@ -564,11 +566,18 @@ export function isAllRoomsClear(
564
566
  );
565
567
  }
566
568
 
567
- if (!includeSecretAndSuperSecretRoom) {
569
+ if (!includeSecretRoom) {
570
+ matchingRooms = matchingRooms.filter(
571
+ (roomDescriptor) =>
572
+ roomDescriptor.Data !== undefined &&
573
+ roomDescriptor.Data.Type !== RoomType.SECRET,
574
+ );
575
+ }
576
+
577
+ if (!includeSuperSecretRoom) {
568
578
  matchingRooms = matchingRooms.filter(
569
579
  (roomDescriptor) =>
570
580
  roomDescriptor.Data !== undefined &&
571
- roomDescriptor.Data.Type !== RoomType.SECRET &&
572
581
  roomDescriptor.Data.Type !== RoomType.SUPER_SECRET,
573
582
  );
574
583
  }