isaacscript-common 55.1.1 → 55.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.
@@ -7842,7 +7842,14 @@ export declare function getVoidDoor(): GridEntityDoor | undefined;
7842
7842
  */
7843
7843
  export declare function giveTrinketsBack(player: EntityPlayer, trinketSituation: TrinketSituation | undefined): void;
7844
7844
 
7845
- /** Helper function to directly warp to a specific stage using the "stage" console command. */
7845
+ /**
7846
+ * Helper function to directly warp to a specific stage using the "stage" console command.
7847
+ *
7848
+ * Note that if you use this function on game frame 0, it will confuse the
7849
+ * `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
7850
+ * callbacks. If you are using the function in this situation, remember to call the
7851
+ * `reorderedCallbacksSetStage` function.
7852
+ */
7846
7853
  export declare function goToStage(stage: LevelStage, stageType: StageType): void;
7847
7854
 
7848
7855
  export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
@@ -8189,6 +8196,12 @@ export declare function inAngelShop(): boolean;
8189
8196
  */
8190
8197
  export declare function inBeastRoom(): boolean;
8191
8198
 
8199
+ /**
8200
+ * Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
8201
+ * rooms, and L rooms.
8202
+ */
8203
+ export declare function inBigRoom(): boolean;
8204
+
8192
8205
  /**
8193
8206
  * Helper function to check if the current room is the Boss Room for a particular boss. This will
8194
8207
  * only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -8595,6 +8608,18 @@ export declare function isBeastRoom(roomData: RoomConfig): boolean;
8595
8608
  */
8596
8609
  export declare function isBethany(player: EntityPlayer): boolean;
8597
8610
 
8611
+ /**
8612
+ * Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
8613
+ * rooms, and L rooms.
8614
+ */
8615
+ export declare function isBigRoom(roomData: RoomConfig): boolean;
8616
+
8617
+ /**
8618
+ * Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
8619
+ * 2x2 rooms, and L rooms.
8620
+ */
8621
+ export declare function isBigRoomShape(roomShape: RoomShape): boolean;
8622
+
8598
8623
  /** Helper function to check if something is an instantiated `BitSet128` object. */
8599
8624
  export declare function isBitSet128(object: unknown): object is BitSet128;
8600
8625
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 55.1.1
3
+ isaacscript-common 55.2.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -25893,6 +25893,25 @@ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
25893
25893
  local ____ReadonlySet = require("src.types.ReadonlySet")
25894
25894
  local ReadonlySet = ____ReadonlySet.ReadonlySet
25895
25895
  ____exports.L_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {RoomShape.LTL, RoomShape.LTR, RoomShape.LBL, RoomShape.LBR})
25896
+ return ____exports
25897
+ end,
25898
+ ["src.sets.bigRoomShapesSet"] = function(...)
25899
+ local ____lualib = require("lualib_bundle")
25900
+ local __TS__New = ____lualib.__TS__New
25901
+ local ____exports = {}
25902
+ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
25903
+ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
25904
+ local ____ReadonlySet = require("src.types.ReadonlySet")
25905
+ local ReadonlySet = ____ReadonlySet.ReadonlySet
25906
+ ____exports.BIG_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {
25907
+ RoomShape.SHAPE_1x2,
25908
+ RoomShape.SHAPE_2x1,
25909
+ RoomShape.SHAPE_2x2,
25910
+ RoomShape.LTL,
25911
+ RoomShape.LTR,
25912
+ RoomShape.LBL,
25913
+ RoomShape.LBR
25914
+ })
25896
25915
  return ____exports
25897
25916
  end,
25898
25917
  ["src.sets.narrowRoomShapesSet"] = function(...)
@@ -25928,6 +25947,8 @@ local ____roomShapeVolumes = require("src.objects.roomShapeVolumes")
25928
25947
  local ROOM_SHAPE_VOLUMES = ____roomShapeVolumes.ROOM_SHAPE_VOLUMES
25929
25948
  local ____LRoomShapesSet = require("src.sets.LRoomShapesSet")
25930
25949
  local L_ROOM_SHAPES_SET = ____LRoomShapesSet.L_ROOM_SHAPES_SET
