isaacscript-common 33.9.3 → 33.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 +7 -8
- package/dist/isaacscript-common.lua +6 -8
- package/dist/src/functions/minimap.d.ts +2 -2
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +5 -2
- package/dist/src/functions/roomData.d.ts +5 -6
- package/dist/src/functions/roomData.d.ts.map +1 -1
- package/dist/src/functions/roomData.lua +5 -11
- package/dist/src/maps/collectibleTypeToNameMap.lua +1 -1
- package/package.json +1 -1
- package/src/functions/minimap.ts +10 -2
- package/src/functions/roomData.ts +5 -16
- package/src/maps/collectibleTypeToNameMap.ts +1 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -6670,13 +6670,12 @@ export declare function getRoomDescriptorsForType(...roomTypes: RoomType[]): Roo
|
|
|
6670
6670
|
export declare function getRoomDisplayFlags(roomGridIndex?: int, minimapAPI?: boolean): BitFlags<DisplayFlag>;
|
|
6671
6671
|
|
|
6672
6672
|
/**
|
|
6673
|
-
* Helper function to get the grid index of the current room.
|
|
6673
|
+
* Helper function to get the safe grid index of the current room. (The safe grid index is defined
|
|
6674
|
+
* as the top-left 1x1 section that the room overlaps with, or the top-right 1x1 section of a
|
|
6675
|
+
* `RoomType.SHAPE_LTL` room.)
|
|
6674
6676
|
*
|
|
6675
|
-
*
|
|
6676
|
-
*
|
|
6677
|
-
* overlaps with, or the top-right 1x1 section of a `RoomType.SHAPE_LTL` room.)
|
|
6678
|
-
* - If the current room is outside of the grid, it will return the index from the
|
|
6679
|
-
* `Level.GetCurrentRoomIndex` method (since `SafeGridIndex` is bugged for these cases).
|
|
6677
|
+
* Under the hood, this function uses the `Level.GetCurrentRoomDesc` method. (In Afterbirth+, this
|
|
6678
|
+
* method was bugged for rooms outside of the grid, but it is now fixed.)
|
|
6680
6679
|
*
|
|
6681
6680
|
* Use this function instead of the `Level.GetCurrentRoomIndex` method directly because the latter
|
|
6682
6681
|
* will return the specific 1x1 quadrant that the player entered the room at. For most situations,
|
|
@@ -8822,10 +8821,10 @@ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[
|
|
|
8822
8821
|
/**
|
|
8823
8822
|
* Helper function to check if a given room is visible on the minimap.
|
|
8824
8823
|
*
|
|
8825
|
-
* @param
|
|
8824
|
+
* @param roomGridIndexOrRoomDescriptor The room to check.
|
|
8826
8825
|
* @param minimapAPI Optional. Whether MinimapAPI should be used, if present. Default is true.
|
|
8827
8826
|
*/
|
|
8828
|
-
export declare function isRoomVisible(
|
|
8827
|
+
export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
|
|
8829
8828
|
|
|
8830
8829
|
/** Returns true for cards that have `CardType.RUNE`. */
|
|
8831
8830
|
export declare function isRune(cardType: CardType): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 33.
|
|
3
|
+
isaacscript-common 33.10.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -20710,7 +20710,7 @@ ____exports.COLLECTIBLE_TYPE_TO_NAME_MAP = __TS__New(ReadonlyMap, {
|
|
|
20710
20710
|
{653, "Vade Retro"},
|
|
20711
20711
|
{654, "False PHD"},
|
|
20712
20712
|
{655, "Spin to Win"},
|
|
20713
|
-
{656, "Damocles"},
|
|
20713
|
+
{656, "Damocles (Passive)"},
|
|
20714
20714
|
{657, "Vasculitis"},
|
|
20715
20715
|
{658, "Giant Cell"},
|
|
20716
20716
|
{659, "Tropicamide"},
|
|
@@ -26764,11 +26764,6 @@ function ____exports.getRoomDescriptorReadOnly(self)
|
|
|
26764
26764
|
return level:GetCurrentRoomDesc()
|
|
26765
26765
|
end
|
|
26766
26766
|
function ____exports.getRoomGridIndex(self)
|
|
26767
|
-
local level = game:GetLevel()
|
|
26768
|
-
local currentRoomIndex = level:GetCurrentRoomIndex()
|
|
26769
|
-
if currentRoomIndex < 0 then
|
|
26770
|
-
return currentRoomIndex
|
|
26771
|
-
end
|
|
26772
26767
|
local roomDescriptor = ____exports.getRoomDescriptorReadOnly(nil)
|
|
26773
26768
|
return roomDescriptor.SafeGridIndex
|
|
26774
26769
|
end
|
|
@@ -53786,6 +53781,8 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
|
53786
53781
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
53787
53782
|
local ____rooms = require("src.functions.rooms")
|
|
53788
53783
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
53784
|
+
local ____types = require("src.functions.types")
|
|
53785
|
+
local isNumber = ____types.isNumber
|
|
53789
53786
|
local ____utils = require("src.functions.utils")
|
|
53790
53787
|
local assertDefined = ____utils.assertDefined
|
|
53791
53788
|
function ____exports.getRoomDisplayFlags(self, roomGridIndex, minimapAPI)
|
|
@@ -53878,10 +53875,11 @@ function ____exports.hideRoomOnMinimap(self, roomGridIndex)
|
|
|
53878
53875
|
minimapAPIRoomDescriptor.Hidden = true
|
|
53879
53876
|
end
|
|
53880
53877
|
end
|
|
53881
|
-
function ____exports.isRoomVisible(self,
|
|
53878
|
+
function ____exports.isRoomVisible(self, roomGridIndexOrRoomDescriptor, minimapAPI)
|
|
53882
53879
|
if minimapAPI == nil then
|
|
53883
53880
|
minimapAPI = true
|
|
53884
53881
|
end
|
|
53882
|
+
local roomGridIndex = isNumber(nil, roomGridIndexOrRoomDescriptor) and roomGridIndexOrRoomDescriptor or roomGridIndexOrRoomDescriptor.SafeGridIndex
|
|
53885
53883
|
local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
53886
53884
|
return roomDisplayFlags ~= DisplayFlagZero
|
|
53887
53885
|
end
|
|
@@ -65,10 +65,10 @@ export declare function hideRoomOnMinimap(roomGridIndex: int): void;
|
|
|
65
65
|
/**
|
|
66
66
|
* Helper function to check if a given room is visible on the minimap.
|
|
67
67
|
*
|
|
68
|
-
* @param
|
|
68
|
+
* @param roomGridIndexOrRoomDescriptor The room to check.
|
|
69
69
|
* @param minimapAPI Optional. Whether MinimapAPI should be used, if present. Default is true.
|
|
70
70
|
*/
|
|
71
|
-
export declare function isRoomVisible(
|
|
71
|
+
export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
|
|
72
72
|
/**
|
|
73
73
|
* Helper function to set the minimap `DisplayFlag` value for every room on the floor at once.
|
|
74
74
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAShE;;;;;;;;;;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;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAO,GAChB,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAUjC;AAED;;;;;;;;GAQG;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;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,6BAA6B,EAAE,GAAG,GAAG,cAAc,EACnD,UAAU,UAAO,GAChB,OAAO,CAOT;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"}
|
|
@@ -14,6 +14,8 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
|
14
14
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
15
15
|
local ____rooms = require("src.functions.rooms")
|
|
16
16
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
17
|
+
local ____types = require("src.functions.types")
|
|
18
|
+
local isNumber = ____types.isNumber
|
|
17
19
|
local ____utils = require("src.functions.utils")
|
|
18
20
|
local assertDefined = ____utils.assertDefined
|
|
19
21
|
--- Helper function to get a particular room's minimap display flags (e.g. whether it is visible and
|
|
@@ -170,12 +172,13 @@ function ____exports.hideRoomOnMinimap(self, roomGridIndex)
|
|
|
170
172
|
end
|
|
171
173
|
--- Helper function to check if a given room is visible on the minimap.
|
|
172
174
|
--
|
|
173
|
-
-- @param
|
|
175
|
+
-- @param roomGridIndexOrRoomDescriptor The room to check.
|
|
174
176
|
-- @param minimapAPI Optional. Whether MinimapAPI should be used, if present. Default is true.
|
|
175
|
-
function ____exports.isRoomVisible(self,
|
|
177
|
+
function ____exports.isRoomVisible(self, roomGridIndexOrRoomDescriptor, minimapAPI)
|
|
176
178
|
if minimapAPI == nil then
|
|
177
179
|
minimapAPI = true
|
|
178
180
|
end
|
|
181
|
+
local roomGridIndex = isNumber(nil, roomGridIndexOrRoomDescriptor) and roomGridIndexOrRoomDescriptor or roomGridIndexOrRoomDescriptor.SafeGridIndex
|
|
179
182
|
local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
180
183
|
return roomDisplayFlags ~= DisplayFlagZero
|
|
181
184
|
end
|
|
@@ -18,13 +18,12 @@ export declare function getRoomDescriptor(roomGridIndex?: int): RoomDescriptor;
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function getRoomDescriptorReadOnly(): Readonly<RoomDescriptor>;
|
|
20
20
|
/**
|
|
21
|
-
* Helper function to get the grid index of the current room.
|
|
21
|
+
* Helper function to get the safe grid index of the current room. (The safe grid index is defined
|
|
22
|
+
* as the top-left 1x1 section that the room overlaps with, or the top-right 1x1 section of a
|
|
23
|
+
* `RoomType.SHAPE_LTL` room.)
|
|
22
24
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* overlaps with, or the top-right 1x1 section of a `RoomType.SHAPE_LTL` room.)
|
|
26
|
-
* - If the current room is outside of the grid, it will return the index from the
|
|
27
|
-
* `Level.GetCurrentRoomIndex` method (since `SafeGridIndex` is bugged for these cases).
|
|
25
|
+
* Under the hood, this function uses the `Level.GetCurrentRoomDesc` method. (In Afterbirth+, this
|
|
26
|
+
* method was bugged for rooms outside of the grid, but it is now fixed.)
|
|
28
27
|
*
|
|
29
28
|
* Use this function instead of the `Level.GetCurrentRoomIndex` method directly because the latter
|
|
30
29
|
* will return the specific 1x1 quadrant that the player entered the room at. For most situations,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAgBtE;AAGD,wBAAgB,WAAW,IAAI,UAAU,CAAC;AAC1C,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAAC;AAYzE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,cAAc,CAQrE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,QAAQ,CAAC,cAAc,CAAC,CAGpE;AAED
|
|
1
|
+
{"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAgBtE;AAGD,wBAAgB,WAAW,IAAI,UAAU,CAAC;AAC1C,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAAC;AAYzE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,cAAc,CAQrE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,QAAQ,CAAC,cAAc,CAAC,CAGpE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAGtC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGzD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,MAAM,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,SAAS,GAAG,SAAS,CAGvE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,CAGhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,QAAQ,GAAG,CAAC,CAAC,CAG9D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAG5D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI,CAG1E"}
|
|
@@ -33,13 +33,12 @@ function ____exports.getRoomDescriptorReadOnly(self)
|
|
|
33
33
|
local level = game:GetLevel()
|
|
34
34
|
return level:GetCurrentRoomDesc()
|
|
35
35
|
end
|
|
36
|
-
--- Helper function to get the grid index of the current room.
|
|
36
|
+
--- Helper function to get the safe grid index of the current room. (The safe grid index is defined
|
|
37
|
+
-- as the top-left 1x1 section that the room overlaps with, or the top-right 1x1 section of a
|
|
38
|
+
-- `RoomType.SHAPE_LTL` room.)
|
|
37
39
|
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
-- overlaps with, or the top-right 1x1 section of a `RoomType.SHAPE_LTL` room.)
|
|
41
|
-
-- - If the current room is outside of the grid, it will return the index from the
|
|
42
|
-
-- `Level.GetCurrentRoomIndex` method (since `SafeGridIndex` is bugged for these cases).
|
|
40
|
+
-- Under the hood, this function uses the `Level.GetCurrentRoomDesc` method. (In Afterbirth+, this
|
|
41
|
+
-- method was bugged for rooms outside of the grid, but it is now fixed.)
|
|
43
42
|
--
|
|
44
43
|
-- Use this function instead of the `Level.GetCurrentRoomIndex` method directly because the latter
|
|
45
44
|
-- will return the specific 1x1 quadrant that the player entered the room at. For most situations,
|
|
@@ -48,11 +47,6 @@ end
|
|
|
48
47
|
-- Data structures that store data per room should use the room's `ListIndex` instead of
|
|
49
48
|
-- `SafeGridIndex`, since the former is unique across different dimensions.
|
|
50
49
|
function ____exports.getRoomGridIndex(self)
|
|
51
|
-
local level = game:GetLevel()
|
|
52
|
-
local currentRoomIndex = level:GetCurrentRoomIndex()
|
|
53
|
-
if currentRoomIndex < 0 then
|
|
54
|
-
return currentRoomIndex
|
|
55
|
-
end
|
|
56
50
|
local roomDescriptor = ____exports.getRoomDescriptorReadOnly(nil)
|
|
57
51
|
return roomDescriptor.SafeGridIndex
|
|
58
52
|
end
|
|
@@ -657,7 +657,7 @@ ____exports.COLLECTIBLE_TYPE_TO_NAME_MAP = __TS__New(ReadonlyMap, {
|
|
|
657
657
|
{653, "Vade Retro"},
|
|
658
658
|
{654, "False PHD"},
|
|
659
659
|
{655, "Spin to Win"},
|
|
660
|
-
{656, "Damocles"},
|
|
660
|
+
{656, "Damocles (Passive)"},
|
|
661
661
|
{657, "Vasculitis"},
|
|
662
662
|
{658, "Giant Cell"},
|
|
663
663
|
{659, "Tropicamide"},
|
package/package.json
CHANGED
package/src/functions/minimap.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { game } from "../core/cachedClasses";
|
|
|
4
4
|
import { addFlag } from "./flag";
|
|
5
5
|
import { getRoomDescriptor, getRoomGridIndex } from "./roomData";
|
|
6
6
|
import { getRoomsInsideGrid } from "./rooms";
|
|
7
|
+
import { isNumber } from "./types";
|
|
7
8
|
import { assertDefined } from "./utils";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -137,11 +138,18 @@ export function hideRoomOnMinimap(roomGridIndex: int): void {
|
|
|
137
138
|
/**
|
|
138
139
|
* Helper function to check if a given room is visible on the minimap.
|
|
139
140
|
*
|
|
140
|
-
* @param
|
|
141
|
+
* @param roomGridIndexOrRoomDescriptor The room to check.
|
|
141
142
|
* @param minimapAPI Optional. Whether MinimapAPI should be used, if present. Default is true.
|
|
142
143
|
*/
|
|
143
|
-
export function isRoomVisible(
|
|
144
|
+
export function isRoomVisible(
|
|
145
|
+
roomGridIndexOrRoomDescriptor: int | RoomDescriptor,
|
|
146
|
+
minimapAPI = true,
|
|
147
|
+
): boolean {
|
|
148
|
+
const roomGridIndex = isNumber(roomGridIndexOrRoomDescriptor)
|
|
149
|
+
? roomGridIndexOrRoomDescriptor
|
|
150
|
+
: roomGridIndexOrRoomDescriptor.SafeGridIndex;
|
|
144
151
|
const roomDisplayFlags = getRoomDisplayFlags(roomGridIndex, minimapAPI);
|
|
152
|
+
|
|
145
153
|
return roomDisplayFlags !== DisplayFlagZero;
|
|
146
154
|
}
|
|
147
155
|
|
|
@@ -70,13 +70,12 @@ export function getRoomDescriptorReadOnly(): Readonly<RoomDescriptor> {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Helper function to get the grid index of the current room.
|
|
73
|
+
* Helper function to get the safe grid index of the current room. (The safe grid index is defined
|
|
74
|
+
* as the top-left 1x1 section that the room overlaps with, or the top-right 1x1 section of a
|
|
75
|
+
* `RoomType.SHAPE_LTL` room.)
|
|
74
76
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* overlaps with, or the top-right 1x1 section of a `RoomType.SHAPE_LTL` room.)
|
|
78
|
-
* - If the current room is outside of the grid, it will return the index from the
|
|
79
|
-
* `Level.GetCurrentRoomIndex` method (since `SafeGridIndex` is bugged for these cases).
|
|
77
|
+
* Under the hood, this function uses the `Level.GetCurrentRoomDesc` method. (In Afterbirth+, this
|
|
78
|
+
* method was bugged for rooms outside of the grid, but it is now fixed.)
|
|
80
79
|
*
|
|
81
80
|
* Use this function instead of the `Level.GetCurrentRoomIndex` method directly because the latter
|
|
82
81
|
* will return the specific 1x1 quadrant that the player entered the room at. For most situations,
|
|
@@ -86,16 +85,6 @@ export function getRoomDescriptorReadOnly(): Readonly<RoomDescriptor> {
|
|
|
86
85
|
* `SafeGridIndex`, since the former is unique across different dimensions.
|
|
87
86
|
*/
|
|
88
87
|
export function getRoomGridIndex(): int {
|
|
89
|
-
const level = game.GetLevel();
|
|
90
|
-
const currentRoomIndex = level.GetCurrentRoomIndex();
|
|
91
|
-
|
|
92
|
-
// Both `RoomDescriptor.GridIndex` and `RoomDescriptor.SafeGridIndex` will always be equal to -1
|
|
93
|
-
// for rooms outside of the grid. Thus, we revert to using the `Level.GetCurrentRoomIndex` method
|
|
94
|
-
// for these cases.
|
|
95
|
-
if (currentRoomIndex < 0) {
|
|
96
|
-
return currentRoomIndex;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
88
|
const roomDescriptor = getRoomDescriptorReadOnly();
|
|
100
89
|
return roomDescriptor.SafeGridIndex;
|
|
101
90
|
}
|
|
@@ -661,7 +661,7 @@ export const COLLECTIBLE_TYPE_TO_NAME_MAP = new ReadonlyMap<
|
|
|
661
661
|
[653, "Vade Retro"],
|
|
662
662
|
[654, "False PHD"],
|
|
663
663
|
[655, "Spin to Win"],
|
|
664
|
-
[656, "Damocles"],
|
|
664
|
+
[656, "Damocles (Passive)"],
|
|
665
665
|
[657, "Vasculitis"],
|
|
666
666
|
[658, "Giant Cell"],
|
|
667
667
|
[659, "Tropicamide"],
|