isaacscript-common 6.2.1 → 6.5.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.
Files changed (109) hide show
  1. package/cachedClasses.d.ts +15 -0
  2. package/cachedClasses.lua +20 -0
  3. package/callbacks/reorderedCallbacks.d.ts +9 -0
  4. package/callbacks/reorderedCallbacks.lua +9 -0
  5. package/constants.d.ts +26 -4
  6. package/constants.lua +20 -4
  7. package/enums/CornerType.d.ts +6 -0
  8. package/enums/CornerType.lua +11 -0
  9. package/enums/DecorationVariant.d.ts +9 -0
  10. package/enums/DecorationVariant.lua +7 -0
  11. package/enums/RockAltType.d.ts +7 -0
  12. package/enums/RockAltType.lua +13 -0
  13. package/features/customGridEntity.d.ts +2 -2
  14. package/features/customGridEntity.lua +7 -5
  15. package/features/customStage/backdrop.d.ts +2 -0
  16. package/features/customStage/backdrop.lua +211 -0
  17. package/features/customStage/customStageConstants.d.ts +1 -0
  18. package/features/customStage/customStageConstants.lua +3 -0
  19. package/features/customStage/exports.d.ts +28 -0
  20. package/features/customStage/exports.lua +58 -1
  21. package/features/customStage/gridEntities.d.ts +18 -0
  22. package/features/customStage/gridEntities.lua +215 -0
  23. package/features/customStage/init.d.ts +2 -1
  24. package/features/customStage/init.lua +71 -9
  25. package/features/customStage/streakText.d.ts +2 -0
  26. package/features/customStage/streakText.lua +22 -0
  27. package/features/customStage/v.d.ts +10 -0
  28. package/features/customStage/v.lua +4 -0
  29. package/features/customStage/versusScreen.d.ts +3 -0
  30. package/features/customStage/versusScreen.lua +201 -0
  31. package/features/debugDisplay/debugDisplay.lua +2 -0
  32. package/features/debugDisplay/exports.d.ts +108 -0
  33. package/features/debugDisplay/exports.lua +145 -0
  34. package/features/debugDisplay/v.d.ts +2 -0
  35. package/features/debugDisplay/v.lua +9 -0
  36. package/features/deployJSONRoom.lua +6 -2
  37. package/features/extraConsoleCommands/init.lua +10 -1
  38. package/features/extraConsoleCommands/listCommands.d.ts +21 -6
  39. package/features/extraConsoleCommands/listCommands.lua +50 -19
  40. package/features/extraConsoleCommands/v.d.ts +1 -0
  41. package/features/extraConsoleCommands/v.lua +2 -1
  42. package/features/pause.d.ts +11 -0
  43. package/features/pause.lua +71 -0
  44. package/features/runNextRoom.d.ts +8 -0
  45. package/features/runNextRoom.lua +40 -0
  46. package/features/saveDataManager/exports.lua +2 -2
  47. package/features/saveDataManager/load.lua +3 -3
  48. package/features/saveDataManager/main.lua +3 -3
  49. package/features/saveDataManager/merge.lua +2 -2
  50. package/features/saveDataManager/save.lua +3 -3
  51. package/features/saveDataManager/{constants.d.ts → saveDataManagerConstants.d.ts} +0 -0
  52. package/features/saveDataManager/{constants.lua → saveDataManagerConstants.lua} +0 -0
  53. package/functions/chargeBar.lua +4 -6
  54. package/functions/color.d.ts +0 -2
  55. package/functions/color.lua +0 -4
  56. package/functions/deepCopy.lua +2 -2
  57. package/functions/direction.d.ts +1 -1
  58. package/functions/doors.d.ts +12 -7
  59. package/functions/doors.lua +14 -11
  60. package/functions/entity.d.ts +5 -0
  61. package/functions/entity.lua +13 -0
  62. package/functions/gridEntity.d.ts +39 -0
  63. package/functions/gridEntity.lua +83 -2
  64. package/functions/kColor.d.ts +0 -2
  65. package/functions/kColor.lua +0 -4
  66. package/functions/log.lua +2 -1
  67. package/functions/pickups.d.ts +9 -9
  68. package/functions/playerCenter.lua +4 -5
  69. package/functions/playerIndex.d.ts +3 -0
  70. package/functions/playerIndex.lua +3 -0
  71. package/functions/roomShape.d.ts +10 -4
  72. package/functions/roomShape.lua +15 -2
  73. package/functions/run.d.ts +7 -0
  74. package/functions/run.lua +16 -4
  75. package/functions/sprite.d.ts +1 -1
  76. package/functions/sprite.lua +1 -1
  77. package/functions/ui.d.ts +2 -0
  78. package/functions/ui.lua +8 -0
  79. package/functions/utils.d.ts +6 -4
  80. package/functions/utils.lua +6 -4
  81. package/index.d.ts +1 -1
  82. package/index.lua +2 -0
  83. package/initFeatures.lua +7 -1
  84. package/interfaces/Corner.d.ts +6 -0
  85. package/interfaces/Corner.lua +2 -0
  86. package/interfaces/CustomStageLua.d.ts +236 -63
  87. package/objects/backdropTypeToRockAltType.d.ts +6 -0
  88. package/objects/backdropTypeToRockAltType.lua +69 -0
  89. package/objects/bossNamePNGFileNames.d.ts +5 -0
  90. package/objects/bossNamePNGFileNames.lua +108 -0
  91. package/objects/bossPortraitPNGFileNames.d.ts +5 -0
  92. package/objects/bossPortraitPNGFileNames.lua +108 -0
  93. package/objects/colors.d.ts +15 -8
  94. package/objects/colors.lua +9 -2
  95. package/objects/playerNamePNGFileNames.d.ts +5 -0
  96. package/objects/playerNamePNGFileNames.lua +49 -0
  97. package/objects/playerPortraitPNGFileNames.d.ts +5 -0
  98. package/objects/playerPortraitPNGFileNames.lua +49 -0
  99. package/objects/roomShapeCorners.d.ts +6 -0
  100. package/objects/roomShapeCorners.lua +259 -0
  101. package/objects/roomShapeToBottomRightPosition.d.ts +1 -1
  102. package/objects/roomShapeToTopLeftPosition.d.ts +1 -1
  103. package/objects/versusScreenBackgroundColors.d.ts +5 -0
  104. package/objects/versusScreenBackgroundColors.lua +38 -0
  105. package/objects/versusScreenDirtSpotColors.d.ts +5 -0
  106. package/objects/versusScreenDirtSpotColors.lua +38 -0
  107. package/package.json +2 -2
  108. package/sets/narrowRoomShapesSet.d.ts +2 -0
  109. package/sets/narrowRoomShapesSet.lua +8 -0