25950
+ local ____bigRoomShapesSet = require("src.sets.bigRoomShapesSet")
25951
+ local BIG_ROOM_SHAPES_SET = ____bigRoomShapesSet.BIG_ROOM_SHAPES_SET
25931
25952
  local ____narrowRoomShapesSet = require("src.sets.narrowRoomShapesSet")
25932
25953
  local NARROW_ROOM_SHAPES_SET = ____narrowRoomShapesSet.NARROW_ROOM_SHAPES_SET
25933
25954
  function ____exports.isRoomShapeDoubleCharge(self, roomShape)
@@ -25961,6 +25982,9 @@ end
25961
25982
  function ____exports.getRoomShapeWidth(self, roomShape)
25962
25983
  return ROOM_SHAPE_TO_GRID_WIDTH[roomShape]
25963
25984
  end
25985
+ function ____exports.isBigRoomShape(self, roomShape)
25986
+ return BIG_ROOM_SHAPES_SET:has(roomShape)
25987
+ end
25964
25988
  function ____exports.isLRoomShape(self, roomShape)
25965
25989
  return L_ROOM_SHAPES_SET:has(roomShape)
25966
25990
  end
@@ -28104,6 +28128,7 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
28104
28128
  local getRoomDescriptorReadOnly = ____roomData.getRoomDescriptorReadOnly
28105
28129
  local getRoomGridIndex = ____roomData.getRoomGridIndex
28106
28130
  local ____roomShape = require("src.functions.roomShape")
28131
+ local isBigRoomShape = ____roomShape.isBigRoomShape
28107
28132
  local isLRoomShape = ____roomShape.isLRoomShape
28108
28133
  local ____roomTransition = require("src.functions.roomTransition")
28109
28134
  local reloadRoom = ____roomTransition.reloadRoom
@@ -28168,6 +28193,9 @@ end
28168
28193
  function ____exports.isBeastRoom(self, roomData)
28169
28194
  return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.BEAST_ROOM)
28170
28195
  end
28196
+ function ____exports.isBigRoom(self, roomData)
28197
+ return isBigRoomShape(nil, roomData.Shape)
28198
+ end
28171
28199
  function ____exports.isBossRoomOf(self, roomData, bossID)
28172
28200
  return roomData.Type == RoomType.BOSS and roomData.StageID == StageID.SPECIAL_ROOMS and roomData.Subtype == asNumber(nil, bossID)
28173
28201
  end
@@ -28302,6 +28330,10 @@ function ____exports.inBeastRoom(self)
28302
28330
  local roomData = getRoomData(nil)
28303
28331
  return ____exports.isBeastRoom(nil, roomData)
28304
28332
  end
28333
+ function ____exports.inBigRoom(self)
28334
+ local roomData = getRoomData(nil)
28335
+ return ____exports.isBigRoom(nil, roomData)
28336
+ end
28305
28337
  function ____exports.inBossRoomOf(self, bossID)
28306
28338
  local roomData = getRoomData(nil)
28307
28339
  return ____exports.isBossRoomOf(nil, roomData, bossID)
@@ -28441,12 +28473,12 @@ function ____exports.setRoomCleared(self)
28441
28473
  for ____, door in ipairs(getDoors(nil)) do
28442
28474
  do
28443
28475
  if isHiddenSecretRoomDoor(nil, door) then
28444
- goto __continue82
28476
+ goto __continue84
28445
28477
  end
28446
28478
  openDoorFast(nil, door)
28447
28479
  door.ExtraVisible = false
28448
28480
  end
28449
- ::__continue82::
28481
+ ::__continue84::
28450
28482
  end
28451
28483
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
28452
28484
  game:ShakeScreen(0)
@@ -58,6 +58,11 @@ export declare function getRoomShapeTopLeftPosition(roomShape: RoomShape): Reado
58
58
  */
59
59
  export declare function getRoomShapeVolume(roomShape: RoomShape): int;
60
60
  export declare function getRoomShapeWidth(roomShape: RoomShape): int;
61
+ /**
62
+ * Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
63
+ * 2x2 rooms, and L rooms.
64
+ */
65
+ export declare function isBigRoomShape(roomShape: RoomShape): boolean;
61
66
  export declare function isLRoomShape(roomShape: RoomShape): boolean;
