isaacscript-common 6.2.0 → 6.4.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 (96) 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/features/customStage/backdrop.d.ts +2 -0
  10. package/features/customStage/backdrop.lua +202 -0
  11. package/features/customStage/customStageConstants.d.ts +1 -0
  12. package/features/customStage/customStageConstants.lua +3 -0
  13. package/features/customStage/exports.d.ts +28 -0
  14. package/features/customStage/exports.lua +58 -1
  15. package/features/customStage/init.d.ts +2 -1
  16. package/features/customStage/init.lua +45 -9
  17. package/features/customStage/streakText.d.ts +2 -0
  18. package/features/customStage/streakText.lua +22 -0
  19. package/features/customStage/v.d.ts +10 -0
  20. package/features/customStage/v.lua +4 -0
  21. package/features/customStage/versusScreen.d.ts +3 -0
  22. package/features/customStage/versusScreen.lua +193 -0
  23. package/features/debugDisplay/debugDisplay.lua +2 -0
  24. package/features/debugDisplay/exports.d.ts +108 -0
  25. package/features/debugDisplay/exports.lua +145 -0
  26. package/features/debugDisplay/v.d.ts +2 -0
  27. package/features/debugDisplay/v.lua +9 -0
  28. package/features/deployJSONRoom.lua +6 -2
  29. package/features/extraConsoleCommands/init.lua +8 -1
  30. package/features/extraConsoleCommands/listCommands.d.ts +12 -4
  31. package/features/extraConsoleCommands/listCommands.lua +30 -15
  32. package/features/extraConsoleCommands/v.d.ts +1 -0
  33. package/features/extraConsoleCommands/v.lua +2 -1
  34. package/features/pause.d.ts +11 -0
  35. package/features/pause.lua +71 -0
  36. package/features/runNextRoom.d.ts +8 -0
  37. package/features/runNextRoom.lua +40 -0
  38. package/features/saveDataManager/exports.lua +2 -2
  39. package/features/saveDataManager/load.lua +3 -3
  40. package/features/saveDataManager/main.lua +3 -3
  41. package/features/saveDataManager/merge.lua +2 -2
  42. package/features/saveDataManager/save.lua +3 -3
  43. package/features/saveDataManager/{constants.d.ts → saveDataManagerConstants.d.ts} +0 -0
  44. package/features/saveDataManager/{constants.lua → saveDataManagerConstants.lua} +0 -0
  45. package/functions/chargeBar.lua +4 -6
  46. package/functions/color.d.ts +0 -2
  47. package/functions/color.lua +0 -4
  48. package/functions/deepCopy.lua +2 -2
  49. package/functions/direction.d.ts +1 -1
  50. package/functions/doors.d.ts +2 -2
  51. package/functions/entity.d.ts +5 -0
  52. package/functions/entity.lua +13 -0
  53. package/functions/gridEntity.d.ts +5 -0
  54. package/functions/gridEntity.lua +7 -2
  55. package/functions/kColor.d.ts +0 -2
  56. package/functions/kColor.lua +0 -4
  57. package/functions/log.lua +2 -1
  58. package/functions/playerCenter.d.ts +5 -1
  59. package/functions/playerCenter.lua +15 -8
  60. package/functions/playerIndex.d.ts +3 -0
  61. package/functions/playerIndex.lua +3 -0
  62. package/functions/roomShape.d.ts +10 -4
  63. package/functions/roomShape.lua +15 -2
  64. package/functions/sprite.d.ts +1 -1
  65. package/functions/sprite.lua +1 -1
  66. package/functions/ui.d.ts +2 -0
  67. package/functions/ui.lua +8 -0
  68. package/functions/utils.d.ts +6 -4
  69. package/functions/utils.lua +6 -4
  70. package/index.d.ts +2 -1
  71. package/index.lua +10 -0
  72. package/initFeatures.lua +7 -1
  73. package/interfaces/Corner.d.ts +6 -0
  74. package/interfaces/Corner.lua +2 -0
  75. package/interfaces/CustomStageLua.d.ts +38 -9
  76. package/objects/bossNamePNGFileNames.d.ts +5 -0
  77. package/objects/bossNamePNGFileNames.lua +108 -0
  78. package/objects/bossPortraitPNGFileNames.d.ts +5 -0
  79. package/objects/bossPortraitPNGFileNames.lua +108 -0
  80. package/objects/colors.d.ts +15 -8
  81. package/objects/colors.lua +9 -2
  82. package/objects/playerNamePNGFileNames.d.ts +5 -0
  83. package/objects/playerNamePNGFileNames.lua +49 -0
  84. package/objects/playerPortraitPNGFileNames.d.ts +5 -0
  85. package/objects/playerPortraitPNGFileNames.lua +49 -0
  86. package/objects/roomShapeCorners.d.ts +6 -0
  87. package/objects/roomShapeCorners.lua +259 -0
  88. package/objects/roomShapeToBottomRightPosition.d.ts +1 -1
  89. package/objects/roomShapeToTopLeftPosition.d.ts +1 -1
  90. package/objects/versusScreenBackgroundColors.d.ts +5 -0
  91. package/objects/versusScreenBackgroundColors.lua +38 -0
  92. package/objects/versusScreenDirtSpotColors.d.ts +5 -0
  93. package/objects/versusScreenDirtSpotColors.lua +38 -0
  94. package/package.json +2 -2
  95. package/sets/narrowRoomShapesSet.d.ts +2 -0
  96. package/sets/narrowRoomShapesSet.lua +8 -0
