isaacscript-common 4.3.0 → 4.3.3
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/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -1
- package/features/extraConsoleCommands/commandsSubroutines.lua +1 -1
- package/features/extraConsoleCommands/init.lua +1 -1
- package/features/extraConsoleCommands/listCommands.d.ts +3 -3
- package/features/extraConsoleCommands/listCommands.lua +6 -6
- package/functions/nextStage.lua +6 -0
- package/functions/rooms.d.ts +2 -2
- package/functions/rooms.lua +2 -2
- package/index.d.ts +1 -0
- package/index.lua +8 -0
- package/objects/roomTypeNames.lua +1 -1
- package/package.json +1 -1
|
@@ -5,5 +5,5 @@ export declare function devilAngel(useDevil: boolean): void;
|
|
|
5
5
|
export declare function listEntities(params: string, includeBackgroundEffects: boolean): void;
|
|
6
6
|
export declare function listGridEntities(params: string, includeWalls: boolean): void;
|
|
7
7
|
export declare function movePlayer(params: string, direction: Direction): void;
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function spawnTrapdoorOrCrawlSpace(trapdoor: boolean): void;
|
|
9
9
|
export declare function warpToRoomType(roomType: RoomType): void;
|
|
@@ -98,7 +98,7 @@ function ____exports.movePlayer(self, params, direction)
|
|
|
98
98
|
local modifiedVector = vector * amount
|
|
99
99
|
player.Position = player.Position + modifiedVector
|
|
100
100
|
end
|
|
101
|
-
function ____exports.
|
|
101
|
+
function ____exports.spawnTrapdoorOrCrawlSpace(self, trapdoor)
|
|
102
102
|
local room = game:GetRoom()
|
|
103
103
|
local player = Isaac.GetPlayer()
|
|
104
104
|
local position = room:FindFreeTilePosition(player.Position, 0)
|
|
@@ -146,7 +146,7 @@ commandFunctionsMap:set("charge", commands.charge)
|
|
|
146
146
|
commandFunctionsMap:set("cleanBedroom", commands.cleanBedroom)
|
|
147
147
|
commandFunctionsMap:set("coin", commands.coin)
|
|
148
148
|
commandFunctionsMap:set("coins", commands.coins)
|
|
149
|
-
commandFunctionsMap:set("
|
|
149
|
+
commandFunctionsMap:set("crawlSpace", commands.crawlSpace)
|
|
150
150
|
commandFunctionsMap:set("d20", commands.d20)
|
|
151
151
|
commandFunctionsMap:set("d6", commands.d6)
|
|
152
152
|
commandFunctionsMap:set("damage", commands.damage)
|
|
@@ -90,8 +90,8 @@ export declare function coin(params: string): void;
|
|
|
90
90
|
* to remove coins.)
|
|
91
91
|
*/
|
|
92
92
|
export declare function coins(params: string): void;
|
|
93
|
-
/** Creates a
|
|
94
|
-
export declare function
|
|
93
|
+
/** Creates a crawl space next to the player. */
|
|
94
|
+
export declare function crawlSpace(): void;
|
|
95
95
|
/** Uses the D20. */
|
|
96
96
|
export declare function d20(): void;
|
|
97
97
|
/** Uses the D6. */
|
|
@@ -111,7 +111,7 @@ export declare function dirtyBedroom(): void;
|
|
|
111
111
|
export declare function disableCurses(): void;
|
|
112
112
|
/** Moves the player 0.5 units down. Provide a number to move a custom amount of units. */
|
|
113
113
|
export declare function down(params: string): void;
|
|
114
|
-
/** Warps to the Dungeon (i.e.
|
|
114
|
+
/** Warps to the Dungeon (i.e. crawl space) for the floor. */
|
|
115
115
|
export declare function dungeon(): void;
|
|
116
116
|
/** Logs the player's current temporary effects to the "log.txt" file. */
|
|
117
117
|
export declare function effects(): void;
|
|
@@ -93,7 +93,7 @@ local devilAngel = ____commandsSubroutines.devilAngel
|
|
|
93
93
|
local listEntities = ____commandsSubroutines.listEntities
|
|
94
94
|
local listGridEntities = ____commandsSubroutines.listGridEntities
|
|
95
95
|
local movePlayer = ____commandsSubroutines.movePlayer
|
|
96
|
-
local
|
|
96
|
+
local spawnTrapdoorOrCrawlSpace = ____commandsSubroutines.spawnTrapdoorOrCrawlSpace
|
|
97
97
|
local warpToRoomType = ____commandsSubroutines.warpToRoomType
|
|
98
98
|
local ____v = require("features.extraConsoleCommands.v")
|
|
99
99
|
local v = ____v.default
|
|
@@ -466,9 +466,9 @@ function ____exports.coins(self, params)
|
|
|
466
466
|
local player = Isaac.GetPlayer()
|
|
467
467
|
player:AddCoins(numCoins)
|
|
468
468
|
end
|
|
469
|
-
--- Creates a
|
|
470
|
-
function ____exports.
|
|
471
|
-
|
|
469
|
+
--- Creates a crawl space next to the player.
|
|
470
|
+
function ____exports.crawlSpace(self)
|
|
471
|
+
spawnTrapdoorOrCrawlSpace(nil, false)
|
|
472
472
|
end
|
|
473
473
|
--- Uses the D20.
|
|
474
474
|
function ____exports.d20(self)
|
|
@@ -502,7 +502,7 @@ end
|
|
|
502
502
|
function ____exports.down(self, params)
|
|
503
503
|
movePlayer(nil, params, Direction.DOWN)
|
|
504
504
|
end
|
|
505
|
-
--- Warps to the Dungeon (i.e.
|
|
505
|
+
--- Warps to the Dungeon (i.e. crawl space) for the floor.
|
|
506
506
|
function ____exports.dungeon(self)
|
|
507
507
|
changeRoom(nil, GridRoom.DUNGEON)
|
|
508
508
|
end
|
|
@@ -1050,7 +1050,7 @@ function ____exports.tears(self)
|
|
|
1050
1050
|
end
|
|
1051
1051
|
--- Creates a trapdoor next to the player.
|
|
1052
1052
|
function ____exports.trapdoorCommand(self)
|
|
1053
|
-
|
|
1053
|
+
spawnTrapdoorOrCrawlSpace(nil, true)
|
|
1054
1054
|
end
|
|
1055
1055
|
--- Warps to the first Treasure Room on the floor.
|
|
1056
1056
|
function ____exports.treasure(self)
|
package/functions/nextStage.lua
CHANGED
|
@@ -240,6 +240,12 @@ function ____exports.getNextStageType(self, upwards)
|
|
|
240
240
|
end
|
|
241
241
|
return StageType.WRATH_OF_THE_LAMB
|
|
242
242
|
end
|
|
243
|
+
if nextStage == LevelStage.THE_VOID then
|
|
244
|
+
return StageType.ORIGINAL
|
|
245
|
+
end
|
|
246
|
+
if nextStage == LevelStage.HOME then
|
|
247
|
+
return StageType.ORIGINAL
|
|
248
|
+
end
|
|
243
249
|
return calculateStageType(nil, nextStage)
|
|
244
250
|
end
|
|
245
251
|
return ____exports
|
package/functions/rooms.d.ts
CHANGED
|
@@ -79,11 +79,11 @@ export declare function inBeastRoom(): boolean;
|
|
|
79
79
|
*/
|
|
80
80
|
export declare function inBossRoomOf(bossID: BossID): boolean;
|
|
81
81
|
/**
|
|
82
|
-
* Helper function for determining whether the current room is a
|
|
82
|
+
* Helper function for determining whether the current room is a crawl space. Use this function over
|
|
83
83
|
* comparing to `RoomType.DUNGEON` or `GridRoom.DUNGEON_IDX` since there is a special case of the
|
|
84
84
|
* player being in a boss fight that take place in a dungeon.
|
|
85
85
|
*/
|
|
86
|
-
export declare function
|
|
86
|
+
export declare function inCrawlSpace(): boolean;
|
|
87
87
|
/**
|
|
88
88
|
* We cannot use the standard code in the `inDimension` function for this purpose since it is bugged
|
|
89
89
|
* with the Death Certificate area.
|
package/functions/rooms.lua
CHANGED
|
@@ -253,10 +253,10 @@ function ____exports.inBossRoomOf(self, bossID)
|
|
|
253
253
|
local roomSubType = getRoomSubType(nil)
|
|
254
254
|
return roomType == RoomType.BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == bossID
|
|
255
255
|
end
|
|
256
|
-
--- Helper function for determining whether the current room is a
|
|
256
|
+
--- Helper function for determining whether the current room is a crawl space. Use this function over
|
|
257
257
|
-- comparing to `RoomType.DUNGEON` or `GridRoom.DUNGEON_IDX` since there is a special case of the
|
|
258
258
|
-- player being in a boss fight that take place in a dungeon.
|
|
259
|
-
function ____exports.
|
|
259
|
+
function ____exports.inCrawlSpace(self)
|
|
260
260
|
local room = game:GetRoom()
|
|
261
261
|
local roomType = room:GetType()
|
|
262
262
|
local roomSubType = getRoomSubType(nil)
|
package/index.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export * from "./functions/log";
|
|
|
77
77
|
export * from "./functions/map";
|
|
78
78
|
export * from "./functions/math";
|
|
79
79
|
export * from "./functions/mergeTests";
|
|
80
|
+
export * from "./functions/nextStage";
|
|
80
81
|
export * from "./functions/npc";
|
|
81
82
|
export * from "./functions/pickups";
|
|
82
83
|
export * from "./functions/pickupVariants";
|
package/index.lua
CHANGED
|
@@ -612,6 +612,14 @@ do
|
|
|
612
612
|
end
|
|
613
613
|
end
|
|
614
614
|
end
|
|
615
|
+
do
|
|
616
|
+
local ____export = require("functions.nextStage")
|
|
617
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
618
|
+
if ____exportKey ~= "default" then
|
|
619
|
+
____exports[____exportKey] = ____exportValue
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
end
|
|
615
623
|
do
|
|
616
624
|
local ____export = require("functions.npc")
|
|
617
625
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -19,7 +19,7 @@ ____exports.ROOM_TYPE_NAMES = {
|
|
|
19
19
|
[RoomType.SACRIFICE] = "Sacrifice Room",
|
|
20
20
|
[RoomType.DEVIL] = "Devil Room",
|
|
21
21
|
[RoomType.ANGEL] = "Angel Room",
|
|
22
|
-
[RoomType.DUNGEON] = "
|
|
22
|
+
[RoomType.DUNGEON] = "Crawl Space",
|
|
23
23
|
[RoomType.BOSS_RUSH] = "Boss Rush",
|
|
24
24
|
[RoomType.CLEAN_BEDROOM] = "Clean Bedroom",
|
|
25
25
|
[RoomType.DIRTY_BEDROOM] = "Dirty Bedroom",
|