62
67
  export declare function isNarrowRoom(roomShape: RoomShape): boolean;
63
68
  /**
@@ -1 +1 @@
1
- {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,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAE3D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE5D;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE1D;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAGrE"}
@@ -19,6 +19,8 @@ local ____roomShapeVolumes = require("src.objects.roomShapeVolumes")
19
19
  local ROOM_SHAPE_VOLUMES = ____roomShapeVolumes.ROOM_SHAPE_VOLUMES
20
20
  local ____LRoomShapesSet = require("src.sets.LRoomShapesSet")
21
21
  local L_ROOM_SHAPES_SET = ____LRoomShapesSet.L_ROOM_SHAPES_SET
22
+ local ____bigRoomShapesSet = require("src.sets.bigRoomShapesSet")
23
+ local BIG_ROOM_SHAPES_SET = ____bigRoomShapesSet.BIG_ROOM_SHAPES_SET
22
24
  local ____narrowRoomShapesSet = require("src.sets.narrowRoomShapesSet")
23
25
  local NARROW_ROOM_SHAPES_SET = ____narrowRoomShapesSet.NARROW_ROOM_SHAPES_SET
24
26
  --- Helper function to see if a given room shape will grant a single charge or a double charge to the
@@ -88,6 +90,11 @@ end
88
90
  function ____exports.getRoomShapeWidth(self, roomShape)
89
91
  return ROOM_SHAPE_TO_GRID_WIDTH[roomShape]
90
92
  end
93
+ --- Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
94
+ -- 2x2 rooms, and L rooms.
95
+ function ____exports.isBigRoomShape(self, roomShape)
96
+ return BIG_ROOM_SHAPES_SET:has(roomShape)
97
+ end
91
98
  function ____exports.isLRoomShape(self, roomShape)
92
99
  return L_ROOM_SHAPES_SET:has(roomShape)
93
100
  end
@@ -119,6 +119,11 @@ export declare function inAngelShop(): boolean;
119
119
  * being equal to `DungeonSubType.BEAST_ROOM` (4).
120
120
  */
121
121
  export declare function inBeastRoom(): boolean;
122
+ /**
123
+ * Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
124
+ * rooms, and L rooms.
125
+ */
126
+ export declare function inBigRoom(): boolean;
122
127
  /**
123
128
  * Helper function to check if the current room is the Boss Room for a particular boss. This will
124
129
  * only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -267,6 +272,11 @@ export declare function isAngelShop(roomData: RoomConfig): boolean;
267
272
  * being equal to `DungeonSubType.BEAST_ROOM` (4).
268
273
  */
269
274
  export declare function isBeastRoom(roomData: RoomConfig): boolean;
275
+ /**
276
+ * Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
277
+ * rooms, and L rooms.
278
+ */
279
+ export declare function isBigRoom(roomData: RoomConfig): boolean;
270
280
  /**
271
281
  * Helper function to check if the provided room is the Boss Room for a particular boss. This will
272
282
  * only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -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,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,EAC3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G,OAAO,CAE5D;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"}
@@ -59,6 +59,7 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
59
59
  local getRoomDescriptorReadOnly = ____roomData.getRoomDescriptorReadOnly
60
60
  local getRoomGridIndex = ____roomData.getRoomGridIndex
61
61
  local ____roomShape = require("src.functions.roomShape")
62
+ local isBigRoomShape = ____roomShape.isBigRoomShape
62
63
  local isLRoomShape = ____roomShape.isLRoomShape
63
64
  local ____roomTransition = require("src.functions.roomTransition")
64
65
  local reloadRoom = ____roomTransition.reloadRoom
@@ -156,6 +157,11 @@ end
156
157
  function ____exports.isBeastRoom(self, roomData)
157
158
  return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.BEAST_ROOM)
158
159
  end
160
+ --- Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
161
+ -- rooms, and L rooms.
162
+ function ____exports.isBigRoom(self, roomData)
163
+ return isBigRoomShape(nil, roomData.Shape)
164
+ end
159
165
  --- Helper function to check if the provided room is the Boss Room for a particular boss. This will
160
166
  -- only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
161
167
  function ____exports.isBossRoomOf(self, roomData, bossID)
@@ -409,6 +415,12 @@ function ____exports.inBeastRoom(self)
409
415
  local roomData = getRoomData(nil)
410
416
  return ____exports.isBeastRoom(nil, roomData)
411
417
  end
418
+ --- Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
419
+ -- rooms, and L rooms.
420
+ function ____exports.inBigRoom(self)
421
+ local roomData = getRoomData(nil)
422
+ return ____exports.isBigRoom(nil, roomData)
423
+ end
412
424
  --- Helper function to check if the current room is the Boss Room for a particular boss. This will
413
425
  -- only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
414
426
  function ____exports.inBossRoomOf(self, bossID)
@@ -632,12 +644,12 @@ function ____exports.setRoomCleared(self)
632
644
  for ____, door in ipairs(getDoors(nil)) do
633
645
  do
634
646
  if isHiddenSecretRoomDoor(nil, door) then
635
- goto __continue82
647
+ goto __continue84
636
648
  end
637
649
  openDoorFast(nil, door)
638
650
  door.ExtraVisible = false
639
651
  end
640
- ::__continue82::
652
+ ::__continue84::
641
653
  end
642
654
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
643
655
  game:ShakeScreen(0)
@@ -54,7 +54,14 @@ export declare function getStage(): LevelStage;
54
54
  export declare function getStageID(stage?: LevelStage, stageType?: StageType): StageID;
55
55
  /** Alias for the `Level.GetStageType` method. */