@@ -12,7 +12,7 @@ function ____exports.texelEquals(self, sprite1, sprite2, position, layerID)
12
12
  local kColor2 = sprite2:GetTexel(position, VectorZero, 1, layerID)
13
13
  return kColorEquals(nil, kColor1, kColor2)
14
14
  end
15
- --- Helper function to clear a specific layer from a sprite.
15
+ --- Helper function to clear all layers or specific layers from a sprite.
16
16
  --
17
17
  -- This function is variadic, so pass as many layer IDs as you want to clear. If no specific layers
18
18
  -- are passed, it will clear every layer.
package/functions/ui.d.ts CHANGED
@@ -23,9 +23,11 @@ export declare function getHeartRowLength(player: EntityPlayer): int;
23
23
  * combination with the the `getHUDOffsetVector` helper function.
24
24
  */
25
25
  export declare function getHeartsUIWidth(): int;
26
+ export declare function getScreenBottomCenterPos(): Vector;
26
27
  export declare function getScreenBottomLeftPos(): Vector;
27
28
  export declare function getScreenBottomRightPos(): Vector;
28
29
  export declare function getScreenCenterPos(): Vector;
30
+ export declare function getScreenTopCenterPos(): Vector;
29
31
  export declare function getScreenTopLeftPos(): Vector;
30
32
  export declare function getScreenTopRightPos(): Vector;
31
33
  /**
package/functions/ui.lua CHANGED
@@ -79,6 +79,10 @@ function ____exports.getHeartsUIWidth(self)
79
79
  end
80
80
  return width
81
81
  end
82
+ function ____exports.getScreenBottomCenterPos(self)
83
+ local bottomRight = ____exports.getScreenBottomRightPos(nil)
84
+ return Vector(bottomRight.X / 2, bottomRight.Y)
85
+ end
82
86
  function ____exports.getScreenBottomLeftPos(self)
83
87
  local bottomRight = ____exports.getScreenBottomRightPos(nil)
84
88
  return Vector(0, bottomRight.Y)
@@ -87,6 +91,10 @@ function ____exports.getScreenCenterPos(self)
87
91
  local bottomRight = ____exports.getScreenBottomRightPos(nil)
88
92
  return bottomRight / 2
89
93
  end
94
+ function ____exports.getScreenTopCenterPos(self)
95
+ local bottomRight = ____exports.getScreenBottomRightPos(nil)
96
+ return Vector(bottomRight.X / 2, 0)
97
+ end
90
98
  function ____exports.getScreenTopLeftPos(self)
91
99
  return copyVector(nil, VectorZero)
92
100
  end
@@ -4,9 +4,10 @@
4
4
  * Helper function to return an array with the elements from start to end. It is inclusive at the
5
5
  * start and exclusive at the end. (The "e" stands for exclusive.)
6
6
  *
7
- * For example, `erange(1, 3)` will return `[1, 2]`.
8
- *
9
7
  * If only one argument is specified, then it will assume that the start is 0.
8
+ *
9
+ * - For example, `erange(1, 3)` will return `[1, 2]`.
10
+ * - For example, `erange(2)` will return `[0, 1]`.
10
11
  */
