isaacscript-common 27.7.0 → 27.8.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.
@@ -8167,9 +8167,18 @@ export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack
8167
8167
  * This refers to the hole in the wall that appears after bombing the entrance to a secret room.
8168
8168
  * Note that the door still exists before it has been bombed open. It has a sprite filename of
8169
8169
  * "gfx/grid/door_08_holeinwall.anm2".
8170
+ *
8171
+ * Note that since Ultra Secret Rooms do not use holes, this function will not detect an Ultra
8172
+ * Secret Room door.
8170
8173
  */
8171
8174
  export declare function isSecretRoomDoor(door: GridEntityDoor): boolean;
8172
8175
 
8176
+ /**
8177
+ * Helper function to detect if a room type is a Secret Room, a Super Secret Room, or an Ultra
8178
+ * Secret Room.
8179
+ */
8180
+ export declare function isSecretRoomType(roomType: RoomType): boolean;
8181
+
8173
8182
  /**
8174
8183
  * Helper function to determine whether damage to a player in the `ENTITY_TAKE_DMG` callback was
8175
8184
  * self-inflicted. For example, damage from a Curse Room door, a Razor, or a Blood Donation Machine
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 27.7.0
3
+ isaacscript-common 27.8.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -26614,11 +26614,11 @@ return ____exports
26614
26614
  end,
26615
26615
  ["src.functions.rooms"] = function(...)
26616
26616
  local ____lualib = require("lualib_bundle")
26617
+ local __TS__New = ____lualib.__TS__New
26617
26618
  local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
26618
26619
  local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
26619
26620
  local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
26620
26621
  local Map = ____lualib.Map
26621
- local __TS__New = ____lualib.__TS__New
26622
26622
  local __TS__Spread = ____lualib.__TS__Spread
26623
26623
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
26624
26624
  local __TS__ArrayMap = ____lualib.__TS__ArrayMap
@@ -26729,6 +26729,7 @@ function ____exports.getRoomsOutsideGrid(self)
26729
26729
  function(____, readOnlyRoomDescriptor) return getRoomDescriptor(nil, readOnlyRoomDescriptor.SafeGridIndex) end
26730
26730
  )
26731
26731
  end
26732
+ local SECRET_ROOM_TYPES = __TS__New(ReadonlySet, {RoomType.SECRET, RoomType.SUPER_SECRET, RoomType.ULTRA_SECRET})
26732
26733
  function ____exports.changeRoom(self, roomGridIndex)
26733
26734
  local level = game:GetLevel()
26734
26735
  local roomData = getRoomData(nil, roomGridIndex)
@@ -26915,6 +26916,9 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
26915
26916
  function(____, roomDescriptor) return roomDescriptor.Clear end
26916
26917
  )
26917
26918
  end
26919
+ function ____exports.isSecretRoomType(self, roomType)
26920
+ return SECRET_ROOM_TYPES:has(roomType)
26921
+ end
26918
26922
  function ____exports.roomUpdateSafe(self)
26919
26923
  local room = game:GetRoom()
26920
26924
  local entities = getEntities(nil)
@@ -26938,12 +26942,12 @@ function ____exports.setRoomCleared(self)
26938
26942
  for ____, door in ipairs(getDoors(nil)) do
26939
26943
  do
26940
26944
  if isHiddenSecretRoomDoor(nil, door) then
26941
- goto __continue55
26945
+ goto __continue56
26942
26946
  end
26943
26947
  openDoorFast(nil, door)
26944
26948
  door.ExtraVisible = false
26945
26949
  end
26946
- ::__continue55::
26950
+ ::__continue56::
26947
26951
  end
26948
26952
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
26949
26953
  game:ShakeScreen(0)
@@ -45862,6 +45866,7 @@ local getRoomShape = ____roomData.getRoomShape
45862
45866
  local ____rooms = require("src.functions.rooms")
45863
45867
  local getRooms = ____rooms.getRooms
45864
45868
  local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
45869
+ local isSecretRoomType = ____rooms.isSecretRoomType
45865
45870
  local ____roomShape = require("src.functions.roomShape")
45866
45871
  local getGridIndexDelta = ____roomShape.getGridIndexDelta
45867
45872
  local ____types = require("src.functions.types")
@@ -46091,7 +46096,7 @@ function ____exports.newRoom(self, seedOrRNG)
46091
46096
  local hasCompass = level:GetStateFlag(LevelStateFlag.COMPASS_EFFECT)
46092
46097
  local hasBlueMap = level:GetStateFlag(LevelStateFlag.BLUE_MAP_EFFECT)
46093
46098
  local roomType = roomData.Type
46094
- local isSecretRoom = roomType == RoomType.SECRET or roomType == RoomType.SUPER_SECRET
46099
+ local isSecretRoom = isSecretRoomType(nil, roomType)
46095
46100
  if hasFullMap then
46096
46101
  roomDescriptor.DisplayFlags = ALL_DISPLAY_FLAGS
46097
46102
  elseif not isSecretRoom and hasCompass then
@@ -135,6 +135,9 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
135
135
  * This refers to the hole in the wall that appears after bombing the entrance to a secret room.
136
136
  * Note that the door still exists before it has been bombed open. It has a sprite filename of
137
137
  * "gfx/grid/door_08_holeinwall.anm2".
138
+ *
139
+ * Note that since Ultra Secret Rooms do not use holes, this function will not detect an Ultra
140
+ * Secret Room door.
138
141
  */