56
56
  export declare function getStageType(): StageType;
57
- /** Helper function to directly warp to a specific stage using the "stage" console command. */
57
+ /**
58
+ * Helper function to directly warp to a specific stage using the "stage" console command.
59
+ *
60
+ * Note that if you use this function on game frame 0, it will confuse the
61
+ * `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
62
+ * callbacks. If you are using the function in this situation, remember to call the
63
+ * `reorderedCallbacksSetStage` function.
64
+ */
58
65
  export declare function goToStage(stage: LevelStage, stageType: StageType): void;
59
66
  /**
60
67
  * Returns whether the provided stage and stage type represent a "final floor". This is defined as a
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;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CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -158,6 +158,11 @@ function ____exports.getStageType(self)
158
158
  return level:GetStageType()
159
159
  end
160
160
  --- Helper function to directly warp to a specific stage using the "stage" console command.
161
+ --
162
+ -- Note that if you use this function on game frame 0, it will confuse the
163
+ -- `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
164
+ -- callbacks. If you are using the function in this situation, remember to call the
165
+ -- `reorderedCallbacksSetStage` function.
161
166
  function ____exports.goToStage(self, stage, stageType)
162
167
  local stageTypeLetterSuffix = ____exports.stageTypeToLetter(nil, stageType)
163
168
  local command = ("stage " .. tostring(stage)) .. stageTypeLetterSuffix
@@ -0,0 +1,3 @@
1
+ import { RoomShape } from "isaac-typescript-definitions";
2
+ export declare const BIG_ROOM_SHAPES_SET: ReadonlySet<RoomShape>;
3
+ //# sourceMappingURL=bigRoomShapesSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bigRoomShapesSet.d.ts","sourceRoot":"","sources":["../../../src/sets/bigRoomShapesSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,eAAO,MAAM,mBAAmB,wBAQ9B,CAAC"}
@@ -0,0 +1,17 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__New = ____lualib.__TS__New
3
+ local ____exports = {}
4
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
5
+ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
6
+ local ____ReadonlySet = require("src.types.ReadonlySet")
7
+ local ReadonlySet = ____ReadonlySet.ReadonlySet
8
+ ____exports.BIG_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {
9
+ RoomShape.SHAPE_1x2,
10
+ RoomShape.SHAPE_2x1,
11
+ RoomShape.SHAPE_2x2,
12
+ RoomShape.LTL,
13
+ RoomShape.LTR,
14
+ RoomShape.LBL,
15
+ RoomShape.LBR
16
+ })
17
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "55.1.1",
3
+ "version": "55.2.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -10,6 +10,7 @@ import { ROOM_SHAPE_TO_GRID_WIDTH } from "../objects/roomShapeToGridWidth";
10
10
  import { ROOM_SHAPE_TO_TOP_LEFT_POSITION } from "../objects/roomShapeToTopLeftPosition";
11
11
  import { ROOM_SHAPE_VOLUMES } from "../objects/roomShapeVolumes";
12
12
  import { L_ROOM_SHAPES_SET } from "../sets/LRoomShapesSet";
13
+ import { BIG_ROOM_SHAPES_SET } from "../sets/bigRoomShapesSet";
13
14
  import { NARROW_ROOM_SHAPES_SET } from "../sets/narrowRoomShapesSet";
14
15
 
15
16
  /**
@@ -109,6 +110,14 @@ export function getRoomShapeWidth(roomShape: RoomShape): int {
109
110
  return ROOM_SHAPE_TO_GRID_WIDTH[roomShape];
110
111
  }
111
112
 
113
+ /**
114
+ * Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
115
+ * 2x2 rooms, and L rooms.
116
+ */
117
+ export function isBigRoomShape(roomShape: RoomShape): boolean {
118
+ return BIG_ROOM_SHAPES_SET.has(roomShape);
119
+ }
120
+
112
121
  export function isLRoomShape(roomShape: RoomShape): boolean {
113
122
  return L_ROOM_SHAPES_SET.has(roomShape);
114
123
  }
