isaacscript-common 29.8.0 → 29.10.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.
- package/dist/index.rollup.d.ts +10 -2
- package/dist/isaacscript-common.lua +15 -5
- package/dist/src/functions/logMisc.d.ts +3 -1
- package/dist/src/functions/logMisc.d.ts.map +1 -1
- package/dist/src/functions/logMisc.lua +5 -0
- package/dist/src/functions/minimap.d.ts +7 -2
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +15 -4
- package/package.json +1 -1
- package/src/functions/logMisc.ts +9 -0
- package/src/functions/minimap.ts +11 -3
package/dist/index.rollup.d.ts
CHANGED
|
@@ -5106,8 +5106,11 @@ export declare function getFlagName<T extends BitFlag | BitFlag128>(flag: BitFla
|
|
|
5106
5106
|
* that is indexed by the room's safe grid index.
|
|
5107
5107
|
*
|
|
5108
5108
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
5109
|
+
*
|
|
5110
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
5111
|
+
* true.
|
|
5109
5112
|
*/
|
|
5110
|
-
export declare function getFloorDisplayFlags(): Map<int, BitFlags<DisplayFlag>>;
|
|
5113
|
+
export declare function getFloorDisplayFlags(minimapAPI?: boolean): Map<int, BitFlags<DisplayFlag>>;
|
|
5111
5114
|
|
|
5112
5115
|
/**
|
|
5113
5116
|
* Helper function to get the corresponding golden trinket type from a normal trinket type.
|
|
@@ -6312,8 +6315,10 @@ export declare function getRoomDescriptorsForType(...roomTypes: RoomType[]): Roo
|
|
|
6312
6315
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
6313
6316
|
*
|
|
6314
6317
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
6318
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
6319
|
+
* true.
|
|
6315
6320
|
*/
|
|
6316
|
-
export declare function getRoomDisplayFlags(roomGridIndex?: int): BitFlags<DisplayFlag>;
|
|
6321
|
+
export declare function getRoomDisplayFlags(roomGridIndex?: int, minimapAPI?: boolean): BitFlags<DisplayFlag>;
|
|
6317
6322
|
|
|
6318
6323
|
/**
|
|
6319
6324
|
* Helper function to get the grid index of the current room.
|
|
@@ -8929,6 +8934,9 @@ export declare function logColor(this: void, color: Color, name?: string): void;
|
|
|
8929
8934
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
8930
8935
|
export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
8931
8936
|
|
|
8937
|
+
/** Helper function for printing out every display flag that is turned on. Useful when debugging. */
|
|
8938
|
+
export declare function logDisplayFlags(this: void, flags: DisplayFlag | BitFlags<DisplayFlag>): void;
|
|
8939
|
+
|
|
8932
8940
|
/** Helper function for logging an array of specific entities. */
|
|
8933
8941
|
export declare function logEntities(this: void, entities: Entity[]): void;
|
|
8934
8942
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 29.
|
|
3
|
+
isaacscript-common 29.10.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -29075,6 +29075,7 @@ local __TS__New = ____lualib.__TS__New
|
|
|
29075
29075
|
local ____exports = {}
|
|
29076
29076
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
29077
29077
|
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
29078
|
+
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
29078
29079
|
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
29079
29080
|
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
29080
29081
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
@@ -29186,6 +29187,9 @@ end
|
|
|
29186
29187
|
function ____exports.logDamageFlags(flags)
|
|
29187
29188
|
____exports.logFlags(flags, DamageFlag, "damage")
|
|
29188
29189
|
end
|
|
29190
|
+
function ____exports.logDisplayFlags(flags)
|
|
29191
|
+
____exports.logFlags(flags, DisplayFlag, "display")
|
|
29192
|
+
end
|
|
29189
29193
|
function ____exports.logEntityFlags(flags)
|
|
29190
29194
|
____exports.logFlags(flags, EntityFlag, "entity")
|
|
29191
29195
|
end
|
|
@@ -53196,11 +53200,14 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
|
53196
53200
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
53197
53201
|
local ____rooms = require("src.functions.rooms")
|
|
53198
53202
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
53199
|
-
function ____exports.getRoomDisplayFlags(self, roomGridIndex)
|
|
53203
|
+
function ____exports.getRoomDisplayFlags(self, roomGridIndex, minimapAPI)
|
|
53204
|
+
if minimapAPI == nil then
|
|
53205
|
+
minimapAPI = true
|
|
53206
|
+
end
|
|
53200
53207
|
if roomGridIndex == nil then
|
|
53201
53208
|
roomGridIndex = getRoomGridIndex(nil)
|
|
53202
53209
|
end
|
|
53203
|
-
if MinimapAPI == nil then
|
|
53210
|
+
if MinimapAPI == nil or not minimapAPI then
|
|
53204
53211
|
local roomDescriptor = getRoomDescriptor(nil, roomGridIndex)
|
|
53205
53212
|
return roomDescriptor.DisplayFlags
|
|
53206
53213
|
end
|
|
@@ -53255,11 +53262,14 @@ end
|
|
|
53255
53262
|
function ____exports.clearRoomDisplayFlags(self, roomGridIndex)
|
|
53256
53263
|
____exports.setRoomDisplayFlags(nil, roomGridIndex, DisplayFlagZero)
|
|
53257
53264
|
end
|
|
53258
|
-
function ____exports.getFloorDisplayFlags(self)
|
|
53265
|
+
function ____exports.getFloorDisplayFlags(self, minimapAPI)
|
|
53266
|
+
if minimapAPI == nil then
|
|
53267
|
+
minimapAPI = true
|
|
53268
|
+
end
|
|
53259
53269
|
local displayFlagsMap = __TS__New(Map)
|
|
53260
53270
|
for ____, roomDescriptor in ipairs(getRoomsInsideGrid(nil)) do
|
|
53261
53271
|
local roomGridIndex = roomDescriptor.SafeGridIndex
|
|
53262
|
-
local displayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex)
|
|
53272
|
+
local displayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
53263
53273
|
displayFlagsMap:set(roomGridIndex, displayFlags)
|
|
53264
53274
|
end
|
|
53265
53275
|
return displayFlagsMap
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@typescript-to-lua/language-extensions" />
|
|
2
|
-
import { CollectibleType, DamageFlag, EntityFlag, ProjectileFlag, TearFlag, UseFlag } from "isaac-typescript-definitions";
|
|
2
|
+
import { CollectibleType, DamageFlag, DisplayFlag, EntityFlag, ProjectileFlag, TearFlag, UseFlag } from "isaac-typescript-definitions";
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to log all of the values in an array.
|
|
5
5
|
*
|
|
@@ -23,6 +23,8 @@ export declare function logCollectibleTypes(this: void, collectibleTypes: Collec
|
|
|
23
23
|
export declare function logColor(this: void, color: Color, name?: string): void;
|
|
24
24
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
25
25
|
export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
26
|
+
/** Helper function for printing out every display flag that is turned on. Useful when debugging. */
|
|
27
|
+
export declare function logDisplayFlags(this: void, flags: DisplayFlag | BitFlags<DisplayFlag>): void;
|
|
26
28
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
27
29
|
export declare function logEntityFlags(this: void, flags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
28
30
|
export declare function logEntityID(this: void, entity: Entity): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logMisc.d.ts","sourceRoot":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AgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAQ1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,OAAO,EACjB,YAAY,SAAI,GACf,IAAI,CAuCN;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACxD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,IAAI,CA8BN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAkBhE;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACnC,IAAI,CAEN;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACjC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAoB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,IAAI,CAON"}
|
|
@@ -10,6 +10,7 @@ local __TS__New = ____lualib.__TS__New
|
|
|
10
10
|
local ____exports = {}
|
|
11
11
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
12
12
|
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
13
|
+
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
13
14
|
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
14
15
|
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
15
16
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
@@ -135,6 +136,10 @@ end
|
|
|
135
136
|
function ____exports.logDamageFlags(flags)
|
|
136
137
|
____exports.logFlags(flags, DamageFlag, "damage")
|
|
137
138
|
end
|
|
139
|
+
--- Helper function for printing out every display flag that is turned on. Useful when debugging.
|
|
140
|
+
function ____exports.logDisplayFlags(flags)
|
|
141
|
+
____exports.logFlags(flags, DisplayFlag, "display")
|
|
142
|
+
end
|
|
138
143
|
--- Helper function for printing out every entity flag that is turned on. Useful when debugging.
|
|
139
144
|
function ____exports.logEntityFlags(flags)
|
|
140
145
|
____exports.logFlags(flags, EntityFlag, "entity")
|
|
@@ -38,8 +38,11 @@ export declare function clearRoomDisplayFlags(roomGridIndex: int): void;
|
|
|
38
38
|
* that is indexed by the room's safe grid index.
|
|
39
39
|
*
|
|
40
40
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
41
|
+
*
|
|
42
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
43
|
+
* true.
|
|
41
44
|
*/
|
|
42
|
-
export declare function getFloorDisplayFlags(): Map<int, BitFlags<DisplayFlag>>;
|
|
45
|
+
export declare function getFloorDisplayFlags(minimapAPI?: boolean): Map<int, BitFlags<DisplayFlag>>;
|
|
43
46
|
/**
|
|
44
47
|
* Helper function to get a particular room's minimap display flags (e.g. whether or not it is
|
|
45
48
|
* visible and so on).
|
|
@@ -47,8 +50,10 @@ export declare function getFloorDisplayFlags(): Map<int, BitFlags<DisplayFlag>>;
|
|
|
47
50
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
48
51
|
*
|
|
49
52
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
53
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
54
|
+
* true.
|
|
50
55
|
*/
|
|
51
|
-
export declare function getRoomDisplayFlags(roomGridIndex?: int): BitFlags<DisplayFlag>;
|
|
56
|
+
export declare function getRoomDisplayFlags(roomGridIndex?: int, minimapAPI?: boolean): BitFlags<DisplayFlag>;
|
|
52
57
|
/**
|
|
53
58
|
* Helper function to hide a specific room on the minimap.
|
|
54
59
|
*
|
|
@@ -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
|
|
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"}
|
|
@@ -20,11 +20,16 @@ local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
|
20
20
|
-- This function automatically accounts for whether or not MinimapAPI is being used.
|
|
21
21
|
--
|
|
22
22
|
-- @param roomGridIndex Optional. Default is the current room index.
|
|
23
|
-
|
|
23
|
+
-- @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
24
|
+
-- true.
|
|
25
|
+
function ____exports.getRoomDisplayFlags(self, roomGridIndex, minimapAPI)
|
|
26
|
+
if minimapAPI == nil then
|
|
27
|
+
minimapAPI = true
|
|
28
|
+
end
|
|
24
29
|
if roomGridIndex == nil then
|
|
25
30
|
roomGridIndex = getRoomGridIndex(nil)
|
|
26
31
|
end
|
|
27
|
-
if MinimapAPI == nil then
|
|
32
|
+
if MinimapAPI == nil or not minimapAPI then
|
|
28
33
|
local roomDescriptor = getRoomDescriptor(nil, roomGridIndex)
|
|
29
34
|
return roomDescriptor.DisplayFlags
|
|
30
35
|
end
|
|
@@ -125,11 +130,17 @@ end
|
|
|
125
130
|
-- that is indexed by the room's safe grid index.
|
|
126
131
|
--
|
|
127
132
|
-- This function automatically accounts for whether or not MinimapAPI is being used.
|
|
128
|
-
|
|
133
|
+
--
|
|
134
|
+
-- @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
135
|
+
-- true.
|
|
136
|
+
function ____exports.getFloorDisplayFlags(self, minimapAPI)
|
|
137
|
+
if minimapAPI == nil then
|
|
138
|
+
minimapAPI = true
|
|
139
|
+
end
|
|
129
140
|
local displayFlagsMap = __TS__New(Map)
|
|
130
141
|
for ____, roomDescriptor in ipairs(getRoomsInsideGrid(nil)) do
|
|
131
142
|
local roomGridIndex = roomDescriptor.SafeGridIndex
|
|
132
|
-
local displayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex)
|
|
143
|
+
local displayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
133
144
|
displayFlagsMap:set(roomGridIndex, displayFlags)
|
|
134
145
|
end
|
|
135
146
|
return displayFlagsMap
|
package/package.json
CHANGED
package/src/functions/logMisc.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectibleType,
|
|
3
3
|
DamageFlag,
|
|
4
|
+
DisplayFlag,
|
|
4
5
|
EntityFlag,
|
|
5
6
|
GameStateFlag,
|
|
6
7
|
GridRoom,
|
|
@@ -106,6 +107,14 @@ export function logDamageFlags(
|
|
|
106
107
|
logFlags(flags, DamageFlag, "damage");
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
/** Helper function for printing out every display flag that is turned on. Useful when debugging. */
|
|
111
|
+
export function logDisplayFlags(
|
|
112
|
+
this: void,
|
|
113
|
+
flags: DisplayFlag | BitFlags<DisplayFlag>,
|
|
114
|
+
): void {
|
|
115
|
+
logFlags(flags, DisplayFlag, "display");
|
|
116
|
+
}
|
|
117
|
+
|
|
109
118
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
110
119
|
export function logEntityFlags(
|
|
111
120
|
this: void,
|
package/src/functions/minimap.ts
CHANGED
|
@@ -58,13 +58,18 @@ export function clearRoomDisplayFlags(roomGridIndex: int): void {
|
|
|
58
58
|
* that is indexed by the room's safe grid index.
|
|
59
59
|
*
|
|
60
60
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
61
|
+
*
|
|
62
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
63
|
+
* true.
|
|
61
64
|
*/
|
|
62
|
-
export function getFloorDisplayFlags(
|
|
65
|
+
export function getFloorDisplayFlags(
|
|
66
|
+
minimapAPI = true,
|
|
67
|
+
): Map<int, BitFlags<DisplayFlag>> {
|
|
63
68
|
const displayFlagsMap = new Map<int, BitFlags<DisplayFlag>>();
|
|
64
69
|
|
|
65
70
|
for (const roomDescriptor of getRoomsInsideGrid()) {
|
|
66
71
|
const roomGridIndex = roomDescriptor.SafeGridIndex;
|
|
67
|
-
const displayFlags = getRoomDisplayFlags(roomGridIndex);
|
|
72
|
+
const displayFlags = getRoomDisplayFlags(roomGridIndex, minimapAPI);
|
|
68
73
|
displayFlagsMap.set(roomGridIndex, displayFlags);
|
|
69
74
|
}
|
|
70
75
|
|
|
@@ -78,15 +83,18 @@ export function getFloorDisplayFlags(): Map<int, BitFlags<DisplayFlag>> {
|
|
|
78
83
|
* This function automatically accounts for whether or not MinimapAPI is being used.
|
|
79
84
|
*
|
|
80
85
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
86
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
87
|
+
* true.
|
|
81
88
|
*/
|
|
82
89
|
export function getRoomDisplayFlags(
|
|
83
90
|
roomGridIndex?: int,
|
|
91
|
+
minimapAPI = true,
|
|
84
92
|
): BitFlags<DisplayFlag> {
|
|
85
93
|
if (roomGridIndex === undefined) {
|
|
86
94
|
roomGridIndex = getRoomGridIndex();
|
|
87
95
|
}
|
|
88
96
|
|
|
89
|
-
if (MinimapAPI === undefined) {
|
|
97
|
+
if (MinimapAPI === undefined || !minimapAPI) {
|
|
90
98
|
const roomDescriptor = getRoomDescriptor(roomGridIndex);
|
|
91
99
|
return roomDescriptor.DisplayFlags;
|
|
92
100
|
}
|