isaacscript-common 12.3.0 → 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.0
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
 
@@ -25,6 +25,8 @@ information about using TypeScript, see the website: https://isaacscript.github.
25
25
 
26
26
  --]]
27
27
 
28
+ ---@diagnostic disable: deprecated
29
+
28
30
 
29
31
  local ____modules = {}
30
32
  local ____moduleCache = {}
@@ -31771,6 +31773,10 @@ function restoreGlowingHourGlassBackup(self)
31771
31773
  if childTable == nil then
31772
31774
  goto __continue25
31773
31775
  end
31776
+ local childTableLuaMap = childTable
31777
+ if childTableLuaMap[SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_IGNORE_KEY] ~= nil then
31778
+ goto __continue25
31779
+ end
31774
31780
  local saveDataGlowingHourGlass = saveDataGlowingHourGlassMap[subscriberName]
31775
31781
  if saveDataGlowingHourGlass == nil then
31776
31782
  goto __continue25
@@ -32563,18 +32569,17 @@ end
32563
32569
  -- the array will be ignored. If not specified, then all rooms will be
32564
32570
  -- checked. Undefined by default.
32565
32571
  function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
32566
- local ____temp_1
32572
+ local rooms = ____exports.getRoomsInsideGrid(nil)
32573
+ local matchingRooms
32567
32574
  if onlyCheckRoomTypes == nil then
32568
- ____temp_1 = nil
32575
+ matchingRooms = rooms
32569
32576
  else
32570
- ____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
+ )
32571
32582
  end
32572
- local roomTypeWhitelist = ____temp_1
32573
- local rooms = ____exports.getRoomsInsideGrid(nil)
32574
- local matchingRooms = roomTypeWhitelist == nil and rooms or __TS__ArrayFilter(
32575
- rooms,
32576
- function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
32577
- )
32578
32583
  return __TS__ArrayEvery(
32579
32584
  matchingRooms,
32580
32585
  function(____, roomDescriptor) return roomDescriptor.Clear end
@@ -32611,12 +32616,12 @@ function ____exports.setRoomCleared(self)
32611
32616
  for ____, door in ipairs(getDoors(nil)) do
32612
32617
  do
32613
32618
  if isHiddenSecretRoomDoor(nil, door) then
32614
- goto __continue50
32619
+ goto __continue52
32615
32620
  end
32616
32621
  openDoorFast(nil, door)
32617
32622
  door.ExtraVisible = false
32618
32623
  end
32619
- ::__continue50::
32624
+ ::__continue52::
32620
32625
  end
32621
32626
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
32622
32627
  game:ShakeScreen(0)
@@ -33502,7 +33507,7 @@ function logStateChanged(self)
33502
33507
  end
33503
33508
  end
33504
33509
  DEBUG = false
33505
- CustomReviveState = CustomReviveState or ({})
33510
+ CustomReviveState = {}
33506
33511
  CustomReviveState.DISABLED = 0
33507
33512
  CustomReviveState[CustomReviveState.DISABLED] = "DISABLED"
33508
33513
  CustomReviveState.WAITING_FOR_ROOM_TRANSITION = 1
@@ -39894,7 +39899,7 @@ function getNumFloorLayers(self, roomShape)
39894
39899
  end
39895
39900
  until true
39896
39901
  end
39897
- BackdropKind = BackdropKind or ({})
39902
+ BackdropKind = {}
39898
39903
  BackdropKind.N_FLOOR = "nFloors"
39899
39904
  BackdropKind.L_FLOOR = "lFloors"
39900
39905
  BackdropKind.WALL = "walls"
@@ -47060,7 +47065,7 @@ return ____exports
47060
47065
  ["package"] = function(...)
47061
47066
  return {
47062
47067
  name = "isaacscript-common",
47063
- version = "12.3.0",
47068
+ version = "12.3.2",
47064
47069
  description = "Helper functions and features for IsaacScript mods.",
47065
47070
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
47066
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.0",
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/",
@@ -130,7 +130,7 @@ function logStateChanged(self)
130
130
  end
131
131
  end
132
132
  DEBUG = false
133
- CustomReviveState = CustomReviveState or ({})
133
+ CustomReviveState = {}
134
134
  CustomReviveState.DISABLED = 0
135
135
  CustomReviveState[CustomReviveState.DISABLED] = "DISABLED"
136
136
  CustomReviveState.WAITING_FOR_ROOM_TRANSITION = 1
@@ -149,7 +149,7 @@ function getNumFloorLayers(self, roomShape)
149
149
  end
150
150
  until true
151
151
  end
152
- BackdropKind = BackdropKind or ({})
152
+ BackdropKind = {}
153
153
  BackdropKind.N_FLOOR = "nFloors"
154
154
  BackdropKind.L_FLOOR = "lFloors"
155
155
  BackdropKind.WALL = "walls"
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AA2BrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAelE;AA6KD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AA2BrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAelE;AAqLD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
@@ -124,6 +124,10 @@ function restoreGlowingHourGlassBackup(self)
124
124
  if childTable == nil then
125
125
  goto __continue25
126
126
  end
127
+ local childTableLuaMap = childTable
128
+ if childTableLuaMap[SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_IGNORE_KEY] ~= nil then
129
+ goto __continue25
130
+ end
127
131
  local saveDataGlowingHourGlass = saveDataGlowingHourGlassMap[subscriberName]
128
132
  if saveDataGlowingHourGlass == nil then
129
133
  goto __continue25
@@ -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;;;;;;;;;;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;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAgBxE;AAED;;;;;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.0",
3
+ "version": "12.3.2",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -182,6 +182,14 @@ function restoreGlowingHourGlassBackup() {
182
182
  continue;
183
183
  }
184
184
 
185
+ // Ignore child tables that the end-user has explicitly annotated.
186
+ const childTableLuaMap = childTable as LuaMap<AnyNotNil, unknown>;
187
+ if (
188
+ childTableLuaMap.has(SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_IGNORE_KEY)
189
+ ) {
190
+ continue;
191
+ }
192
+
185
193
  const saveDataGlowingHourGlass =
186
194
  saveDataGlowingHourGlassMap.get(subscriberName);
187
195
  if (saveDataGlowingHourGlass === undefined) {
@@ -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 ? null : new Set(onlyCheckRoomTypes);
496
494
  const rooms = getRoomsInsideGrid();
497
- const matchingRooms =
498
- roomTypeWhitelist === null
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
  }