isaacscript-common 30.2.0 → 30.3.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.
@@ -8303,6 +8303,9 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
8303
8303
  */
8304
8304
  export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
8305
8305
 
8306
+ /** Helper function to check if a given room is visible on the minimap. */
8307
+ export declare function isRoomVisible(roomGridIndex: int): boolean;
8308
+
8306
8309
  /** Returns true for cards that have `CardType.RUNE`. */
8307
8310
  export declare function isRune(cardType: CardType): boolean;
8308
8311
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.2.0
3
+ isaacscript-common 30.3.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -53300,6 +53300,10 @@ function ____exports.hideRoomOnMinimap(self, roomGridIndex)
53300
53300
  minimapAPIRoomDescriptor.Hidden = true
53301
53301
  end
53302
53302
  end
53303
+ function ____exports.isRoomVisible(self, roomGridIndex)
53304
+ local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex)
53305
+ return roomDisplayFlags ~= DisplayFlagZero
53306
+ end
53303
53307
  function ____exports.setFloorDisplayFlags(self, displayFlagsMap)
53304
53308
  for ____, ____value in __TS__Iterator(displayFlagsMap) do
53305
53309
  local roomGridIndex = ____value[1]
@@ -64,6 +64,8 @@ export declare function getRoomDisplayFlags(roomGridIndex?: int, minimapAPI?: bo
64
64
  * This function automatically accounts for whether or not MinimapAPI is being used.
65
65
  */
66
66
  export declare function hideRoomOnMinimap(roomGridIndex: int): void;
67
+ /** Helper function to check if a given room is visible on the minimap. */
68
+ export declare function isRoomVisible(roomGridIndex: int): boolean;
67
69
  /**
68
70
  * Helper function to set the minimap `DisplayFlag` value for every room on the floor at once.
69
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAM5E;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,WAAW,EAAE,WAAW,EACxB,gBAAgB,UAAO,GACtB,IAAI,CAIN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAE9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAO,GAChB,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAUjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,EACnB,UAAU,UAAO,GAChB,QAAQ,CAAC,WAAW,CAAC,CAiBvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAe1D;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAW5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAWN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,EACnC,gBAAgB,UAAO,GACtB,IAAI,CAsBN"}
1
+ {"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MA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
  end
165
+ --- Helper function to check if a given room is visible on the minimap.
166
+ function ____exports.isRoomVisible(self, roomGridIndex)
167
+ local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex)
168
+ return roomDisplayFlags ~= DisplayFlagZero
169
+ end
165
170
  --- Helper function to set the minimap `DisplayFlag` value for multiple rooms at once.
166
171
  --
167
172
  -- This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.2.0",
3
+ "version": "30.3.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -134,6 +134,12 @@ export function hideRoomOnMinimap(roomGridIndex: int): void {
134
134
  }
135
135
  }
136
136
 
137
+ /** Helper function to check if a given room is visible on the minimap. */
138
+ export function isRoomVisible(roomGridIndex: int): boolean {
139
+ const roomDisplayFlags = getRoomDisplayFlags(roomGridIndex);
140
+ return roomDisplayFlags !== DisplayFlagZero;
141
+ }
142
+
137
143
  /**
138
144
  * Helper function to set the minimap `DisplayFlag` value for every room on the floor at once.
139
145
  *