isaacscript-common 12.3.1 → 12.3.2

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.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 12.3.1
3
+ isaacscript-common 12.3.2
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -32569,18 +32569,17 @@ end
32569
32569
  -- the array will be ignored. If not specified, then all rooms will be
32570
32570
  -- checked. Undefined by default.
32571
32571
  function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
32572
- local ____temp_1
32572
+ local rooms = ____exports.getRoomsInsideGrid(nil)
32573
+ local matchingRooms
32573
32574
  if onlyCheckRoomTypes == nil then
32574
- ____temp_1 = nil
32575
+ matchingRooms = rooms
32575
32576
  else
32576
- ____temp_1 = __TS__New(Set, onlyCheckRoomTypes)
32577
+ local roomTypeWhitelist = __TS__New(Set, onlyCheckRoomTypes)
32578
+ matchingRooms = __TS__ArrayFilter(
32579
+ rooms,
32580
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
32581
+ )
32577
32582
  end
32578
- local roomTypeWhitelist = ____temp_1
32579
- local rooms = ____exports.getRoomsInsideGrid(nil)
32580
- local matchingRooms = roomTypeWhitelist == nil and rooms or __TS__ArrayFilter(
32581
- rooms,
32582
- function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
32583
- )
32584
32583
  return __TS__ArrayEvery(
32585
32584
  matchingRooms,
32586
32585
  function(____, roomDescriptor) return roomDescriptor.Clear end
@@ -32617,12 +32616,12 @@ function ____exports.setRoomCleared(self)
32617
32616
  for ____, door in ipairs(getDoors(nil)) do
32618
32617
  do
32619
32618
  if isHiddenSecretRoomDoor(nil, door) then
32620
- goto __continue50
32619
+ goto __continue52
32621
32620
  end
32622
32621
  openDoorFast(nil, door)
32623
32622
  door.ExtraVisible = false
32624
32623
  end
32625
- ::__continue50::
32624
+ ::__continue52::
32626
32625
  end
32627
32626
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
32628
32627
  game:ShakeScreen(0)
@@ -47066,7 +47065,7 @@ return ____exports
47066
47065
  ["package"] = function(...)
47067
47066
  return {
47068
47067
  name = "isaacscript-common",
47069
- version = "12.3.1",
47068
+ version = "12.3.2",
47070
47069
  description = "Helper functions and features for IsaacScript mods.",
47071
47070
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
47072
47071
  homepage = "https://isaacscript.github.io/",
package/dist/package.lua CHANGED
@@ -1,6 +1,6 @@
1
1
  return {
2
2
  name = "isaacscript-common",
3
- version = "12.3.1",
3
+ version = "12.3.2",
4
4
  description = "Helper functions and features for IsaacScript mods.",
5
5
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
6
6
  homepage = "https://isaacscript.github.io/",
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAMT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAkCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,GAC1B,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAUlC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAA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;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,+DAA+D;AAC/D,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"}
@@ -368,18 +368,17 @@ end
368
368
  -- the array will be ignored. If not specified, then all rooms will be
369
369
  -- checked. Undefined by default.
370
370
  function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
371
- local ____temp_1
371
+ local rooms = ____exports.getRoomsInsideGrid(nil)
372
+ local matchingRooms
372
373
  if onlyCheckRoomTypes == nil then
373
- ____temp_1 = nil
374
+ matchingRooms = rooms
374
375
  else
375
- ____temp_1 = __TS__New(Set, onlyCheckRoomTypes)
376
+ local roomTypeWhitelist = __TS__New(Set, onlyCheckRoomTypes)
377
+ matchingRooms = __TS__ArrayFilter(
378
+ rooms,
379
+ function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
380
+ )
376
381
  end
377
- local roomTypeWhitelist = ____temp_1
378
- local rooms = ____exports.getRoomsInsideGrid(nil)
379
- local matchingRooms = roomTypeWhitelist == nil and rooms or __TS__ArrayFilter(
380
- rooms,
381
- function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
382
- )
383
382
  return __TS__ArrayEvery(
384
383
  matchingRooms,
385
384
  function(____, roomDescriptor) return roomDescriptor.Clear end
@@ -416,12 +415,12 @@ function ____exports.setRoomCleared(self)
416
415
  for ____, door in ipairs(getDoors(nil)) do
417
416
  do
418
417
  if isHiddenSecretRoomDoor(nil, door) then
419
- goto __continue50
418
+ goto __continue52
420
419
  end
421
420
  openDoorFast(nil, door)
422
421
  door.ExtraVisible = false
423
422
  end
424
- ::__continue50::
423
+ ::__continue52::
425
424
  end
426
425
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
427
426
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "12.3.1",
3
+ "version": "12.3.2",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -491,17 +491,19 @@ export function inStartingRoom(): boolean {
491
491
  * checked. Undefined by default.
492
492
  */
493
493
  export function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean {
494
- const roomTypeWhitelist =
495
- onlyCheckRoomTypes === undefined ? undefined : new Set(onlyCheckRoomTypes);
496
494
  const rooms = getRoomsInsideGrid();
497
- const matchingRooms =
498
- roomTypeWhitelist === undefined
499
- ? rooms
500
- : rooms.filter(
501
- (roomDescriptor) =>
502
- roomDescriptor.Data !== undefined &&
503
- roomTypeWhitelist.has(roomDescriptor.Data.Type),
504
- );
495
+
496
+ let matchingRooms: RoomDescriptor[];
497
+ if (onlyCheckRoomTypes === undefined) {
498
+ matchingRooms = rooms;
499
+ } else {
500
+ const roomTypeWhitelist = new Set(onlyCheckRoomTypes);
501
+ matchingRooms = rooms.filter(
502
+ (roomDescriptor) =>
503
+ roomDescriptor.Data !== undefined &&
504
+ roomTypeWhitelist.has(roomDescriptor.Data.Type),
505
+ );
506
+ }
505
507
 
506
508
  return matchingRooms.every((roomDescriptor) => roomDescriptor.Clear);
507
509
  }