11
12
  export declare function erange(start: int, end?: int): int[];
12
13
  /**
@@ -24,9 +25,10 @@ export declare function hexToKColor(hexString: string, alpha: float): KColor;
24
25
  * Helper function to return an array with the elements from start to end, inclusive. (The "i"
25
26
  * stands for inclusive.)
26
27
  *
27
- * For example, `irange(1, 3)` will return `[1, 2, 3]`.
28
- *
29
28
  * If only one argument is specified, then it will assume that the start is 0.
29
+ *
30
+ * - For example, `irange(1, 3)` will return `[1, 2, 3]`.
31
+ * - For example, `irange(2)` will return `[0, 1, 2]`.
30
32
  */
31
33
  export declare function irange(start: int, end?: int): int[];
32
34
  /**
@@ -12,9 +12,10 @@ local HEX_STRING_LENGTH = 6
12
12
  --- Helper function to return an array with the elements from start to end. It is inclusive at the
13
13
  -- start and exclusive at the end. (The "e" stands for exclusive.)
14
14
  --
15
- -- For example, `erange(1, 3)` will return `[1, 2]`.
16
- --
17
15
  -- If only one argument is specified, then it will assume that the start is 0.
16
+ --
17
+ -- - For example, `erange(1, 3)` will return `[1, 2]`.
18
+ -- - For example, `erange(2)` will return `[0, 1]`.
18
19
  function ____exports.erange(self, start, ____end)
19
20
  if ____end == nil then
20
21
  ____end = start
@@ -68,9 +69,10 @@ end
68
69
  --- Helper function to return an array with the elements from start to end, inclusive. (The "i"
69
70
  -- stands for inclusive.)
70
71
  --
71
- -- For example, `irange(1, 3)` will return `[1, 2, 3]`.
72
- --
73
72
  -- If only one argument is specified, then it will assume that the start is 0.
73
+ --
74
+ -- - For example, `irange(1, 3)` will return `[1, 2, 3]`.
75
+ -- - For example, `irange(2)` will return `[0, 1, 2]`.
74
76
  function ____exports.irange(self, start, ____end)
75
77
  if ____end == nil then
76
78
  ____end = start
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from "./cachedClasses";
2
2
  export { initCustomDoor, spawnCustomDoor, } from "./callbacks/postCustomDoorEnter";
3
- export { forceNewLevelCallback, forceNewRoomCallback, } from "./callbacks/reorderedCallbacks";
3
+ export { forceNewLevelCallback, forceNewRoomCallback, reorderedCallbacksSetStage, } from "./callbacks/reorderedCallbacks";
4
4
  export * from "./classes/DefaultMap";
5
5
  export * from "./classes/ModUpgraded";
6
6
  export * from "./constants";
package/index.lua CHANGED
@@ -18,8 +18,10 @@ do
18
18
  local ____reorderedCallbacks = require("callbacks.reorderedCallbacks")
19
19
  local forceNewLevelCallback = ____reorderedCallbacks.forceNewLevelCallback
20
20
  local forceNewRoomCallback = ____reorderedCallbacks.forceNewRoomCallback
21
+ local reorderedCallbacksSetStage = ____reorderedCallbacks.reorderedCallbacksSetStage
21
22
  ____exports.forceNewLevelCallback = forceNewLevelCallback
22
23
  ____exports.forceNewRoomCallback = forceNewRoomCallback
24
+ ____exports.reorderedCallbacksSetStage = reorderedCallbacksSetStage
23
25
  end
24
26
  do
25
27
  local ____export = require("classes.DefaultMap")
package/initFeatures.lua CHANGED
@@ -21,6 +21,8 @@ local ____fastReset = require("features.fastReset")
21
21
  local fastResetInit = ____fastReset.fastResetInit
22
22
  local ____forgottenSwitch = require("features.forgottenSwitch")
23
23
  local forgottenSwitchInit = ____forgottenSwitch.forgottenSwitchInit
24
+ local ____pause = require("features.pause")
25
+ local pauseInit = ____pause.pauseInit
24
26
  local ____persistentEntities = require("features.persistentEntities")
25
27
  local persistentEntitiesInit = ____persistentEntities.persistentEntitiesInit
26
28
  local ____playerInventory = require("features.playerInventory")
@@ -35,6 +37,8 @@ local ____roomClearFrame = require("features.roomClearFrame")
35
37
  local roomClearFrameInit = ____roomClearFrame.roomClearFrameInit
36
38
  local ____runInNFrames = require("features.runInNFrames")
37
39
  local runInNFramesInit = ____runInNFrames.runInNFramesInit
40
+ local ____runNextRoom = require("features.runNextRoom")
41
+ local runNextRoomInit = ____runNextRoom.runNextRoomInit
38
42
  local ____sirenHelpers = require("features.sirenHelpers")
39
43
  local sirenHelpersInit = ____sirenHelpers.sirenHelpersInit
40
44
  local ____stageHistory = require("features.stageHistory")
@@ -42,7 +46,7 @@ local stageHistoryInit = ____stageHistory.stageHistoryInit
42
46
  local ____taintedLazarusPlayers = require("features.taintedLazarusPlayers")
43
47
  local taintedLazarusPlayersInit = ____taintedLazarusPlayers.taintedLazarusPlayersInit
44
48
  function ____exports.initFeaturesMajor(self, mod)
45
- customStageInit(nil)
49
+ customStageInit(nil, mod)
46
50
  deployJSONRoomInit(nil, mod)
47
51
  runInNFramesInit(nil, mod)
48
52
  characterStatsInit(nil, mod)
@@ -56,12 +60,14 @@ function ____exports.initFeaturesMinor(self, mod)
56
60
  fastResetInit(nil, mod)
57
61
  forgottenSwitchInit(nil, mod)
58
62
  collectibleItemPoolTypeInit(nil, mod)
63
+ pauseInit(nil, mod)
59
64
  persistentEntitiesInit(nil, mod)
60
65
  playerInventoryInit(nil, mod)
61
66
  ponyDetectionInit(nil, mod)
62
67
  preventCollectibleRotationInit(nil, mod)
63
68
  registerHotkeyInit(nil, mod)
64
69
  roomClearFrameInit(nil, mod)
70
+ runNextRoomInit(nil, mod)
65
71
  sirenHelpersInit(nil, mod)
66
72
  stageHistoryInit(nil, mod)
67
73
  taintedLazarusPlayersInit(nil, mod)
@@ -0,0 +1,6 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { CornerType } from "../enums/CornerType";
3
+ export interface Corner {
4
+ readonly type: CornerType;
5
+ readonly position: Readonly<Vector>;
6
+ }
@@ -0,0 +1,2 @@
1
+ local ____exports = {}
2
+ return ____exports
@@ -9,90 +9,264 @@
9
9
  *
10
10
  * The `CustomStageLua` interface extends this, adding room metadata.
11
11
  */
