isaacscript-common 1.0.511 → 1.0.512
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.
|
@@ -45,7 +45,7 @@ export declare function getRoomSafeGridIndex(): int;
|
|
|
45
45
|
*
|
|
46
46
|
* This function only searches through rooms in the current dimension.
|
|
47
47
|
*/
|
|
48
|
-
export declare function getRoomGridIndexesForType(roomType: RoomType):
|
|
48
|
+
export declare function getRoomGridIndexesForType(roomType: RoomType): int[];
|
|
49
49
|
/**
|
|
50
50
|
* Helper function to get the item pool type for the current room. For example, this returns
|
|
51
51
|
* `ItemPoolType.ItemPoolType.POOL_ANGEL` if you are in an Angel Room.
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -94,13 +94,13 @@ end
|
|
|
94
94
|
function ____exports.getRoomGridIndexesForType(self, roomType)
|
|
95
95
|
local game = Game()
|
|
96
96
|
local level = game:GetLevel()
|
|
97
|
-
local roomGridIndexes =
|
|
97
|
+
local roomGridIndexes = {}
|
|
98
98
|
do
|
|
99
99
|
local i = 0
|
|
100
100
|
while i <= MAX_ROOM_INDEX do
|
|
101
101
|
local room = level:GetRoomByIdx(i)
|
|
102
102
|
if room ~= nil and room.Data ~= nil and room.Data.Type == roomType then
|
|
103
|
-
roomGridIndexes
|
|
103
|
+
__TS__ArrayPush(roomGridIndexes, room.SafeGridIndex)
|
|
104
104
|
end
|
|
105
105
|
i = i + 1
|
|
106
106
|
end
|