isaacscript-common 51.4.0 → 51.5.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.
@@ -8120,6 +8120,12 @@ export declare function includes<T>(array: T[], element: T): boolean;
8120
8120
  */
8121
8121
  export declare function inCrawlSpace(): boolean;
8122
8122
 
8123
+ /**
8124
+ * Helper function for checking whether the current room is a crawl space with a door corresponding
8125
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
8126
+ */
8127
+ export declare function inCrawlSpaceWithBlackMarketEntrance(): boolean;
8128
+
8123
8129
  /**
8124
8130
  * Helper type to add one to a number type.
8125
8131
  *
@@ -8714,6 +8720,12 @@ export declare function isCopyableIsaacAPIClass(object: unknown): object is Copy
8714
8720
  */
8715
8721
  export declare function isCrawlSpace(roomData: RoomConfig): boolean;
8716
8722
 
8723
+ /**
8724
+ * Helper function for checking whether the provided room is a crawl space with a door corresponding
8725
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
8726
+ */
8727
+ export declare function isCrawlSpaceWithBlackMarketEntrance(roomData: RoomConfig): boolean;
8728
+
8717
8729
  /**
8718
8730
  * Helper function to distinguish between a normal Daddy Long Legs / Triachnid and the child entity
8719
8731
  * that is spawned when the boss does the multi-stomp attack.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 51.4.0
3
+ isaacscript-common 51.5.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -27887,6 +27887,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
27887
27887
  local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
27888
27888
  local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
27889
27889
  local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
27890
+ local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
27890
27891
  local DownpourRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.DownpourRoomSubType
27891
27892
  local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
27892
27893
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
@@ -28000,6 +28001,9 @@ end
28000
28001
  function ____exports.isCrawlSpace(self, roomData)
28001
28002
  return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.NORMAL)
28002
28003
  end
28004
+ function ____exports.isCrawlSpaceWithBlackMarketEntrance(self, roomData)
28005
+ return ____exports.isCrawlSpace(nil, roomData) and hasFlag(nil, roomData.Doors, DoorSlotFlag.RIGHT_0)
28006
+ end
28003
28007
  function ____exports.isDeathCertificateArea(self, roomData)
28004
28008
  return roomData.StageID == StageID.HOME and (roomData.Subtype == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE) or roomData.Subtype == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ITEMS))
28005
28009
  end
@@ -28130,6 +28134,10 @@ function ____exports.inCrawlSpace(self)
28130
28134
  local roomData = getRoomData(nil)
28131
28135
  return ____exports.isCrawlSpace(nil, roomData)
28132
28136
  end
28137
+ function ____exports.inCrawlSpaceWithBlackMarketEntrance(self)
28138
+ local roomData = getRoomData(nil)
28139
+ return ____exports.isCrawlSpaceWithBlackMarketEntrance(nil, roomData)
28140
+ end
28133
28141
  function ____exports.inDeathCertificateArea(self)
28134
28142
  local roomData = getRoomData(nil)
28135
28143
  return ____exports.isDeathCertificateArea(nil, roomData)
@@ -28253,12 +28261,12 @@ function ____exports.setRoomCleared(self)
28253
28261
  for ____, door in ipairs(getDoors(nil)) do
28254
28262
  do
28255
28263
  if isHiddenSecretRoomDoor(nil, door) then
28256
- goto __continue78
28264
+ goto __continue80
28257
28265
  end
28258
28266
  openDoorFast(nil, door)
28259
28267
  door.ExtraVisible = false
28260
28268
  end
28261
- ::__continue78::
28269
+ ::__continue80::
28262
28270
  end
28263
28271
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
28264
28272
  game:ShakeScreen(0)
@@ -121,6 +121,11 @@ export declare function inBossRoomOf(bossID: BossID): boolean;
121
121
  * player being in a boss fight that takes place in a dungeon.
122
122
  */
123
123
  export declare function inCrawlSpace(): boolean;
124
+ /**
125
+ * Helper function for checking whether the current room is a crawl space with a door corresponding
126
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
127
+ */
128
+ export declare function inCrawlSpaceWithBlackMarketEntrance(): boolean;
124
129
  /**
125
130
  * Helper function to detect if the current room is one of the rooms in the Death Certificate area.
126
131
  */
@@ -241,6 +246,11 @@ export declare function isBossRoomOf(roomData: RoomConfig, bossID: BossID): bool
241
246
  * the player being in a boss fight that takes place in a dungeon.
242
247
  */
243
248
  export declare function isCrawlSpace(roomData: RoomConfig): boolean;
249
+ /**
250
+ * Helper function for checking whether the provided room is a crawl space with a door corresponding
251
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
252
+ */
253
+ export declare function isCrawlSpaceWithBlackMarketEntrance(roomData: RoomConfig): boolean;
244
254
  /**
245
255
  * Helper function to detect if the provided room is one of the rooms in the Death Certificate area.
246
256
  */