139
142
  export declare function isSecretRoomDoor(door: GridEntityDoor): boolean;
140
143
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAKZ,SAAS,EACT,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,S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;;;;;;;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;;;;;;GAMG;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"}
@@ -104,6 +104,9 @@ end
104
104
  --- This refers to the hole in the wall that appears after bombing the entrance to a secret room.
105
105
  -- Note that the door still exists before it has been bombed open. It has a sprite filename of
106
106
  -- "gfx/grid/door_08_holeinwall.anm2".
107
+ --
108
+ -- Note that since Ultra Secret Rooms do not use holes, this function will not detect an Ultra
109
+ -- Secret Room door.
107
110
  function ____exports.isSecretRoomDoor(self, door)
108
111
  local sprite = door:GetSprite()
109
112
  local fileName = sprite:GetFilename()
@@ -1 +1 @@
1
- {"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AA+BtC;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,CAAC,EAAE,GAAG,GAClB,GAAG,EAAE,CAKP;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAA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getRoomShape
45
45
  local ____rooms = require("src.functions.rooms")
46
46
  local getRooms = ____rooms.getRooms
47
47
  local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
48
+ local isSecretRoomType = ____rooms.isSecretRoomType
48
49
  local ____roomShape = require("src.functions.roomShape")
49
50
  local getGridIndexDelta = ____roomShape.getGridIndexDelta
50
51
  local ____types = require("src.functions.types")
@@ -394,7 +395,7 @@ function ____exports.newRoom(self, seedOrRNG)
394
395
  local hasCompass = level:GetStateFlag(LevelStateFlag.COMPASS_EFFECT)
395
396
  local hasBlueMap = level:GetStateFlag(LevelStateFlag.BLUE_MAP_EFFECT)
396
397
  local roomType = roomData.Type
397
- local isSecretRoom = roomType == RoomType.SECRET or roomType == RoomType.SUPER_SECRET
398
+ local isSecretRoom = isSecretRoomType(nil, roomType)
398
399
  if hasFullMap then
399
400
  roomDescriptor.DisplayFlags = ALL_DISPLAY_FLAGS
400
401
  elseif not isSecretRoom and hasCompass then
@@ -190,6 +190,11 @@ export declare function inStartingRoom(): boolean;
190
190
  * checked. Undefined by default.
191
191
  */
192
192
  export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean;
193
+ /**
194
+ * Helper function to detect if a room type is a Secret Room, a Super Secret Room, or an Ultra
195
+ * Secret Room.
196
+ */
197
+ export declare function isSecretRoomType(roomType: RoomType): boolean;
193
198
  /**
194
199
  * If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
195
200
  * slide around (such as the player). Since those entity velocities are already at zero, setting
@@ -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,EAEZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAmCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH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C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,+FAA+F;AAC/F,wBAAgB,OAAO,IAAI,OAAO,CAUjC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;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;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;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"}
@@ -1,9 +1,9 @@
1
1
  local ____lualib = require("lualib_bundle")
2
+ local __TS__New = ____lualib.__TS__New
2
3
  local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
3
4
  local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
4
5
  local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
5
6
  local Map = ____lualib.Map
6
- local __TS__New = ____lualib.__TS__New
7
7
  local __TS__Spread = ____lualib.__TS__Spread
8
8
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
9
9
  local __TS__ArrayMap = ____lualib.__TS__ArrayMap
@@ -136,6 +136,7 @@ function ____exports.getRoomsOutsideGrid(self)
136
136
  function(____, readOnlyRoomDescriptor) return getRoomDescriptor(nil, readOnlyRoomDescriptor.SafeGridIndex) end
137
137
  )
138
138
  end
139
+ local SECRET_ROOM_TYPES = __TS__New(ReadonlySet, {RoomType.SECRET, RoomType.SUPER_SECRET, RoomType.ULTRA_SECRET})
139
140
  --- Helper function for quickly switching to a new room without playing a particular animation. Use
140
141
  -- this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
141
142
  -- not forget to set the `LeaveDoor` field and to prevent crashing on invalid room grid indexes.
@@ -415,6 +416,11 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
415
416
  function(____, roomDescriptor) return roomDescriptor.Clear end
416
417
  )
417
418
  end
419
+ --- Helper function to detect if a room type is a Secret Room, a Super Secret Room, or an Ultra
420
+ -- Secret Room.
421
+ function ____exports.isSecretRoomType(self, roomType)
422
+ return SECRET_ROOM_TYPES:has(roomType)
423
+ end
418
424
  --- If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
419
425
  -- slide around (such as the player). Since those entity velocities are already at zero, setting
420
426
  -- them to zero will have no effect. Thus, a generic solution is to record all of the entity
@@ -446,12 +452,12 @@ function ____exports.setRoomCleared(self)
446
452
  for ____, door in ipairs(getDoors(nil)) do
447
453
  do
448
454
  if isHiddenSecretRoomDoor(nil, door) then
449
- goto __continue55
455
+ goto __continue56
450
456
  end
451
457
  openDoorFast(nil, door)
452
458
  door.ExtraVisible = false
453
459
  end
454
- ::__continue55::
460
+ ::__continue56::
455
461
  end
456
462
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
457
463
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "27.7.0",
3
+ "version": "27.8.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -430,6 +430,9 @@ export function isRepentanceDoor(door: GridEntityDoor): boolean {
430
430
  * This refers to the hole in the wall that appears after bombing the entrance to a secret room.
431
431
  * Note that the door still exists before it has been bombed open. It has a sprite filename of
432
432
  * "gfx/grid/door_08_holeinwall.anm2".
433
+ *
434
+ * Note that since Ultra Secret Rooms do not use holes, this function will not detect an Ultra
435
+ * Secret Room door.
433
436
  */
434
437
  export function isSecretRoomDoor(door: GridEntityDoor): boolean {
435
438
  const sprite = door.GetSprite();
@@ -36,7 +36,7 @@ import {
36
36
  getRoomGridIndex,
37
37
  getRoomShape,
38
38
  } from "./roomData";
39
- import { getRooms, getRoomsInsideGrid } from "./rooms";
39
+ import { getRooms, getRoomsInsideGrid, isSecretRoomType } from "./rooms";
40
40
  import { getGridIndexDelta } from "./roomShape";
41
41
  import { asNumber } from "./types";
42
42
 
@@ -512,8 +512,7 @@ export function newRoom(seedOrRNG?: Seed | RNG): int | undefined {
512
512
  const hasCompass = level.GetStateFlag(LevelStateFlag.COMPASS_EFFECT);
513
513
  const hasBlueMap = level.GetStateFlag(LevelStateFlag.BLUE_MAP_EFFECT);
514
514
  const roomType = roomData.Type;
515
- const isSecretRoom =
516
- roomType === RoomType.SECRET || roomType === RoomType.SUPER_SECRET;
515
+ const isSecretRoom = isSecretRoomType(roomType);
517
516
 
518
517
  if (hasFullMap) {
519
518
  roomDescriptor.DisplayFlags = ALL_DISPLAY_FLAGS;
@@ -51,6 +51,12 @@ import { getGotoCommand } from "./stage";
51
51
  import { asNumber } from "./types";
52
52
  import { iRange } from "./utils";
53
53
 
54
+ const SECRET_ROOM_TYPES = new ReadonlySet([
55
+ RoomType.SECRET,
56
+ RoomType.SUPER_SECRET,
57
+ RoomType.ULTRA_SECRET,
58
+ ]);
59
+
54
60
  /**
55
61
  * Helper function for quickly switching to a new room without playing a particular animation. Use
56
62
  * this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
@@ -547,6 +553,14 @@ export function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean {
547
553
  return matchingRooms.every((roomDescriptor) => roomDescriptor.Clear);
548
554
  }
549
555
 
556
+ /**
557
+ * Helper function to detect if a room type is a Secret Room, a Super Secret Room, or an Ultra
558
+ * Secret Room.
559
+ */
560
+ export function isSecretRoomType(roomType: RoomType): boolean {
561
+ return SECRET_ROOM_TYPES.has(roomType);
562
+ }
563
+
550
564
  /**
551
565
  * If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
552
566
  * slide around (such as the player). Since those entity velocities are already at zero, setting