isaacscript-common 1.2.89 → 1.2.90

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.
@@ -171,6 +171,14 @@ export declare function inGenesisRoom(): boolean;
171
171
  * will only work for minibosses that have dedicated boss rooms in the "00.special rooms.stb" file.
172
172
  */
173
173
  export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
174
+ /**
175
+ * Helper function for checking if the room room is a secret shop from the Member Card collectible.
176
+ *
177
+ * Secret shops are simply copies of normal shops but with the backdrop of a secret room. In other
178
+ * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
179
+ * the only way to detect them is by using the grid index.
180
+ */
181
+ export declare function inSecretShop(): boolean;
174
182
  /**
175
183
  * Helper function to determine whether or not the current room is the starting room of a floor.
176
184
  * Only returns true for the starting room of the primary dimension (meaning that being in the
@@ -245,6 +245,9 @@ function ____exports.inMinibossRoomOf(self, minibossID)
245
245
  local roomSubType = ____exports.getRoomSubType(nil)
246
246
  return roomType == RoomType.ROOM_MINIBOSS and roomStageID == 0 and roomSubType == minibossID
247
247
  end
248
+ function ____exports.inSecretShop(self)
249
+ return ____exports.getRoomSafeGridIndex(nil) == GridRooms.ROOM_SECRET_SHOP_IDX
250
+ end
248
251
  function ____exports.inStartingRoom(self)
249
252
  local game = Game()
250
253
  local level = game:GetLevel()
@@ -302,12 +305,12 @@ function ____exports.setRoomCleared(self)
302
305
  for ____, door in ipairs(getDoors(nil)) do
303
306
  do
304
307
  if isHiddenSecretRoomDoor(nil, door) then
305
- goto __continue56
308
+ goto __continue57
306
309
  end
307
310
  openDoorFast(nil, door)
308
311
  door.ExtraVisible = false
309
312
  end
310
- ::__continue56::
313
+ ::__continue57::
311
314
  end
312
315
  sfx:Stop(SoundEffect.SOUND_DOOR_HEAVY_OPEN)
313
316
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.89",
3
+ "version": "1.2.90",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",