@@ -45,7 +45,7 @@ import {
45
45
  getRoomDescriptorReadOnly,
46
46
  getRoomGridIndex,
47
47
  } from "./roomData";
48
- import { isLRoomShape } from "./roomShape";
48
+ import { isBigRoomShape, isLRoomShape } from "./roomShape";
49
49
  import { reloadRoom } from "./roomTransition";
50
50
  import { getGotoCommand } from "./stage";
51
51
  import { asNumber } from "./types";
@@ -318,6 +318,15 @@ export function inBeastRoom(): boolean {
318
318
  return isBeastRoom(roomData);
319
319
  }
320
320
 
321
+ /**
322
+ * Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
323
+ * rooms, and L rooms.
324
+ */
325
+ export function inBigRoom(): boolean {
326
+ const roomData = getRoomData();
327
+ return isBigRoom(roomData);
328
+ }
329
+
321
330
  /**
322
331
  * Helper function to check if the current room is the Boss Room for a particular boss. This will
323
332
  * only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -601,6 +610,14 @@ export function isBeastRoom(roomData: RoomConfig): boolean {
601
610
  );
602
611
  }
603
612
 
613
+ /**
614
+ * Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
615
+ * rooms, and L rooms.
616
+ */
617
+ export function isBigRoom(roomData: RoomConfig): boolean {
618
+ return isBigRoomShape(roomData.Shape);
619
+ }
620
+
604
621
  /**
605
622
  * Helper function to check if the provided room is the Boss Room for a particular boss. This will
606
623
  * only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -181,7 +181,14 @@ export function getStageType(): StageType {
181
181
  return level.GetStageType();
182
182
  }
183
183
 
184
- /** Helper function to directly warp to a specific stage using the "stage" console command. */
184
+ /**
185
+ * Helper function to directly warp to a specific stage using the "stage" console command.
186
+ *
187
+ * Note that if you use this function on game frame 0, it will confuse the
188
+ * `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
189
+ * callbacks. If you are using the function in this situation, remember to call the
190
+ * `reorderedCallbacksSetStage` function.
191
+ */
185
192
  export function goToStage(stage: LevelStage, stageType: StageType): void {
186
193
  const stageTypeLetterSuffix = stageTypeToLetter(stageType);
187
194
  const command = `stage ${stage}${stageTypeLetterSuffix}`;
@@ -0,0 +1,12 @@
1
+ import { RoomShape } from "isaac-typescript-definitions";
2
+ import { ReadonlySet } from "../types/ReadonlySet";
3
+
4
+ export const BIG_ROOM_SHAPES_SET = new ReadonlySet<RoomShape>([
5
+ RoomShape.SHAPE_1x2, // 4
6
+ RoomShape.SHAPE_2x1, // 6
7
+ RoomShape.SHAPE_2x2, // 8
8
+ RoomShape.LTL, // 9
9
+ RoomShape.LTR, // 10
10
+ RoomShape.LBL, // 11
11
+ RoomShape.LBR, // 12
12
+ ]);