@@ -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,EAOT,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;;;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UAAU,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAEvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAOzD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,UAAU,EACpB,UAAU,EAAE,UAAU,GACrB,OAAO,CAMT;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAO1D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,UAAU,EACpB,GAAG,UAAU,EAAE,SAAS,EAAE,GACzB,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,UAAU,EACpB,GAAG,SAAS,EAAE,QAAQ,EAAE,GACvB,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAEpE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,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"}
@@ -15,6 +15,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
15
15
  local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
16
16
  local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
17
17
  local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
18
+ local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
18
19
  local DownpourRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.DownpourRoomSubType
19
20
  local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
20
21
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
@@ -159,6 +160,11 @@ end
159
160
  function ____exports.isCrawlSpace(self, roomData)
160
161
  return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.NORMAL)
161
162
  end
163
+ --- Helper function for checking whether the provided room is a crawl space with a door corresponding
164
+ -- to `DoorSlotFlag.RIGHT_0` (1 << 2).
165
+ function ____exports.isCrawlSpaceWithBlackMarketEntrance(self, roomData)
166
+ return ____exports.isCrawlSpace(nil, roomData) and hasFlag(nil, roomData.Doors, DoorSlotFlag.RIGHT_0)
167
+ end
162
168
  --- Helper function to detect if the provided room is one of the rooms in the Death Certificate area.
163
169
  function ____exports.isDeathCertificateArea(self, roomData)
164
170
  return roomData.StageID == StageID.HOME and (roomData.Subtype == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE) or roomData.Subtype == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ITEMS))
@@ -388,6 +394,12 @@ function ____exports.inCrawlSpace(self)
388
394
  local roomData = getRoomData(nil)
389
395
  return ____exports.isCrawlSpace(nil, roomData)
390
396
  end
397
+ --- Helper function for checking whether the current room is a crawl space with a door corresponding
398
+ -- to `DoorSlotFlag.RIGHT_0` (1 << 2).
399
+ function ____exports.inCrawlSpaceWithBlackMarketEntrance(self)
400
+ local roomData = getRoomData(nil)
401
+ return ____exports.isCrawlSpaceWithBlackMarketEntrance(nil, roomData)
402
+ end
391
403
  --- Helper function to detect if the current room is one of the rooms in the Death Certificate area.
392
404
  function ____exports.inDeathCertificateArea(self)
393
405
  local roomData = getRoomData(nil)
@@ -577,12 +589,12 @@ function ____exports.setRoomCleared(self)
577
589
  for ____, door in ipairs(getDoors(nil)) do
578
590
  do
579
591
  if isHiddenSecretRoomDoor(nil, door) then
580
- goto __continue78
592
+ goto __continue80
581
593
  end
582
594
  openDoorFast(nil, door)
583
595
  door.ExtraVisible = false
584
596
  end
585
- ::__continue78::
597
+ ::__continue80::
586
598
  end
587
599
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
588
600
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "51.4.0",
3
+ "version": "51.5.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -8,6 +8,7 @@ import {
8
8
  AngelRoomSubType,
9
9
  Dimension,
10
10
  DoorSlot,
11
+ DoorSlotFlag,
11
12
  DownpourRoomSubType,
12
13
  DungeonSubType,
13
14
  GridRoom,
@@ -327,6 +328,15 @@ export function inCrawlSpace(): boolean {
327
328
  return isCrawlSpace(roomData);
328
329
  }
329
330
 
331
+ /**
332
+ * Helper function for checking whether the current room is a crawl space with a door corresponding
333
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
334
+ */
335
+ export function inCrawlSpaceWithBlackMarketEntrance(): boolean {
336
+ const roomData = getRoomData();
337
+ return isCrawlSpaceWithBlackMarketEntrance(roomData);
338
+ }
339
+
330
340
  /**
331
341
  * Helper function to detect if the current room is one of the rooms in the Death Certificate area.
332
342
  */
@@ -579,6 +589,18 @@ export function isCrawlSpace(roomData: RoomConfig): boolean {
579
589
  );
580
590
  }
581
591
 
592
+ /**
593
+ * Helper function for checking whether the provided room is a crawl space with a door corresponding
594
+ * to `DoorSlotFlag.RIGHT_0` (1 << 2).
595
+ */
596
+ export function isCrawlSpaceWithBlackMarketEntrance(
597
+ roomData: RoomConfig,
598
+ ): boolean {
599
+ return (
600
+ isCrawlSpace(roomData) && hasFlag(roomData.Doors, DoorSlotFlag.RIGHT_0)
601
+ );
602
+ }
603
+
582
604
  /**
583
605
  * Helper function to detect if the provided room is one of the rooms in the Death Certificate area.
584
606
  */