isaacscript-common 6.2.1 → 6.3.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 (55) hide show
  1. package/callbacks/reorderedCallbacks.d.ts +9 -0
  2. package/callbacks/reorderedCallbacks.lua +9 -0
  3. package/constants.d.ts +9 -0
  4. package/constants.lua +7 -0
  5. package/enums/CornerType.d.ts +6 -0
  6. package/enums/CornerType.lua +11 -0
  7. package/features/customStage/backdrop.d.ts +2 -0
  8. package/features/customStage/backdrop.lua +200 -0
  9. package/features/customStage/boss.d.ts +2 -0
  10. package/features/customStage/boss.lua +74 -0
  11. package/features/customStage/exports.d.ts +1 -0
  12. package/features/customStage/exports.lua +28 -1
  13. package/features/customStage/init.d.ts +2 -1
  14. package/features/customStage/init.lua +39 -10
  15. package/features/customStage/stageAPIBoss.d.ts +29 -0
  16. package/features/customStage/stageAPIBoss.lua +9 -0
  17. package/features/customStage/v.d.ts +7 -0
  18. package/features/customStage/v.lua +2 -0
  19. package/features/debugDisplay/debugDisplay.lua +2 -0
  20. package/features/debugDisplay/exports.d.ts +108 -0
  21. package/features/debugDisplay/exports.lua +145 -0
  22. package/features/debugDisplay/v.d.ts +2 -0
  23. package/features/debugDisplay/v.lua +9 -0
  24. package/features/extraConsoleCommands/init.lua +8 -1
  25. package/features/extraConsoleCommands/listCommands.d.ts +12 -4
  26. package/features/extraConsoleCommands/listCommands.lua +30 -15
  27. package/features/extraConsoleCommands/v.d.ts +1 -0
  28. package/features/extraConsoleCommands/v.lua +2 -1
  29. package/features/pause.d.ts +11 -0
  30. package/features/pause.lua +71 -0
  31. package/features/runNextRoom.d.ts +8 -0
  32. package/features/runNextRoom.lua +40 -0
  33. package/functions/chargeBar.lua +4 -6
  34. package/functions/direction.d.ts +1 -1
  35. package/functions/doors.d.ts +2 -2
  36. package/functions/playerCenter.lua +4 -5
  37. package/functions/playerIndex.d.ts +3 -0
  38. package/functions/playerIndex.lua +3 -0
  39. package/functions/roomShape.d.ts +10 -4
  40. package/functions/roomShape.lua +15 -2
  41. package/functions/sprite.d.ts +1 -1
  42. package/functions/sprite.lua +1 -1
  43. package/index.d.ts +1 -1
  44. package/index.lua +2 -0
  45. package/initFeatures.lua +7 -1
  46. package/interfaces/Corner.d.ts +6 -0
  47. package/interfaces/Corner.lua +2 -0
  48. package/interfaces/CustomStageLua.d.ts +13 -9
  49. package/objects/roomShapeCorners.d.ts +6 -0
  50. package/objects/roomShapeCorners.lua +259 -0
  51. package/objects/roomShapeToBottomRightPosition.d.ts +1 -1
  52. package/objects/roomShapeToTopLeftPosition.d.ts +1 -1
  53. package/package.json +1 -1
  54. package/sets/narrowRoomShapesSet.d.ts +2 -0
  55. package/sets/narrowRoomShapesSet.lua +8 -0
@@ -54,25 +54,29 @@ interface CustomStageBackdrop {
54
54
  */
55
55
  suffix: string;
56
56
  /**
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).
57
+ * An array of strings that represent the graphic files that are used for the floors in narrow
58
+ * rooms. (The "n" stands for "narrow").
59
+ *
60
+ * You must have at least one string in this array, but you can specify more than one to randomly
61
+ * add extra variety (like the vanilla stages do).
60
62
  *
61
63
  * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement_nfloor.png".
62
64
  */
63
65
  nFloors: string[];
64
66
  /**
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).
67
+ * An array of strings that represent the graphic files that are used for the floors in L rooms.
68
+ *
69
+ * You must have at least one string in this array, but you can specify more than one to randomly
70
+ * add extra variety (like the vanilla stages do).
68
71
  *
69
72
  * For an example of this, see the vanilla file "resources/gfx/backdrop/01_lbasementfloor.png".
70
73
  */
71
74
  lFloors: string[];
72
75
  /**
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).
76
+ * An array of strings that represent the graphic files for the stage's walls.
77
+ *
78
+ * You must have at least one string in this array, but you can specify more than one to randomly
79
+ * add extra variety (like the vanilla stages do).
76
80
  *
77
81
  * For an example of this, see the vanilla file "resources/gfx/backdrop/01_basement.png". (In the
78
82
  * vanilla file, they concatenate all four variations together into one PNG file. However, for the
@@ -0,0 +1,6 @@
1
+ import { RoomShape } from "isaac-typescript-definitions";
2
+ import { Corner } from "../interfaces/Corner";
3
+ /** The locations of the corners for each room shape. */
4
+ export declare const ROOM_SHAPE_CORNERS: {
5
+ readonly [key in RoomShape]: readonly Corner[];
6
+ };
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "6.2.1",
3
+ "version": "6.3.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -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