isaacscript-common 29.5.4 → 29.6.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 +5 -1
- package/dist/isaacscript-common.lua +54 -19
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +32 -15
- package/dist/src/functions/rooms.d.ts +5 -1
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +25 -3
- package/package.json +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +30 -9
- package/src/functions/rooms.ts +26 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -7541,9 +7541,13 @@ export declare function isAllPressurePlatesPushed(): boolean;
|
|
|
7541
7541
|
* @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
|
|
7542
7542
|
* the array will be ignored. If not specified, then all rooms will be
|
|
7543
7543
|
* checked. Undefined by default.
|
|
7544
|
+
* @param includeSecretAndSuperSecretRoom Optional. Whether or not to include the Secret Room and
|
|
7545
|
+
* the Super Secret Room. Default is false.
|
|
7546
|
+
* @param includeUltraSecretRoom Optional. Whether or not to include the Ultra Secret Room. Default
|
|
7547
|
+
* is false.
|
|
7544
7548
|
* @allowEmptyVariadic
|
|
7545
7549
|
*/
|
|
7546
|
-
export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean;
|
|
7550
|
+
export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[], includeSecretAndSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
|
|
7547
7551
|
|
|
7548
7552
|
export declare function isAngelRoomDoor(door: GridEntityDoor): boolean;
|
|
7549
7553
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 29.
|
|
3
|
+
isaacscript-common 29.6.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -27395,7 +27395,13 @@ function ____exports.inStartingRoom(self)
|
|
|
27395
27395
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
27396
27396
|
return roomGridIndex == startingRoomGridIndex and inDimension(nil, Dimension.MAIN)
|
|
27397
27397
|
end
|
|
27398
|
-
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
27398
|
+
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndSuperSecretRoom, includeUltraSecretRoom)
|
|
27399
|
+
if includeSecretAndSuperSecretRoom == nil then
|
|
27400
|
+
includeSecretAndSuperSecretRoom = false
|
|
27401
|
+
end
|
|
27402
|
+
if includeUltraSecretRoom == nil then
|
|
27403
|
+
includeUltraSecretRoom = false
|
|
27404
|
+
end
|
|
27399
27405
|
local rooms = ____exports.getRoomsInsideGrid(nil)
|
|
27400
27406
|
local matchingRooms
|
|
27401
27407
|
if onlyCheckRoomTypes == nil then
|
|
@@ -27407,6 +27413,18 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
|
27407
27413
|
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
|
|
27408
27414
|
)
|
|
27409
27415
|
end
|
|
27416
|
+
if not includeSecretAndSuperSecretRoom then
|
|
27417
|
+
matchingRooms = __TS__ArrayFilter(
|
|
27418
|
+
matchingRooms,
|
|
27419
|
+
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
|
|
27420
|
+
)
|
|
27421
|
+
end
|
|
27422
|
+
if not includeUltraSecretRoom then
|
|
27423
|
+
matchingRooms = __TS__ArrayFilter(
|
|
27424
|
+
matchingRooms,
|
|
27425
|
+
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.ULTRA_SECRET end
|
|
27426
|
+
)
|
|
27427
|
+
end
|
|
27410
27428
|
return __TS__ArrayEvery(
|
|
27411
27429
|
matchingRooms,
|
|
27412
27430
|
function(____, roomDescriptor) return roomDescriptor.Clear end
|
|
@@ -27438,12 +27456,12 @@ function ____exports.setRoomCleared(self)
|
|
|
27438
27456
|
for ____, door in ipairs(getDoors(nil)) do
|
|
27439
27457
|
do
|
|
27440
27458
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
27441
|
-
goto
|
|
27459
|
+
goto __continue60
|
|
27442
27460
|
end
|
|
27443
27461
|
openDoorFast(nil, door)
|
|
27444
27462
|
door.ExtraVisible = false
|
|
27445
27463
|
end
|
|
27446
|
-
::
|
|
27464
|
+
::__continue60::
|
|
27447
27465
|
end
|
|
27448
27466
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
27449
27467
|
game:ShakeScreen(0)
|
|
@@ -48821,6 +48839,7 @@ local MAX_NUM_FAMILIARS = ____constants.MAX_NUM_FAMILIARS
|
|
|
48821
48839
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
48822
48840
|
local FIRST_CARD_TYPE = ____constantsFirstLast.FIRST_CARD_TYPE
|
|
48823
48841
|
local FIRST_CHARACTER = ____constantsFirstLast.FIRST_CHARACTER
|
|
48842
|
+
local FIRST_HORSE_PILL_COLOR = ____constantsFirstLast.FIRST_HORSE_PILL_COLOR
|
|
48824
48843
|
local FIRST_PILL_COLOR = ____constantsFirstLast.FIRST_PILL_COLOR
|
|
48825
48844
|
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
|
|
48826
48845
|
local FIRST_ROOM_TYPE = ____constantsFirstLast.FIRST_ROOM_TYPE
|
|
@@ -49508,25 +49527,41 @@ function ____exports.pill(self, params)
|
|
|
49508
49527
|
print(((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")")
|
|
49509
49528
|
end
|
|
49510
49529
|
function ____exports.pills(self)
|
|
49511
|
-
local
|
|
49530
|
+
local y
|
|
49531
|
+
local pillColor
|
|
49532
|
+
y = 1
|
|
49533
|
+
pillColor = FIRST_PILL_COLOR
|
|
49512
49534
|
do
|
|
49513
|
-
local
|
|
49514
|
-
while
|
|
49515
|
-
|
|
49516
|
-
|
|
49517
|
-
while x <= 12 do
|
|
49518
|
-
if pillColor > PillColor.GOLD then
|
|
49519
|
-
return
|
|
49520
|
-
end
|
|
49521
|
-
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
49522
|
-
spawnPill(nil, pillColor, worldPosition)
|
|
49523
|
-
pillColor = pillColor + 1
|
|
49524
|
-
x = x + 1
|
|
49525
|
-
end
|
|
49535
|
+
local x = 0
|
|
49536
|
+
while x <= 12 do
|
|
49537
|
+
if pillColor >= PillColor.GOLD then
|
|
49538
|
+
break
|
|
49526
49539
|
end
|
|
49527
|
-
|
|
49540
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
49541
|
+
spawnPill(nil, pillColor, worldPosition)
|
|
49542
|
+
pillColor = pillColor + 1
|
|
49543
|
+
x = x + 1
|
|
49544
|
+
end
|
|
49545
|
+
end
|
|
49546
|
+
y = 2
|
|
49547
|
+
pillColor = FIRST_HORSE_PILL_COLOR
|
|
49548
|
+
do
|
|
49549
|
+
local x = 0
|
|
49550
|
+
while x <= 12 do
|
|
49551
|
+
if pillColor >= PillColor.HORSE_GOLD then
|
|
49552
|
+
break
|
|
49553
|
+
end
|
|
49554
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
49555
|
+
spawnPill(nil, pillColor, worldPosition)
|
|
49556
|
+
pillColor = pillColor + 1
|
|
49557
|
+
x = x + 1
|
|
49528
49558
|
end
|
|
49529
49559
|
end
|
|
49560
|
+
y = 3
|
|
49561
|
+
local worldPosition1 = gridCoordinatesToWorldPosition(nil, 0, y)
|
|
49562
|
+
spawnPill(nil, PillColor.GOLD, worldPosition1)
|
|
49563
|
+
local worldPosition2 = gridCoordinatesToWorldPosition(nil, 1, y)
|
|
49564
|
+
spawnPill(nil, PillColor.HORSE_GOLD, worldPosition2)
|
|
49530
49565
|
end
|
|
49531
49566
|
function ____exports.planetarium(self)
|
|
49532
49567
|
warpToRoomType(nil, RoomType.PLANETARIUM)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"AA0IA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wCAAwC;AACxC,wBAAgB,IAAI,IAAI,IAAI,CAE3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CARD_TYPE = ____constantsFirstLast.FIRST_CARD_TYPE
|
|
31
31
|
local FIRST_CHARACTER = ____constantsFirstLast.FIRST_CHARACTER
|
|
32
|
+
local FIRST_HORSE_PILL_COLOR = ____constantsFirstLast.FIRST_HORSE_PILL_COLOR
|
|
32
33
|
local FIRST_PILL_COLOR = ____constantsFirstLast.FIRST_PILL_COLOR
|
|
33
34
|
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
|
|
34
35
|
local FIRST_ROOM_TYPE = ____constantsFirstLast.FIRST_ROOM_TYPE
|
|
@@ -857,25 +858,41 @@ function ____exports.pill(self, params)
|
|
|
857
858
|
end
|
|
858
859
|
--- Spawns every pill on the ground, starting at the top-left-most tile.
|
|
859
860
|
function ____exports.pills(self)
|
|
860
|
-
local
|
|
861
|
+
local y
|
|
862
|
+
local pillColor
|
|
863
|
+
y = 1
|
|
864
|
+
pillColor = FIRST_PILL_COLOR
|
|
861
865
|
do
|
|
862
|
-
local
|
|
863
|
-
while
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
while x <= 12 do
|
|
867
|
-
if pillColor > PillColor.GOLD then
|
|
868
|
-
return
|
|
869
|
-
end
|
|
870
|
-
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
871
|
-
spawnPill(nil, pillColor, worldPosition)
|
|
872
|
-
pillColor = pillColor + 1
|
|
873
|
-
x = x + 1
|
|
874
|
-
end
|
|
866
|
+
local x = 0
|
|
867
|
+
while x <= 12 do
|
|
868
|
+
if pillColor >= PillColor.GOLD then
|
|
869
|
+
break
|
|
875
870
|
end
|
|
876
|
-
|
|
871
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
872
|
+
spawnPill(nil, pillColor, worldPosition)
|
|
873
|
+
pillColor = pillColor + 1
|
|
874
|
+
x = x + 1
|
|
875
|
+
end
|
|
876
|
+
end
|
|
877
|
+
y = 2
|
|
878
|
+
pillColor = FIRST_HORSE_PILL_COLOR
|
|
879
|
+
do
|
|
880
|
+
local x = 0
|
|
881
|
+
while x <= 12 do
|
|
882
|
+
if pillColor >= PillColor.HORSE_GOLD then
|
|
883
|
+
break
|
|
884
|
+
end
|
|
885
|
+
local worldPosition = gridCoordinatesToWorldPosition(nil, x, y)
|
|
886
|
+
spawnPill(nil, pillColor, worldPosition)
|
|
887
|
+
pillColor = pillColor + 1
|
|
888
|
+
x = x + 1
|
|
877
889
|
end
|
|
878
890
|
end
|
|
891
|
+
y = 3
|
|
892
|
+
local worldPosition1 = gridCoordinatesToWorldPosition(nil, 0, y)
|
|
893
|
+
spawnPill(nil, PillColor.GOLD, worldPosition1)
|
|
894
|
+
local worldPosition2 = gridCoordinatesToWorldPosition(nil, 1, y)
|
|
895
|
+
spawnPill(nil, PillColor.HORSE_GOLD, worldPosition2)
|
|
879
896
|
end
|
|
880
897
|
--- Warps to the first Planetarium on the floor.
|
|
881
898
|
function ____exports.planetarium(self)
|
|
@@ -195,9 +195,13 @@ export declare function inStartingRoom(): boolean;
|
|
|
195
195
|
* @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
|
|
196
196
|
* the array will be ignored. If not specified, then all rooms will be
|
|
197
197
|
* checked. Undefined by default.
|
|
198
|
+
* @param includeSecretAndSuperSecretRoom Optional. Whether or not to include the Secret Room and
|
|
199
|
+
* the Super Secret Room. Default is false.
|
|
200
|
+
* @param includeUltraSecretRoom Optional. Whether or not to include the Ultra Secret Room. Default
|
|
201
|
+
* is false.
|
|
198
202
|
* @allowEmptyVariadic
|
|
199
203
|
*/
|
|
200
|
-
export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean;
|
|
204
|
+
export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[], includeSecretAndSuperSecretRoom?: boolean, includeUltraSecretRoom?: boolean): boolean;
|
|
201
205
|
/**
|
|
202
206
|
* Helper function to detect if a room type is a Secret Room, a Super Secret Room, or an Ultra
|
|
203
207
|
* Secret Room.
|
|
@@ -1 +1 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IvC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,+FAA+F;AAC/F,wBAAgB,OAAO,IAAI,OAAO,CAUjC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAC/B,+BAA+B,UAAQ,EACvC,sBAAsB,UAAQ,GAC7B,OAAO,CAiCT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
|
|
@@ -404,8 +404,18 @@ end
|
|
|
404
404
|
-- @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
|
|
405
405
|
-- the array will be ignored. If not specified, then all rooms will be
|
|
406
406
|
-- checked. Undefined by default.
|
|
407
|
+
-- @param includeSecretAndSuperSecretRoom Optional. Whether or not to include the Secret Room and
|
|
408
|
+
-- the Super Secret Room. Default is false.
|
|
409
|
+
-- @param includeUltraSecretRoom Optional. Whether or not to include the Ultra Secret Room. Default
|
|
410
|
+
-- is false.
|
|
407
411
|
-- @allowEmptyVariadic
|
|
408
|
-
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
412
|
+
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes, includeSecretAndSuperSecretRoom, includeUltraSecretRoom)
|
|
413
|
+
if includeSecretAndSuperSecretRoom == nil then
|
|
414
|
+
includeSecretAndSuperSecretRoom = false
|
|
415
|
+
end
|
|
416
|
+
if includeUltraSecretRoom == nil then
|
|
417
|
+
includeUltraSecretRoom = false
|
|
418
|
+
end
|
|
409
419
|
local rooms = ____exports.getRoomsInsideGrid(nil)
|
|
410
420
|
local matchingRooms
|
|
411
421
|
if onlyCheckRoomTypes == nil then
|
|
@@ -417,6 +427,18 @@ function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
|
417
427
|
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomTypeWhitelist:has(roomDescriptor.Data.Type) end
|
|
418
428
|
)
|
|
419
429
|
end
|
|
430
|
+
if not includeSecretAndSuperSecretRoom then
|
|
431
|
+
matchingRooms = __TS__ArrayFilter(
|
|
432
|
+
matchingRooms,
|
|
433
|
+
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.SECRET and roomDescriptor.Data.Type ~= RoomType.SUPER_SECRET end
|
|
434
|
+
)
|
|
435
|
+
end
|
|
436
|
+
if not includeUltraSecretRoom then
|
|
437
|
+
matchingRooms = __TS__ArrayFilter(
|
|
438
|
+
matchingRooms,
|
|
439
|
+
function(____, roomDescriptor) return roomDescriptor.Data ~= nil and roomDescriptor.Data.Type ~= RoomType.ULTRA_SECRET end
|
|
440
|
+
)
|
|
441
|
+
end
|
|
420
442
|
return __TS__ArrayEvery(
|
|
421
443
|
matchingRooms,
|
|
422
444
|
function(____, roomDescriptor) return roomDescriptor.Clear end
|
|
@@ -458,12 +480,12 @@ function ____exports.setRoomCleared(self)
|
|
|
458
480
|
for ____, door in ipairs(getDoors(nil)) do
|
|
459
481
|
do
|
|
460
482
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
461
|
-
goto
|
|
483
|
+
goto __continue60
|
|
462
484
|
end
|
|
463
485
|
openDoorFast(nil, door)
|
|
464
486
|
door.ExtraVisible = false
|
|
465
487
|
end
|
|
466
|
-
::
|
|
488
|
+
::__continue60::
|
|
467
489
|
end
|
|
468
490
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
469
491
|
game:ShakeScreen(0)
|
package/package.json
CHANGED
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
FIRST_CARD_TYPE,
|
|
63
63
|
FIRST_CHARACTER,
|
|
64
|
+
FIRST_HORSE_PILL_COLOR,
|
|
64
65
|
FIRST_PILL_COLOR,
|
|
65
66
|
FIRST_PILL_EFFECT,
|
|
66
67
|
FIRST_ROOM_TYPE,
|
|
@@ -1031,18 +1032,38 @@ export function pill(params: string): void {
|
|
|
1031
1032
|
|
|
1032
1033
|
/** Spawns every pill on the ground, starting at the top-left-most tile. */
|
|
1033
1034
|
export function pills(): void {
|
|
1034
|
-
let
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1035
|
+
let y: int;
|
|
1036
|
+
let pillColor: PillColor;
|
|
1037
|
+
|
|
1038
|
+
y = 1;
|
|
1039
|
+
pillColor = FIRST_PILL_COLOR;
|
|
1040
|
+
for (let x = 0; x <= 12; x++) {
|
|
1041
|
+
if (pillColor >= PillColor.GOLD) {
|
|
1042
|
+
break;
|
|
1043
|
+
}
|
|
1040
1044
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1045
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
1046
|
+
spawnPill(pillColor, worldPosition);
|
|
1047
|
+
pillColor++; // eslint-disable-line isaacscript/strict-enums
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
y = 2;
|
|
1051
|
+
pillColor = FIRST_HORSE_PILL_COLOR;
|
|
1052
|
+
for (let x = 0; x <= 12; x++) {
|
|
1053
|
+
if (pillColor >= PillColor.HORSE_GOLD) {
|
|
1054
|
+
break;
|
|
1044
1055
|
}
|
|
1056
|
+
|
|
1057
|
+
const worldPosition = gridCoordinatesToWorldPosition(x, y);
|
|
1058
|
+
spawnPill(pillColor, worldPosition);
|
|
1059
|
+
pillColor++; // eslint-disable-line isaacscript/strict-enums
|
|
1045
1060
|
}
|
|
1061
|
+
|
|
1062
|
+
y = 3;
|
|
1063
|
+
const worldPosition1 = gridCoordinatesToWorldPosition(0, y);
|
|
1064
|
+
spawnPill(PillColor.GOLD, worldPosition1);
|
|
1065
|
+
const worldPosition2 = gridCoordinatesToWorldPosition(1, y);
|
|
1066
|
+
spawnPill(PillColor.HORSE_GOLD, worldPosition2);
|
|
1046
1067
|
}
|
|
1047
1068
|
|
|
1048
1069
|
/** Warps to the first Planetarium on the floor. */
|
package/src/functions/rooms.ts
CHANGED
|
@@ -541,9 +541,17 @@ export function inStartingRoom(): boolean {
|
|
|
541
541
|
* @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
|
|
542
542
|
* the array will be ignored. If not specified, then all rooms will be
|
|
543
543
|
* checked. Undefined by default.
|
|
544
|
+
* @param includeSecretAndSuperSecretRoom Optional. Whether or not to include the Secret Room and
|
|
545
|
+
* the Super Secret Room. Default is false.
|
|
546
|
+
* @param includeUltraSecretRoom Optional. Whether or not to include the Ultra Secret Room. Default
|
|
547
|
+
* is false.
|
|
544
548
|
* @allowEmptyVariadic
|
|
545
549
|
*/
|
|
546
|
-
export function isAllRoomsClear(
|
|
550
|
+
export function isAllRoomsClear(
|
|
551
|
+
onlyCheckRoomTypes?: RoomType[],
|
|
552
|
+
includeSecretAndSuperSecretRoom = false,
|
|
553
|
+
includeUltraSecretRoom = false,
|
|
554
|
+
): boolean {
|
|
547
555
|
const rooms = getRoomsInsideGrid();
|
|
548
556
|
|
|
549
557
|
let matchingRooms: RoomDescriptor[];
|
|
@@ -558,6 +566,23 @@ export function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean {
|
|
|
558
566
|
);
|
|
559
567
|
}
|
|
560
568
|
|
|
569
|
+
if (!includeSecretAndSuperSecretRoom) {
|
|
570
|
+
matchingRooms = matchingRooms.filter(
|
|
571
|
+
(roomDescriptor) =>
|
|
572
|
+
roomDescriptor.Data !== undefined &&
|
|
573
|
+
roomDescriptor.Data.Type !== RoomType.SECRET &&
|
|
574
|
+
roomDescriptor.Data.Type !== RoomType.SUPER_SECRET,
|
|
575
|
+
);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (!includeUltraSecretRoom) {
|
|
579
|
+
matchingRooms = matchingRooms.filter(
|
|
580
|
+
(roomDescriptor) =>
|
|
581
|
+
roomDescriptor.Data !== undefined &&
|
|
582
|
+
roomDescriptor.Data.Type !== RoomType.ULTRA_SECRET,
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
|
|
561
586
|
return matchingRooms.every((roomDescriptor) => roomDescriptor.Clear);
|
|
562
587
|
}
|
|
563
588
|
|