isaacscript-common 9.6.0 → 9.7.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.
@@ -145,7 +145,13 @@ export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
145
145
  */
146
146
  export declare function inMirrorRoom(): boolean;
147
147
  /**
148
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
148
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
149
+ * floor.
150
+ */
151
+ export declare function inSecretExit(): boolean;
152
+ /**
153
+ * Helper function for checking if the current room is a secret shop (from the Member Card
154
+ * collectible).
149
155
  *
150
156
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
151
157
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
@@ -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,YAAY,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE1D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ACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -335,7 +335,14 @@ function ____exports.inMirrorRoom(self)
335
335
  local roomSubType = getRoomSubType(nil)
336
336
  return roomType == RoomType.DEFAULT and (roomStageID == StageID.DOWNPOUR or roomStageID == StageID.DROSS) and roomSubType == asNumber(nil, DownpourRoomSubType.MIRROR)
337
337
  end
338
- --- Helper function for checking if the room is a secret shop (from the Member Card collectible).
338
+ --- Helper function for checking if the current room is a secret exit that leads to a Repentance
339
+ -- floor.
340
+ function ____exports.inSecretExit(self)
341
+ local roomGridIndex = getRoomGridIndex(nil)
342
+ return roomGridIndex == asNumber(nil, GridRoom.SECRET_EXIT)
343
+ end
344
+ --- Helper function for checking if the current room is a secret shop (from the Member Card
345
+ -- collectible).
339
346
  --
340
347
  -- Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
341
348
  -- words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
@@ -409,12 +416,12 @@ function ____exports.setRoomCleared(self)
409
416
  for ____, door in ipairs(getDoors(nil)) do
410
417
  do
411
418
  if isHiddenSecretRoomDoor(nil, door) then
412
- goto __continue49
419
+ goto __continue50
413
420
  end
414
421
  openDoorFast(nil, door)
415
422
  door.ExtraVisible = false
416
423
  end
417
- ::__continue49::
424
+ ::__continue50::
418
425
  end
419
426
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
420
427
  game:ShakeScreen(0)
package/dist/index.d.ts CHANGED
@@ -5472,7 +5472,14 @@ export declare function inMirrorRoom(): boolean;
5472
5472
  export declare function inRectangle(position: Vector, topLeft: Vector, bottomRight: Vector): boolean;
5473
5473
 
5474
5474
  /**
5475
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
5475
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
5476
+ * floor.
5477
+ */
5478
+ export declare function inSecretExit(): boolean;
5479
+
5480
+ /**
5481
+ * Helper function for checking if the current room is a secret shop (from the Member Card
5482
+ * collectible).
5476
5483
  *
5477
5484
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
5478
5485
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "9.6.0",
3
+ "version": "9.7.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -445,7 +445,18 @@ export function inMirrorRoom(): boolean {
445
445
  }
446
446
 
447
447
  /**
448
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
448
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
449
+ * floor.
450
+ */
451
+ export function inSecretExit(): boolean {
452
+ const roomGridIndex = getRoomGridIndex();
453
+
454
+ return roomGridIndex === asNumber(GridRoom.SECRET_EXIT);
455
+ }
456
+
457
+ /**
458
+ * Helper function for checking if the current room is a secret shop (from the Member Card
459
+ * collectible).
449
460
  *
450
461
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
451
462
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,