@@ -0,0 +1,259 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
4
+ local ____CornerType = require("enums.CornerType")
5
+ local CornerType = ____CornerType.CornerType
6
+ local TWO_BY_TWO_CENTER_X = 580
7
+ local TWO_BY_TWO_CENTER_Y = 420
8
+ --- The locations of the corners for each room shape.
9
+ ____exports.ROOM_SHAPE_CORNERS = {
10
+ [RoomShape.SHAPE_1x1] = {
11
+ {
12
+ type = CornerType.TOP_LEFT,
13
+ position = Vector(60, 140)
14
+ },
15
+ {
16
+ type = CornerType.TOP_RIGHT,
17
+ position = Vector(580, 140)
18
+ },
19
+ {
20
+ type = CornerType.BOTTOM_LEFT,
21
+ position = Vector(60, 420)
22
+ },
23
+ {
24
+ type = CornerType.BOTTOM_RIGHT,
25
+ position = Vector(580, 420)
26
+ }
27
+ },
28
+ [RoomShape.IH] = {
29
+ {
30
+ type = CornerType.TOP_LEFT,
31
+ position = Vector(60, 220)
32
+ },
33
+ {
34
+ type = CornerType.TOP_RIGHT,
35
+ position = Vector(580, 220)
36
+ },
37
+ {
38
+ type = CornerType.BOTTOM_LEFT,
39
+ position = Vector(60, 340)
40
+ },
41
+ {
42
+ type = CornerType.BOTTOM_RIGHT,
43
+ position = Vector(580, 340)
44
+ }
45
+ },
46
+ [RoomShape.IV] = {
47
+ {
48
+ type = CornerType.TOP_LEFT,
49
+ position = Vector(220, 140)
50
+ },
51
+ {
52
+ type = CornerType.TOP_RIGHT,
53
+ position = Vector(420, 140)
54
+ },
55
+ {
56
+ type = CornerType.BOTTOM_LEFT,
57
+ position = Vector(220, 420)
58
+ },
59
+ {
60
+ type = CornerType.BOTTOM_RIGHT,
61
+ position = Vector(420, 420)
62
+ }
63
+ },
64
+ [RoomShape.SHAPE_1x2] = {
65
+ {
66
+ type = CornerType.TOP_LEFT,
67
+ position = Vector(60, 140)
68
+ },
69
+ {
70
+ type = CornerType.TOP_RIGHT,
71
+ position = Vector(580, 140)
72
+ },
73
+ {
74
+ type = CornerType.BOTTOM_LEFT,
75
+ position = Vector(60, 700)
76
+ },
77
+ {
78
+ type = CornerType.BOTTOM_RIGHT,
79
+ position = Vector(580, 700)
80
+ }
81
+ },
82
+ [RoomShape.IIV] = {
83
+ {
84
+ type = CornerType.TOP_LEFT,
85
+ position = Vector(220, 140)
86
+ },
87
+ {
88
+ type = CornerType.TOP_RIGHT,
89
+ position = Vector(420, 140)
90
+ },
91
+ {
92
+ type = CornerType.BOTTOM_LEFT,
93
+ position = Vector(220, 700)
94
+ },
95
+ {
96
+ type = CornerType.BOTTOM_RIGHT,
97
+ position = Vector(420, 700)
98
+ }
99
+ },
100
+ [RoomShape.SHAPE_2x1] = {
101
+ {
102
+ type = CornerType.TOP_LEFT,
103
+ position = Vector(60, 140)
104
+ },
105
+ {
106
+ type = CornerType.TOP_RIGHT,
107
+ position = Vector(1100, 140)
108
+ },
109
+ {
110
+ type = CornerType.BOTTOM_LEFT,
111
+ position = Vector(60, 420)
112
+ },
113
+ {
114
+ type = CornerType.BOTTOM_RIGHT,
115
+ position = Vector(1100, 420)
116
+ }
117
+ },
118
+ [RoomShape.IIH] = {
119
+ {
120
+ type = CornerType.TOP_LEFT,
121
+ position = Vector(60, 220)
122
+ },
123
+ {
124
+ type = CornerType.TOP_RIGHT,
125
+ position = Vector(1100, 220)
126
+ },
127
+ {
128
+ type = CornerType.BOTTOM_LEFT,
129
+ position = Vector(60, 340)
130
+ },
131
+ {
132
+ type = CornerType.BOTTOM_RIGHT,
133
+ position = Vector(1100, 340)
134
+ }
135
+ },
136
+ [RoomShape.SHAPE_2x2] = {
137
+ {
138
+ type = CornerType.TOP_LEFT,
139
+ position = Vector(60, 140)
140
+ },
141
+ {
142
+ type = CornerType.TOP_RIGHT,
143
+ position = Vector(1100, 140)
144
+ },
145
+ {
146
+ type = CornerType.BOTTOM_LEFT,
147
+ position = Vector(60, 700)
148
+ },
149
+ {
150
+ type = CornerType.BOTTOM_RIGHT,
151
+ position = Vector(1100, 700)
152
+ }
153
+ },
154
+ [RoomShape.LTL] = {
155
+ {
156
+ type = CornerType.TOP_LEFT,
157
+ position = Vector(TWO_BY_TWO_CENTER_X, 140)
158
+ },
159
+ {
160
+ type = CornerType.TOP_RIGHT,
161
+ position = Vector(1100, 140)
162
+ },
163
+ {
164
+ type = CornerType.TOP_LEFT,
165
+ position = Vector(60, TWO_BY_TWO_CENTER_Y)
166
+ },
167
+ {
168
+ type = CornerType.BOTTOM_RIGHT,
169
+ position = Vector(TWO_BY_TWO_CENTER_X, TWO_BY_TWO_CENTER_Y)
170
+ },
171
+ {
172
+ type = CornerType.BOTTOM_LEFT,
173
+ position = Vector(60, 700)
174
+ },
175
+ {
176
+ type = CornerType.BOTTOM_RIGHT,
177
+ position = Vector(1100, 700)
178
+ }
179
+ },
180
+ [RoomShape.LTR] = {
181
+ {
182
+ type = CornerType.TOP_LEFT,
183
+ position = Vector(60, 140)
184
+ },
185
+ {
186
+ type = CornerType.TOP_RIGHT,
187
+ position = Vector(TWO_BY_TWO_CENTER_X, 140)
188
+ },
189
+ {
190
+ type = CornerType.BOTTOM_LEFT,
191
+ position = Vector(TWO_BY_TWO_CENTER_X, TWO_BY_TWO_CENTER_Y)
192
+ },
193
+ {
194
+ type = CornerType.TOP_RIGHT,
195
+ position = Vector(1100, TWO_BY_TWO_CENTER_Y)
196
+ },
197
+ {
198
+ type = CornerType.BOTTOM_LEFT,
199
+ position = Vector(60, 700)
200
+ },
201
+ {
202
+ type = CornerType.BOTTOM_RIGHT,
203
+ position = Vector(1100, 700)
204
+ }
205
+ },
206
+ [RoomShape.LBL] = {
207
+ {
208
+ type = CornerType.TOP_LEFT,
209
+ position = Vector(60, 140)
210
+ },
211
+ {
212
+ type = CornerType.TOP_RIGHT,
213
+ position = Vector(1100, 140)
214
+ },
215
+ {
216
+ type = CornerType.BOTTOM_LEFT,
217
+ position = Vector(TWO_BY_TWO_CENTER_X, 140)
218
+ },
219
+ {
220
+ type = CornerType.TOP_RIGHT,
221
+ position = Vector(TWO_BY_TWO_CENTER_X, TWO_BY_TWO_CENTER_Y)
222
+ },
223
+ {
224
+ type = CornerType.BOTTOM_LEFT,
225
+ position = Vector(TWO_BY_TWO_CENTER_X, 700)
226
+ },
227
+ {
228
+ type = CornerType.BOTTOM_RIGHT,
229
+ position = Vector(1100, 700)
230
+ }
231
+ },
232
+ [RoomShape.LBR] = {
233
+ {
234
+ type = CornerType.TOP_LEFT,
235
+ position = Vector(60, 140)
236
+ },
237
+ {
238
+ type = CornerType.TOP_RIGHT,
239
+ position = Vector(1100, 140)
240
+ },
241
+ {
242
+ type = CornerType.TOP_LEFT,
243
+ position = Vector(TWO_BY_TWO_CENTER_X, TWO_BY_TWO_CENTER_Y)
244
+ },
245
+ {
246
+ type = CornerType.BOTTOM_RIGHT,
247
+ position = Vector(1100, TWO_BY_TWO_CENTER_Y)
248
+ },
249
+ {
250
+ type = CornerType.BOTTOM_LEFT,
251
+ position = Vector(60, 700)
252
+ },
253
+ {
254
+ type = CornerType.BOTTOM_RIGHT,
255
+ position = Vector(TWO_BY_TWO_CENTER_X, 700)
256
+ }
257
+ }
258
+ }
259
+ return ____exports
@@ -4,5 +4,5 @@ import { RoomShape } from "isaac-typescript-definitions";
4
4
  * wall would be at "Vector(-1, -1)".)
