isaacscript-common 30.3.0 → 30.4.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,8 +8303,14 @@ 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;
8306
+ /**
8307
+ * Helper function to check if a given room is visible on the minimap.
8308
+ *
8309
+ * @param roomGridIndex The room to check.
8310
+ * @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
8311
+ * true.
8312
+ */
8313
+ export declare function isRoomVisible(roomGridIndex: int, minimapAPI?: boolean): boolean;
8308
8314
 
8309
8315
  /** Returns true for cards that have `CardType.RUNE`. */
8310
8316
  export declare function isRune(cardType: CardType): boolean;
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.3.0
3
+ isaacscript-common 30.4.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -53300,8 +53300,11 @@ 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)
53303
+ function ____exports.isRoomVisible(self, roomGridIndex, minimapAPI)
53304
+ if minimapAPI == nil then
53305
+ minimapAPI = true
53306
+ end
53307
+ local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
53305
53308
  return roomDisplayFlags ~= DisplayFlagZero
53306
53309
  end
53307
53310
  function ____exports.setFloorDisplayFlags(self, displayFlagsMap)
@@ -64,8 +64,14 @@ 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
+ /**
68
+ * Helper function to check if a given room is visible on the minimap.
69
+ *
70
+ * @param roomGridIndex The room to check.
71
+ * @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
72
+ * true.
73
+ */
74
+ export declare function isRoomVisible(roomGridIndex: int, minimapAPI?: boolean): boolean;
69
75
  /**
70
76
  * Helper function to set the minimap `DisplayFlag` value for every room on the floor at once.
71
77
  *
@@ -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,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,aAAa,EAAE,GAA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a,EAAE,GAAG,EAAE,UAAU,UAAO,GAAG,OAAO,CAG5E;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"}
@@ -163,8 +163,15 @@ function ____exports.hideRoomOnMinimap(self, roomGridIndex)
163
163
  end
164
164
  end
165
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)
166
+ --
167
+ -- @param roomGridIndex The room to check.
168
+ -- @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
169
+ -- true.
170
+ function ____exports.isRoomVisible(self, roomGridIndex, minimapAPI)
171
+ if minimapAPI == nil then
172
+ minimapAPI = true
173
+ end
174
+ local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
168
175
  return roomDisplayFlags ~= DisplayFlagZero
169
176
  end
170
177
  --- Helper function to set the minimap `DisplayFlag` value for multiple rooms at once.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.3.0",
3
+ "version": "30.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -134,9 +134,15 @@ 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);
137
+ /**
138
+ * Helper function to check if a given room is visible on the minimap.
139
+ *
140
+ * @param roomGridIndex The room to check.
141
+ * @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
142
+ * true.
143
+ */
144
+ export function isRoomVisible(roomGridIndex: int, minimapAPI = true): boolean {
145
+ const roomDisplayFlags = getRoomDisplayFlags(roomGridIndex, minimapAPI);
140
146
  return roomDisplayFlags !== DisplayFlagZero;
141
147
  }
142
148