12
- export interface CustomStageTSConfig {
12
+ export declare type CustomStageTSConfig = Readonly<{
13
13
  /** The name of the custom stage. Mandatory. */
14
- readonly name: string;
14
+ name: string;
15
15
  /**
16
16
  * Path to the XML file that contains the rooms for the custom stage (created with Basement
17
17
  * Renovator). Mandatory.
18
18
  */
19
- readonly xmlPath: string;
19
+ xmlPath: string;
20
20
  /** An arbitrarily chosen prefix in the range of 101-999. Mandatory. */
21
- readonly roomVariantPrefix: number;
21
+ roomVariantPrefix: number;
22
22
  /**
23
23
  * An integer between 2 and 13, corresponding to the `LevelStage` enum. This is the number of the
24
24
  * stage that will be warped to and used as a basis for the stage by the level generation
25
25
  * algorithm. Mandatory.
26
26
  *
27
- * (It is not possible to use Basement 1 as a base due to conflicts with the `Game.SetStage`
27
+ * (It is not possible to use Basement 1 as a base stage due to conflicts with the `Game.SetStage`
28
28
  * method.)
29
29
  */
30
- readonly baseStage: number;
30
+ baseStage: number;
31
31
  /**
32
32
  * An integer between 0 and 5, corresponding to the `StageType` enum. This is the number of the
33
33
  * stage type that will be warped to and used as a basis for the stage by the level generation
34
34
  * algorithm. Mandatory.
35
35
  */
36
- readonly baseStageType: number;
36
+ baseStageType: number;
37
37
  /**
38
- * An object containing the paths to the backdrop for the stage. (A backdrop is the graphics for
39
- * the walls and floor.) Mandatory.
38
+ * Optional. An object containing the paths to the backdrop graphics for the stage. (A backdrop is
39
+ * the graphics for the walls and floor.) If not specified, the graphics for Basement will be
40
+ * used.
40
41
  */
41
- readonly backdrop: CustomStageBackdrop;
42
- }
43
- interface CustomStageBackdrop {
44
- /**
45
- * The beginning of the path that leads to the backdrop graphics. For example:
46
- *
47
- * ```sh
48
- * gfx/backdrop/revelations/revelations_
49
- * ```
50
- */
51
- prefix: string;
52
- /**
53
- * The end of the path that leads to the backdrop graphics. In most cases, this will be ".png".
54
- */
55
- suffix: string;
42
+ backdrop?: Readonly<{
43
+ /**
44
+ * The beginning of the path that leads to the backdrop graphics. For example:
45
+ *
46
+ * ```sh
47
+ * gfx/backdrop/revelations/revelations_
48
+ * ```
49
+ */
50
+ prefix: string;
51
+ /**
52
+ * The end of the path that leads to the backdrop graphics. In most cases, this will be ".png".
53
+ */
54
+ suffix: string;
55
+ /**
56
+ * An array of strings that represent the graphic files that are used for the floors in narrow
57
+ * rooms. (The "n" stands for "narrow").
58
+ *
59
+ * You must have at least one string in this array, but you can specify more than one to
60
+ * randomly add extra variety (like the vanilla stages do).
61
+ *
62
+ * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement_nfloor.png".
63
+ */
64
+ nFloors: readonly string[];
65
+ /**
66
+ * An array of strings that represent the graphic files that are used for the floors in L rooms.
67
+ *
68
+ * You must have at least one string in this array, but you can specify more than one to
69
+ * randomly add extra variety (like the vanilla stages do).
70
+ *
71
+ * For an example of this, see the vanilla file "resources/gfx/backdrop/01_lbasementfloor.png".
72
+ */
73
+ lFloors: readonly string[];
74
+ /**
75
+ * An array of strings that represent the graphic files for the stage's walls.
76
+ *
77
+ * You must have at least one string in this array, but you can specify more than one to
78
+ * randomly add extra variety (like the vanilla stages do).
79
+ *
80
+ * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In
81
+ * the vanilla file, they concatenate all four variations together into one PNG file. However,
82
+ * for the custom stages feature, you must separate each wall variation into a separate file.)
83
+ */
84
+ walls: readonly string[];
85
+ /**
86
+ * An array of strings that represent the graphic files for the stage's corners. You must have
87
+ * at least one string in this array, but you can specify more than one to randomly add extra
88
+ * variety (like the vanilla stages do).
89
+ *
90
+ * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In
91
+ * the vanilla file, they concatenate both variations together into one PNG file and put it in
92
+ * the top right hand corner. The corners are shown in the top right hand corner of the file,
93
+ * with two different variations concatenated together. However, for the custom stages feature,
94
+ * you must separate each corner variation into a separate file (and put it in a different file
95
+ * from the walls).
96
+ */
97
+ corners: readonly string[];
98
+ }>;
56
99
  /**
57
- * An array of strings that represent the graphic files for the stage's "nFloor". You must have at
58
- * least one string in this array, but you can specify more than one to randomly add extra variety
59
- * (like the vanilla stages do).
100
+ * Optional. The path to the spritesheet that contains the graphics of the decorations for the
101
+ * floor.
60
102
  *
61
- * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement_nfloor.png".
103
+ * If not specified, the vanilla Basement decorations spritesheet will be used. For reference,
104
+ * this is located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
105
+ * Rebirth\resources\gfx\grid\props_01_basement.png`
62
106
  */
63
- nFloors: string[];
107
+ decorationsPNGPath?: string;
64
108
  /**
65
- * An array of strings that represent the graphic files for the stage's "lFloor". You must have at
66
- * least one in the array, but you can specify more than one to randomly add extra variety (like
67
- * the vanilla stages do).
109
+ * Optional. The path to the spritesheet that contains the graphics of the rocks/blocks/urns for
110
+ * the floor.
68
111
  *
69
- * For an example of this, see the vanilla file "resources/gfx/backdrop/01_lbasementfloor.png".
70
- */
71
- lFloors: string[];
72
- /**
73
- * An array of strings that represent the graphic files for the stage's walls. You must have at
74
- * least one string in this array, but you can specify more than one to randomly add extra variety
75
- * (like the vanilla stages do).
112
+ * If specified, it is assumed that you have your own custom rock alt type, and all vanilla
113
+ * rewards/enemies that spawn from urns will be automatically removed. Use the
114
+ * `POST_GRID_ENTITY_BROKEN` callback to make your own custom rewards. Or, if you want to emulate
115
+ * a vanilla urn/mushroom/skull/polyp/bucket, use the `spawnRockAltReward` helper function.
76
116
  *
77
- * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In the
78
- * vanilla file, they concatenate all four variations together into one PNG file. However, for the
79
- * custom stages feature, you must separate each wall variation into a separate file.)
117
+ * If not specified, the vanilla Basement rocks spritesheet will be used. For reference, this is
118
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
119
+ * Rebirth\resources-dlc3\gfx\grid\rocks_basement.png`
80
120
  */
81
- walls: string[];
121
+ rocksPNGPath?: string;
82
122
  /**
83
- * An array of strings that represent the graphic files for the stage's corners. You must have at
84
- * least one string in this array, but you can specify more than one to randomly add extra variety
85
- * (like the vanilla stages do).
123
+ * Optional. The path to the spritesheet that contains the graphics of the pits for the floor.
86
124
  *
87
- * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In the
88
- * vanilla file, they concatenate both variations together into one PNG file and put it in the top
89
- * right hand corner. The corners are shown in the top right hand corner of the file, with two
90
- * different variations concatenated together. However, for the custom stages feature, you must
91
- * separate each corner variation into a separate file (and put it in a different file from the
92
- * walls).
125
+ * If not specified, the vanilla Basement pits spritesheet will be used. For reference, this is
126
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
127
+ * Rebirth\resources\gfx\grid\grid_pit.png`
93
128
  */
94
- corners: string[];
95
- }
129
+ pitsPNGPath?: string;
130
+ /** Optional. A collection of paths that contain graphics for the doors of the floor. */
131
+ doorPNGPaths?: Readonly<{
132
+ /**
133
+ * Optional. The path to the spritesheet that contains the graphics of the normal doors for the
134
+ * floor.
135
+ *
136
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
137
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
138
+ * Rebirth\resources\gfx\grid\door_01_normaldoor.png`
139
+ */
140
+ normal?: string;
141
+ /**
142
+ * Optional. The path to the spritesheet that contains the graphics of the Treasure Room doors
143
+ * for the floor.
144
+ *
145
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
146
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
147
+ * Rebirth\resources\gfx\grid\door_02_treasureroomdoor.png`
148
+ */
149
+ treasureRoom?: string;
150
+ /**
151
+ * Optional. The path to the spritesheet that contains the graphics of the Boss Room doors for
152
+ * the floor.
153
+ *
154
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
155
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
156
+ * Rebirth\resources\gfx\grid\door_10_bossroomdoor.png`
157
+ */
158
+ bossRoom?: string;
159
+ /**
160
+ * Optional. The path to the spritesheet that contains the graphics of the Secret Room and Super
161
+ * Secret Room doors for the floor.
162
+ *
163
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
164
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
165
+ * Rebirth\resources\gfx\grid\door_08_holeinwall.png`
166
+ */
167
+ secretRoom?: string;
168
+ /**
169
+ * Optional. The path to the spritesheet that contains the graphics of the arcade doors for the
170
+ * floor.
171
+ *
172
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
173
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
174
+ * Rebirth\resources\gfx\grid\door_05_arcaderoomdoor.png`
175
+ */
176
+ arcade?: string;
177
+ /**
178
+ * Optional. The path to the spritesheet that contains the graphics of the Curse Room doors for
179
+ * the floor.
180
+ *
181
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
182
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
183
+ * Rebirth\resources\gfx\grid\door_04_selfsacrificeroomdoor.png`
184
+ */
185
+ curseRoom?: string;
186
+ /**
187
+ * Optional. The path to the spritesheet that contains the graphics of the normal Challenge Room
188
+ * doors for the floor.
189
+ *
190
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
191
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
192
+ * Rebirth\resources\gfx\grid\door_03_ambushroomdoor.png`
193
+ */
194
+ normalChallengeRoom?: string;
195
+ /**
196
+ * Optional. The path to the spritesheet that contains the graphics of the Boss Challenge Room
197
+ * doors for the floor.
198
+ *
199
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
200
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
201
+ * Rebirth\resources\gfx\grid\door_09_bossambushroomdoor.png`
202
+ */
203
+ bossChallengeRoom?: string;
204
+ /**
205
+ * Optional. The path to the spritesheet that contains the graphics of the Devil Room doors for
206
+ * the floor.
207
+ *
208
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
209
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
210
+ * Rebirth\resources\gfx\grid\door_07_devilroomdoor.png`
211
+ */
212
+ devilRoom?: string;
213
+ /**
214
+ * Optional. The path to the spritesheet that contains the graphics of the Angel Room doors for
215
+ * the floor.
216
+ *
217
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
218
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
219
+ * Rebirth\resources\gfx\grid\door_07_holyroomdoor.png`
220
+ */
221
+ angelRoom?: string;
222
+ /**
223
+ * Optional. The path to the spritesheet that contains the graphics of the Boss Rush doors for
224
+ * the floor.
225
+ *
226
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
227
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
228
+ * Rebirth\resources\gfx\grid\door_15_bossrushdoor.png`
229
+ */
230
+ bossRush?: string;
231
+ /**
232
+ * Optional. The path to the spritesheet that contains the graphics of the Chest Room doors for
233
+ * the floor.
234
+ *
235
+ * If not specified, the vanilla Basement door spritesheet will be used. For reference, this is
236
+ * located at: `C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac
237
+ * Rebirth\resources\gfx\grid\door_02b_chestroomdoor.png`
238
+ */
239
+ chestRoom?: string;
240
+ }>;
241
+ /** Optional. A collection of colors used in the boss "versus" screen. */
242
+ versusScreen?: Readonly<{
243
+ /**
244
+ * Optional. An object representing the color to use for the background of the boss "versus"
245
+ * screen. If not specified, the color for Basement 1 will be used.
246
+ *
247
+ * For a list of the colors that correspond to the vanilla stages, see
248
+ * `versusScreenBackgroundColors.ts`.
249
+ */
250
+ backgroundColor?: Readonly<{
251
+ r: number;
252
+ g: number;
253
+ b: number;
254
+ }>;
255
+ /**
256
+ * Optional. An object representing the color to use for the dirt spots in the boss "versus"
257
+ * screen. (There are two dirt spots; one for the player and one for the boss.) If not
258
+ * specified, the color for Basement 1 will be used.
259
+ *
260
+ * For a list of the colors that correspond to the vanilla stages, see
261
+ * `versusScreenDirtSpotColors.ts`.
262
+ */
263
+ dirtSpotColor?: Readonly<{
264
+ r: number;
265
+ g: number;
266
+ b: number;
267
+ }>;
268
+ }>;
269
+ }>;
96
270
  /**
97
271
  * An object that represents a custom stage. The "metadata.lua" file contains an array of these
98
272
  * objects. Besides the room metadata, the data is the same as what is specified inside the
@@ -107,12 +281,11 @@ export interface CustomStageLua extends CustomStageTSConfig {
107
281
  * Metadata about a custom stage room. Each custom stage object contains an array with metadata for
108
282
  * each room.
109
283
  */
