isaacscript-common 1.0.513 → 1.0.514
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.
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* do not forget to set the LeaveDoor property.
|
|
6
6
|
*/
|
|
7
7
|
export declare function changeRoom(roomGridIndex: int): void;
|
|
8
|
+
export declare function getAllRoomGridIndexes(): int[];
|
|
8
9
|
export declare function getCurrentDimension(): Dimension;
|
|
9
10
|
export declare function getRoomData(): RoomConfig | undefined;
|
|
10
11
|
/**
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -55,6 +55,23 @@ function ____exports.changeRoom(self, roomGridIndex)
|
|
|
55
55
|
level.LeaveDoor = -1
|
|
56
56
|
game:ChangeRoom(roomGridIndex)
|
|
57
57
|
end
|
|
58
|
+
function ____exports.getAllRoomGridIndexes(self)
|
|
59
|
+
local game = Game()
|
|
60
|
+
local level = game:GetLevel()
|
|
61
|
+
local rooms = level:GetRooms()
|
|
62
|
+
local allRoomGridIndexes = {}
|
|
63
|
+
do
|
|
64
|
+
local i = 0
|
|
65
|
+
while i < rooms.Size do
|
|
66
|
+
local roomDesc = rooms:Get(i)
|
|
67
|
+
if roomDesc ~= nil then
|
|
68
|
+
__TS__ArrayPush(allRoomGridIndexes, roomDesc.SafeGridIndex)
|
|
69
|
+
end
|
|
70
|
+
i = i + 1
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
return allRoomGridIndexes
|
|
74
|
+
end
|
|
58
75
|
function ____exports.getCurrentDimension(self)
|
|
59
76
|
local game = Game()
|
|
60
77
|
local level = game:GetLevel()
|
|
@@ -242,14 +259,14 @@ function ____exports.setRoomCleared(self)
|
|
|
242
259
|
) do
|
|
243
260
|
do
|
|
244
261
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
245
|
-
goto
|
|
262
|
+
goto __continue45
|
|
246
263
|
end
|
|
247
264
|
door.State = DoorState.STATE_OPEN
|
|
248
265
|
local sprite = door:GetSprite()
|
|
249
266
|
sprite:Play("Opened", true)
|
|
250
267
|
door.ExtraVisible = false
|
|
251
268
|
end
|
|
252
|
-
::
|
|
269
|
+
::__continue45::
|
|
253
270
|
end
|
|
254
271
|
sfx:Stop(SoundEffect.SOUND_DOOR_HEAVY_OPEN)
|
|
255
272
|
game:ShakeScreen(0)
|