5
5
  */
6
6
  export declare const ROOM_SHAPE_TO_BOTTOM_RIGHT_POSITION: {
7
- readonly [key in RoomShape]: Vector;
7
+ readonly [key in RoomShape]: Readonly<Vector>;
8
8
  };
@@ -4,5 +4,5 @@ import { RoomShape } from "isaac-typescript-definitions";
4
4
  * wall would be at "Vector(-1, -1)".)
5
5
  */
6
6
  export declare const ROOM_SHAPE_TO_TOP_LEFT_POSITION: {
7
- readonly [key in RoomShape]: Vector;
7
+ readonly [key in RoomShape]: Readonly<Vector>;
8
8
  };
@@ -0,0 +1,5 @@
1
+ import { StageID } from "isaac-typescript-definitions";
2
+ /** These values are taken from StageAPI. */
3
+ export declare const VERSUS_SCREEN_BACKGROUND_COLORS: {
4
+ readonly [key in StageID]: Color;
5
+ };
@@ -0,0 +1,38 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
4
+ --- We arbitrarily specify a default color equal to that of Basement.
5
+ local DEFAULT_COLOR = Color(26 / 255, 14 / 255, 12 / 255)
6
+ --- These values are taken from StageAPI.
7
+ ____exports.VERSUS_SCREEN_BACKGROUND_COLORS = {
8
+ [StageID.SPECIAL_ROOMS] = DEFAULT_COLOR,
9
+ [StageID.BASEMENT] = Color(26 / 255, 14 / 255, 12 / 255),
10
+ [StageID.CELLAR] = Color(26 / 255, 17 / 255, 13 / 255),
11
+ [StageID.BURNING_BASEMENT] = Color(28 / 255, 12 / 255, 10 / 255),
12
+ [StageID.CAVES] = Color(18 / 255, 13 / 255, 8 / 255),
13
+ [StageID.CATACOMBS] = Color(15 / 255, 10 / 255, 8 / 255),
14
+ [StageID.FLOODED_CAVES] = Color(21 / 255, 28 / 255, 35 / 255),
15
+ [StageID.DEPTHS] = Color(8 / 255, 8 / 255, 8 / 255),
16
+ [StageID.NECROPOLIS] = Color(10 / 255, 6 / 255, 6 / 255),
17
+ [StageID.DANK_DEPTHS] = Color(8 / 255, 8 / 255, 8 / 255),
18
+ [StageID.WOMB] = Color(27 / 255, 3 / 255, 3 / 255),
19
+ [StageID.UTERO] = Color(22 / 255, 6 / 255, 5 / 255),
20
+ [StageID.SCARRED_WOMB] = Color(42 / 255, 19 / 255, 10 / 255),
21
+ [StageID.BLUE_WOMB] = Color(26 / 255, 32 / 255, 40 / 255),
22
+ [StageID.SHEOL] = Color(6 / 255, 6 / 255, 6 / 255),
23
+ [StageID.CATHEDRAL] = Color(6 / 255, 13 / 255, 17 / 255),
24
+ [StageID.DARK_ROOM] = Color(9 / 255, 4 / 255, 3 / 255),
25
+ [StageID.CHEST] = Color(15 / 255, 9 / 255, 6 / 255),
26
+ [StageID.VOID] = Color(0, 0, 0),
27
+ [StageID.DOWNPOUR] = Color(29 / 255, 30 / 255, 32 / 255),
28
+ [StageID.DROSS] = Color(35 / 255, 35 / 255, 29 / 255),
29
+ [StageID.MINES] = Color(17 / 255, 15 / 255, 12 / 255),
30
+ [StageID.ASHPIT] = Color(12 / 255, 10 / 255, 10 / 255),
31
+ [StageID.MAUSOLEUM] = Color(14 / 255, 10 / 255, 14 / 255),
32
+ [StageID.GEHENNA] = Color(15 / 255, 4 / 255, 4 / 255),
33
+ [StageID.CORPSE] = Color(13 / 255, 14 / 255, 12 / 255),
34
+ [StageID.MORTIS] = Color(13 / 255, 14 / 255, 12 / 255),
35
+ [StageID.HOME] = DEFAULT_COLOR,
36
+ [StageID.BACKWARDS] = DEFAULT_COLOR
37
+ }
38
+ return ____exports
@@ -0,0 +1,5 @@
1
+ import { StageID } from "isaac-typescript-definitions";
2
+ /** These values are taken from StageAPI. */
3
+ export declare const VERSUS_SCREEN_DIRT_SPOT_COLORS: {
4
+ readonly [key in StageID]: Color;
5
+ };
@@ -0,0 +1,38 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
4
+ --- We arbitrarily specify a default color equal to that of Basement.
5
+ local DEFAULT_COLOR = Color(201 / 255, 114 / 255, 96 / 255)
6
+ --- These values are taken from StageAPI.
7
+ ____exports.VERSUS_SCREEN_DIRT_SPOT_COLORS = {
8
+ [StageID.SPECIAL_ROOMS] = DEFAULT_COLOR,
9
+ [StageID.BASEMENT] = Color(201 / 255, 114 / 255, 96 / 255),
10
+ [StageID.CELLAR] = Color(229 / 255, 157 / 255, 111 / 255),
11
+ [StageID.BURNING_BASEMENT] = Color(252 / 255, 108 / 255, 90 / 255),
12
+ [StageID.CAVES] = Color(167 / 255, 111 / 255, 75 / 255),
13
+ [StageID.CATACOMBS] = Color(135 / 255, 90 / 255, 80 / 255),
14
+ [StageID.FLOODED_CAVES] = Color(111 / 255, 147 / 255, 180 / 255),
15
+ [StageID.DEPTHS] = Color(70 / 255, 70 / 255, 72 / 255),
16
+ [StageID.NECROPOLIS] = Color(88 / 255, 67 / 255, 54 / 255),
17
+ [StageID.DANK_DEPTHS] = Color(70 / 255, 70 / 255, 72 / 255),
18
+ [StageID.WOMB] = Color(241 / 255, 28 / 255, 28 / 255),
19
+ [StageID.UTERO] = Color(199 / 255, 60 / 255, 48 / 255),
20
+ [StageID.SCARRED_WOMB] = Color(247 / 255, 152 / 255, 88 / 255),
21
+ [StageID.BLUE_WOMB] = Color(157 / 255, 209 / 255, 255 / 255),
22
+ [StageID.SHEOL] = Color(60 / 255, 54 / 255, 54 / 255),
23
+ [StageID.CATHEDRAL] = Color(44 / 255, 100 / 255, 111 / 255),
24
+ [StageID.DARK_ROOM] = Color(80 / 255, 38 / 255, 20 / 255),
25
+ [StageID.CHEST] = Color(175 / 255, 108 / 255, 72 / 255),
26
+ [StageID.VOID] = Color(70 / 255, 5 / 255, 5 / 255),
27
+ [StageID.DOWNPOUR] = Color(149 / 255, 157 / 255, 167 / 255),
28
+ [StageID.DROSS] = Color(179 / 255, 179 / 255, 143 / 255),
29
+ [StageID.MINES] = Color(93 / 255, 85 / 255, 72 / 255),
30
+ [StageID.ASHPIT] = Color(106 / 255, 102 / 255, 94 / 255),
31
+ [StageID.MAUSOLEUM] = Color(70 / 255, 59 / 255, 72 / 255),
32
+ [StageID.GEHENNA] = Color(59 / 255, 41 / 255, 41 / 255),
33
+ [StageID.CORPSE] = Color(124 / 255, 134 / 255, 111 / 255),
34
+ [StageID.MORTIS] = Color(124 / 255, 134 / 255, 111 / 255),
35
+ [StageID.HOME] = DEFAULT_COLOR,
36
+ [StageID.BACKWARDS] = DEFAULT_COLOR
37
+ }
38
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "6.2.0",
3
+ "version": "6.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "index",
23
23
  "types": "index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^3.0.18"
25
+ "isaac-typescript-definitions": "^3.0.22"
26
26
  }
27
27
  }
@@ -0,0 +1,2 @@
1
+ import { RoomShape } from "isaac-typescript-definitions";
2
+ export declare const NARROW_ROOM_SHAPES_SET: ReadonlySet<RoomShape>;
@@ -0,0 +1,8 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Set = ____lualib.Set
3
+ local __TS__New = ____lualib.__TS__New
4
+ local ____exports = {}
5
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
+ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
7
+ ____exports.NARROW_ROOM_SHAPES_SET = __TS__New(Set, {RoomShape.IH, RoomShape.IV, RoomShape.IIV, RoomShape.IIH})
8
+ return ____exports