110
- export interface CustomStageRoomMetadata {
111
- readonly type: number;
112
- readonly variant: number;
113
- readonly subType: number;
114
- readonly shape: number;
115
- readonly doorSlotFlags: number;
116
- readonly weight: number;
117
- }
118
- export {};
284
+ export declare type CustomStageRoomMetadata = Readonly<{
285
+ type: number;
286
+ variant: number;
287
+ subType: number;
288
+ shape: number;
289
+ doorSlotFlags: number;
290
+ weight: number;
291
+ }>;
@@ -0,0 +1,6 @@
1
+ import { BackdropType } from "isaac-typescript-definitions";
2
+ import { RockAltType } from "../enums/RockAltType";
3
+ /** Used by the `getRockAltType` function. */
4
+ export declare const BACKDROP_TYPE_TO_ROCK_ALT_TYPE: {
5
+ readonly [key in BackdropType]: RockAltType;
6
+ };
@@ -0,0 +1,69 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local BackdropType = ____isaac_2Dtypescript_2Ddefinitions.BackdropType
4
+ local ____RockAltType = require("enums.RockAltType")
5
+ local RockAltType = ____RockAltType.RockAltType
6
+ --- Used by the `getRockAltType` function.
7
+ ____exports.BACKDROP_TYPE_TO_ROCK_ALT_TYPE = {
8
+ [BackdropType.BASEMENT] = RockAltType.URN,
9
+ [BackdropType.CELLAR] = RockAltType.URN,
10
+ [BackdropType.BURNT_BASEMENT] = RockAltType.URN,
11
+ [BackdropType.CAVES] = RockAltType.MUSHROOM,
12
+ [BackdropType.CATACOMBS] = RockAltType.MUSHROOM,
13
+ [BackdropType.FLOODED_CAVES] = RockAltType.MUSHROOM,
14
+ [BackdropType.DEPTHS] = RockAltType.SKULL,
15
+ [BackdropType.NECROPOLIS] = RockAltType.SKULL,
16
+ [BackdropType.DANK_DEPTHS] = RockAltType.SKULL,
17
+ [BackdropType.WOMB] = RockAltType.POLYP,
18
+ [BackdropType.UTERO] = RockAltType.POLYP,
19
+ [BackdropType.SCARRED_WOMB] = RockAltType.POLYP,
20
+ [BackdropType.BLUE_WOMB] = RockAltType.POLYP,
21
+ [BackdropType.SHEOL] = RockAltType.SKULL,
22
+ [BackdropType.CATHEDRAL] = RockAltType.URN,
23
+ [BackdropType.DARK_ROOM] = RockAltType.SKULL,
24
+ [BackdropType.CHEST] = RockAltType.URN,
25
+ [BackdropType.MEGA_SATAN] = RockAltType.URN,
26
+ [BackdropType.LIBRARY] = RockAltType.URN,
27
+ [BackdropType.SHOP] = RockAltType.URN,
28
+ [BackdropType.CLEAN_BEDROOM] = RockAltType.URN,
29
+ [BackdropType.DIRTY_BEDROOM] = RockAltType.URN,
30
+ [BackdropType.SECRET] = RockAltType.MUSHROOM,
31
+ [BackdropType.DICE] = RockAltType.URN,
32
+ [BackdropType.ARCADE] = RockAltType.URN,
33
+ [BackdropType.ERROR_ROOM] = RockAltType.URN,
34
+ [BackdropType.BLUE_WOMB_PASS] = RockAltType.POLYP,
35
+ [BackdropType.GREED_SHOP] = RockAltType.URN,
36
+ [BackdropType.DUNGEON] = RockAltType.URN,
37
+ [BackdropType.SACRIFICE] = RockAltType.SKULL,
38
+ [BackdropType.DOWNPOUR] = RockAltType.BUCKET,
39
+ [BackdropType.MINES] = RockAltType.MUSHROOM,
40
+ [BackdropType.MAUSOLEUM] = RockAltType.SKULL,
41
+ [BackdropType.CORPSE] = RockAltType.POLYP,
42
+ [BackdropType.PLANETARIUM] = RockAltType.URN,
43
+ [BackdropType.DOWNPOUR_ENTRANCE] = RockAltType.BUCKET,
44
+ [BackdropType.MINES_ENTRANCE] = RockAltType.MUSHROOM,
45
+ [BackdropType.MAUSOLEUM_ENTRANCE] = RockAltType.SKULL,
46
+ [BackdropType.CORPSE_ENTRANCE] = RockAltType.SKULL,
47
+ [BackdropType.MAUSOLEUM_2] = RockAltType.SKULL,
48
+ [BackdropType.MAUSOLEUM_3] = RockAltType.SKULL,
49
+ [BackdropType.MAUSOLEUM_4] = RockAltType.SKULL,
50
+ [BackdropType.CORPSE_2] = RockAltType.POLYP,
51
+ [BackdropType.CORPSE_3] = RockAltType.POLYP,
52
+ [BackdropType.DROSS] = RockAltType.BUCKET,
53
+ [BackdropType.ASHPIT] = RockAltType.MUSHROOM,
54
+ [BackdropType.GEHENNA] = RockAltType.SKULL,
55
+ [BackdropType.MORTIS] = RockAltType.POLYP,
56
+ [BackdropType.ISAACS_BEDROOM] = RockAltType.URN,
57
+ [BackdropType.HALLWAY] = RockAltType.URN,
58
+ [BackdropType.MOMS_BEDROOM] = RockAltType.URN,
59
+ [BackdropType.CLOSET] = RockAltType.URN,
60
+ [BackdropType.CLOSET_B] = RockAltType.URN,
61
+ [BackdropType.DOGMA] = RockAltType.URN,
62
+ [BackdropType.DUNGEON_GIDEON] = RockAltType.URN,
63
+ [BackdropType.DUNGEON_ROTGUT] = RockAltType.URN,
64
+ [BackdropType.DUNGEON_BEAST] = RockAltType.URN,
65
+ [BackdropType.MINES_SHAFT] = RockAltType.MUSHROOM,
66
+ [BackdropType.ASHPIT_SHAFT] = RockAltType.MUSHROOM,
67
+ [BackdropType.DARK_CLOSET] = RockAltType.SKULL
68
+ }
69
+ return ____exports
@@ -0,0 +1,5 @@
1
+ import { BossID } from "isaac-typescript-definitions";
2
+ /** Used when rendering the "versusscreen.anm2" sprite. */
3
+ export declare const BOSS_NAME_PNG_FILE_NAMES: {
4
+ readonly [key in BossID]: string;
5
+ };