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.
@@ -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 spawnTrapdoorOrCrawlspace(trapdoor: boolean): void;
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.spawnTrapdoorOrCrawlspace(self, trapdoor)
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("crawlspace", commands.crawlspace)
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 crawlspace next to the player. */
94
- export declare function crawlspace(): void;
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. Crawlspace) for the floor. */
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 spawnTrapdoorOrCrawlspace = ____commandsSubroutines.spawnTrapdoorOrCrawlspace
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 crawlspace next to the player.
470
- function ____exports.crawlspace(self)
471
- spawnTrapdoorOrCrawlspace(nil, false)
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. Crawlspace) for the floor.
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
- spawnTrapdoorOrCrawlspace(nil, true)
1053
+ spawnTrapdoorOrCrawlSpace(nil, true)
1054
1054
  end
1055
1055
  --- Warps to the first Treasure Room on the floor.
1056
1056
  function ____exports.treasure(self)
@@ -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
@@ -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 crawlspace. Use this function over
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 inCrawlspace(): boolean;
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.
@@ -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 crawlspace. Use this function over
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.inCrawlspace(self)
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] = "Crawlspace",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "4.3.0",
3
+ "version": "4.3.3",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",