isaacscript-common 13.0.0 → 13.1.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.
- package/dist/index.d.ts +105 -26
- package/dist/isaacscript-common.lua +615 -168
- package/dist/src/features/customStage/backdrop.lua +4 -4
- package/dist/src/features/customStage/versusScreen.lua +2 -2
- package/dist/src/features/deployJSONRoom.d.ts +0 -11
- package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
- package/dist/src/features/deployJSONRoom.lua +10 -74
- package/dist/src/features/extraConsoleCommands/listCommands.lua +2 -2
- package/dist/src/features/firstLast.lua +8 -8
- package/dist/src/features/setHotkey.d.ts +27 -8
- package/dist/src/features/setHotkey.d.ts.map +1 -1
- package/dist/src/features/setHotkey.lua +41 -30
- package/dist/src/functions/array.lua +2 -2
- package/dist/src/functions/cards.lua +2 -2
- package/dist/src/functions/collectibles.lua +2 -2
- package/dist/src/functions/dimensions.lua +2 -2
- package/dist/src/functions/emptyRoom.d.ts +8 -0
- package/dist/src/functions/emptyRoom.d.ts.map +1 -0
- package/dist/src/functions/emptyRoom.lua +74 -0
- package/dist/src/functions/enums.d.ts.map +1 -1
- package/dist/src/functions/enums.lua +3 -3
- package/dist/src/functions/gridEntities.lua +2 -2
- package/dist/src/functions/gridIndex.d.ts +10 -0
- package/dist/src/functions/gridIndex.d.ts.map +1 -0
- package/dist/src/functions/gridIndex.lua +32 -0
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +9 -8
- package/dist/src/functions/logEntities.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +17 -9
- package/dist/src/functions/pills.lua +4 -4
- package/dist/src/functions/roomShape.d.ts +6 -1
- package/dist/src/functions/roomShape.d.ts.map +1 -1
- package/dist/src/functions/roomShape.lua +3 -0
- package/dist/src/functions/roomShapeWalls.d.ts +20 -0
- package/dist/src/functions/roomShapeWalls.d.ts.map +1 -0
- package/dist/src/functions/roomShapeWalls.lua +285 -0
- package/dist/src/functions/rooms.d.ts +7 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +16 -5
- package/dist/src/functions/set.d.ts +7 -0
- package/dist/src/functions/set.d.ts.map +1 -1
- package/dist/src/functions/set.lua +10 -0
- package/dist/src/functions/sprites.lua +2 -2
- package/dist/src/functions/trinkets.lua +2 -2
- package/dist/src/functions/utils.d.ts +18 -12
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +26 -14
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +24 -0
- package/dist/src/interfaces/Corner.d.ts +8 -0
- package/dist/src/interfaces/Corner.d.ts.map +1 -1
- package/dist/src/objects/roomShapeCorners.d.ts +6 -1
- package/dist/src/objects/roomShapeCorners.d.ts.map +1 -1
- package/dist/src/objects/roomShapeCorners.lua +71 -14
- package/package.json +2 -2
- package/src/features/customStage/backdrop.ts +3 -3
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/deployJSONRoom.ts +8 -98
- package/src/features/extraConsoleCommands/listCommands.ts +2 -2
- package/src/features/firstLast.ts +8 -8
- package/src/features/setHotkey.ts +60 -40
- package/src/functions/array.ts +2 -2
- package/src/functions/cards.ts +2 -2
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/dimensions.ts +2 -2
- package/src/functions/emptyRoom.ts +85 -0
- package/src/functions/enums.ts +4 -3
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/gridIndex.ts +40 -0
- package/src/functions/log.ts +9 -10
- package/src/functions/logEntities.ts +25 -9
- package/src/functions/pills.ts +4 -4
- package/src/functions/roomShape.ts +6 -1
- package/src/functions/roomShapeWalls.ts +359 -0
- package/src/functions/rooms.ts +22 -3
- package/src/functions/set.ts +12 -0
- package/src/functions/sprites.ts +2 -2
- package/src/functions/trinkets.ts +2 -2
- package/src/functions/utils.ts +20 -14
- package/src/index.ts +3 -0
- package/src/interfaces/Corner.ts +9 -0
- package/src/objects/roomShapeCorners.ts +74 -16
|
@@ -2,10 +2,12 @@ import { RoomShape } from "isaac-typescript-definitions";
|
|
|
2
2
|
import { CornerType } from "../enums/CornerType";
|
|
3
3
|
import { Corner } from "../interfaces/Corner";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The locations of the corners for each room shape.
|
|
7
|
+
*
|
|
8
|
+
* Note that these corner locations are not accurate for the Mother Boss Room and the Home closet
|
|
9
|
+
* rooms. (Those rooms have custom shapes.)
|
|
10
|
+
*/
|
|
9
11
|
export const ROOM_SHAPE_CORNERS: {
|
|
10
12
|
readonly [key in RoomShape]: readonly Corner[];
|
|
11
13
|
} = {
|
|
@@ -13,18 +15,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
13
15
|
[RoomShape.SHAPE_1x1]: [
|
|
14
16
|
{
|
|
15
17
|
type: CornerType.TOP_LEFT,
|
|
18
|
+
gridIndex: 0,
|
|
16
19
|
position: Vector(60, 140),
|
|
17
20
|
},
|
|
18
21
|
{
|
|
19
22
|
type: CornerType.TOP_RIGHT,
|
|
23
|
+
gridIndex: 14,
|
|
20
24
|
position: Vector(580, 140),
|
|
21
25
|
},
|
|
22
26
|
{
|
|
23
27
|
type: CornerType.BOTTOM_LEFT,
|
|
28
|
+
gridIndex: 120,
|
|
24
29
|
position: Vector(60, 420),
|
|
25
30
|
},
|
|
26
31
|
{
|
|
27
32
|
type: CornerType.BOTTOM_RIGHT,
|
|
33
|
+
gridIndex: 134,
|
|
28
34
|
position: Vector(580, 420),
|
|
29
35
|
},
|
|
30
36
|
],
|
|
@@ -33,18 +39,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
33
39
|
[RoomShape.IH]: [
|
|
34
40
|
{
|
|
35
41
|
type: CornerType.TOP_LEFT,
|
|
42
|
+
gridIndex: 30,
|
|
36
43
|
position: Vector(60, 220),
|
|
37
44
|
},
|
|
38
45
|
{
|
|
39
46
|
type: CornerType.TOP_RIGHT,
|
|
47
|
+
gridIndex: 44,
|
|
40
48
|
position: Vector(580, 220),
|
|
41
49
|
},
|
|
42
50
|
{
|
|
43
51
|
type: CornerType.BOTTOM_LEFT,
|
|
52
|
+
gridIndex: 90,
|
|
44
53
|
position: Vector(60, 340),
|
|
45
54
|
},
|
|
46
55
|
{
|
|
47
56
|
type: CornerType.BOTTOM_RIGHT,
|
|
57
|
+
gridIndex: 104,
|
|
48
58
|
position: Vector(580, 340),
|
|
49
59
|
},
|
|
50
60
|
],
|
|
@@ -53,18 +63,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
53
63
|
[RoomShape.IV]: [
|
|
54
64
|
{
|
|
55
65
|
type: CornerType.TOP_LEFT,
|
|
66
|
+
gridIndex: 4,
|
|
56
67
|
position: Vector(220, 140),
|
|
57
68
|
},
|
|
58
69
|
{
|
|
59
70
|
type: CornerType.TOP_RIGHT,
|
|
71
|
+
gridIndex: 10,
|
|
60
72
|
position: Vector(420, 140),
|
|
61
73
|
},
|
|
62
74
|
{
|
|
63
75
|
type: CornerType.BOTTOM_LEFT,
|
|
76
|
+
gridIndex: 124,
|
|
64
77
|
position: Vector(220, 420),
|
|
65
78
|
},
|
|
66
79
|
{
|
|
67
80
|
type: CornerType.BOTTOM_RIGHT,
|
|
81
|
+
gridIndex: 130,
|
|
68
82
|
position: Vector(420, 420),
|
|
69
83
|
},
|
|
70
84
|
],
|
|
@@ -73,18 +87,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
73
87
|
[RoomShape.SHAPE_1x2]: [
|
|
74
88
|
{
|
|
75
89
|
type: CornerType.TOP_LEFT,
|
|
90
|
+
gridIndex: 0,
|
|
76
91
|
position: Vector(60, 140),
|
|
77
92
|
},
|
|
78
93
|
{
|
|
79
94
|
type: CornerType.TOP_RIGHT,
|
|
95
|
+
gridIndex: 14,
|
|
80
96
|
position: Vector(580, 140),
|
|
81
97
|
},
|
|
82
98
|
{
|
|
83
99
|
type: CornerType.BOTTOM_LEFT,
|
|
100
|
+
gridIndex: 225,
|
|
84
101
|
position: Vector(60, 700),
|
|
85
102
|
},
|
|
86
103
|
{
|
|
87
104
|
type: CornerType.BOTTOM_RIGHT,
|
|
105
|
+
gridIndex: 239,
|
|
88
106
|
position: Vector(580, 700),
|
|
89
107
|
},
|
|
90
108
|
],
|
|
@@ -93,18 +111,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
93
111
|
[RoomShape.IIV]: [
|
|
94
112
|
{
|
|
95
113
|
type: CornerType.TOP_LEFT,
|
|
114
|
+
gridIndex: 4,
|
|
96
115
|
position: Vector(220, 140),
|
|
97
116
|
},
|
|
98
117
|
{
|
|
99
118
|
type: CornerType.TOP_RIGHT,
|
|
119
|
+
gridIndex: 10,
|
|
100
120
|
position: Vector(420, 140),
|
|
101
121
|
},
|
|
102
122
|
{
|
|
103
123
|
type: CornerType.BOTTOM_LEFT,
|
|
124
|
+
gridIndex: 229,
|
|
104
125
|
position: Vector(220, 700),
|
|
105
126
|
},
|
|
106
127
|
{
|
|
107
128
|
type: CornerType.BOTTOM_RIGHT,
|
|
129
|
+
gridIndex: 235,
|
|
108
130
|
position: Vector(420, 700),
|
|
109
131
|
},
|
|
110
132
|
],
|
|
@@ -113,18 +135,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
113
135
|
[RoomShape.SHAPE_2x1]: [
|
|
114
136
|
{
|
|
115
137
|
type: CornerType.TOP_LEFT,
|
|
138
|
+
gridIndex: 0,
|
|
116
139
|
position: Vector(60, 140),
|
|
117
140
|
},
|
|
118
141
|
{
|
|
119
142
|
type: CornerType.TOP_RIGHT,
|
|
143
|
+
gridIndex: 27,
|
|
120
144
|
position: Vector(1100, 140),
|
|
121
145
|
},
|
|
122
146
|
{
|
|
123
147
|
type: CornerType.BOTTOM_LEFT,
|
|
148
|
+
gridIndex: 224,
|
|
124
149
|
position: Vector(60, 420),
|
|
125
150
|
},
|
|
126
151
|
{
|
|
127
152
|
type: CornerType.BOTTOM_RIGHT,
|
|
153
|
+
gridIndex: 251,
|
|
128
154
|
position: Vector(1100, 420),
|
|
129
155
|
},
|
|
130
156
|
],
|
|
@@ -133,18 +159,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
133
159
|
[RoomShape.IIH]: [
|
|
134
160
|
{
|
|
135
161
|
type: CornerType.TOP_LEFT,
|
|
162
|
+
gridIndex: 56,
|
|
136
163
|
position: Vector(60, 220),
|
|
137
164
|
},
|
|
138
165
|
{
|
|
139
166
|
type: CornerType.TOP_RIGHT,
|
|
167
|
+
gridIndex: 83,
|
|
140
168
|
position: Vector(1100, 220),
|
|
141
169
|
},
|
|
142
170
|
{
|
|
143
171
|
type: CornerType.BOTTOM_LEFT,
|
|
172
|
+
gridIndex: 168,
|
|
144
173
|
position: Vector(60, 340),
|
|
145
174
|
},
|
|
146
175
|
{
|
|
147
176
|
type: CornerType.BOTTOM_RIGHT,
|
|
177
|
+
gridIndex: 195,
|
|
148
178
|
position: Vector(1100, 340),
|
|
149
179
|
},
|
|
150
180
|
],
|
|
@@ -153,18 +183,22 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
153
183
|
[RoomShape.SHAPE_2x2]: [
|
|
154
184
|
{
|
|
155
185
|
type: CornerType.TOP_LEFT,
|
|
186
|
+
gridIndex: 0,
|
|
156
187
|
position: Vector(60, 140),
|
|
157
188
|
},
|
|
158
189
|
{
|
|
159
190
|
type: CornerType.TOP_RIGHT,
|
|
191
|
+
gridIndex: 27,
|
|
160
192
|
position: Vector(1100, 140),
|
|
161
193
|
},
|
|
162
194
|
{
|
|
163
195
|
type: CornerType.BOTTOM_LEFT,
|
|
196
|
+
gridIndex: 420,
|
|
164
197
|
position: Vector(60, 700),
|
|
165
198
|
},
|
|
166
199
|
{
|
|
167
200
|
type: CornerType.BOTTOM_RIGHT,
|
|
201
|
+
gridIndex: 447,
|
|
168
202
|
position: Vector(1100, 700),
|
|
169
203
|
},
|
|
170
204
|
],
|
|
@@ -173,26 +207,32 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
173
207
|
[RoomShape.LTL]: [
|
|
174
208
|
{
|
|
175
209
|
type: CornerType.TOP_LEFT,
|
|
176
|
-
|
|
210
|
+
gridIndex: 13,
|
|
211
|
+
position: Vector(580, 140), // Center
|
|
177
212
|
},
|
|
178
213
|
{
|
|
179
214
|
type: CornerType.TOP_RIGHT,
|
|
215
|
+
gridIndex: 27,
|
|
180
216
|
position: Vector(1100, 140),
|
|
181
217
|
},
|
|
182
218
|
{
|
|
183
219
|
type: CornerType.TOP_LEFT,
|
|
184
|
-
|
|
220
|
+
gridIndex: 196,
|
|
221
|
+
position: Vector(60, 420), // Left
|
|
185
222
|
},
|
|
186
223
|
{
|
|
187
224
|
type: CornerType.BOTTOM_RIGHT,
|
|
188
|
-
|
|
225
|
+
gridIndex: 209,
|
|
226
|
+
position: Vector(580, 420), // Center
|
|
189
227
|
},
|
|
190
228
|
{
|
|
191
229
|
type: CornerType.BOTTOM_LEFT,
|
|
230
|
+
gridIndex: 420,
|
|
192
231
|
position: Vector(60, 700),
|
|
193
232
|
},
|
|
194
233
|
{
|
|
195
234
|
type: CornerType.BOTTOM_RIGHT,
|
|
235
|
+
gridIndex: 447,
|
|
196
236
|
position: Vector(1100, 700),
|
|
197
237
|
},
|
|
198
238
|
],
|
|
@@ -201,26 +241,32 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
201
241
|
[RoomShape.LTR]: [
|
|
202
242
|
{
|
|
203
243
|
type: CornerType.TOP_LEFT,
|
|
244
|
+
gridIndex: 0,
|
|
204
245
|
position: Vector(60, 140),
|
|
205
246
|
},
|
|
206
247
|
{
|
|
207
248
|
type: CornerType.TOP_RIGHT,
|
|
208
|
-
|
|
249
|
+
gridIndex: 14,
|
|
250
|
+
position: Vector(580, 140), // Center
|
|
209
251
|
},
|
|
210
252
|
{
|
|
211
253
|
type: CornerType.BOTTOM_LEFT,
|
|
212
|
-
|
|
254
|
+
gridIndex: 210,
|
|
255
|
+
position: Vector(580, 420), // Center
|
|
213
256
|
},
|
|
214
257
|
{
|
|
215
258
|
type: CornerType.TOP_RIGHT,
|
|
216
|
-
|
|
259
|
+
gridIndex: 223,
|
|
260
|
+
position: Vector(1100, 420), // Right
|
|
217
261
|
},
|
|
218
262
|
{
|
|
219
263
|
type: CornerType.BOTTOM_LEFT,
|
|
264
|
+
gridIndex: 420,
|
|
220
265
|
position: Vector(60, 700),
|
|
221
266
|
},
|
|
222
267
|
{
|
|
223
268
|
type: CornerType.BOTTOM_RIGHT,
|
|
269
|
+
gridIndex: 447,
|
|
224
270
|
position: Vector(1100, 700),
|
|
225
271
|
},
|
|
226
272
|
],
|
|
@@ -229,26 +275,32 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
229
275
|
[RoomShape.LBL]: [
|
|
230
276
|
{
|
|
231
277
|
type: CornerType.TOP_LEFT,
|
|
278
|
+
gridIndex: 0,
|
|
232
279
|
position: Vector(60, 140),
|
|
233
280
|
},
|
|
234
281
|
{
|
|
235
282
|
type: CornerType.TOP_RIGHT,
|
|
283
|
+
gridIndex: 27,
|
|
236
284
|
position: Vector(1100, 140),
|
|
237
285
|
},
|
|
238
286
|
{
|
|
239
287
|
type: CornerType.BOTTOM_LEFT,
|
|
240
|
-
|
|
288
|
+
gridIndex: 224,
|
|
289
|
+
position: Vector(580, 140), // Left
|
|
241
290
|
},
|
|
242
291
|
{
|
|
243
292
|
type: CornerType.TOP_RIGHT,
|
|
244
|
-
|
|
293
|
+
gridIndex: 237,
|
|
294
|
+
position: Vector(580, 420), // Center
|
|
245
295
|
},
|
|
246
296
|
{
|
|
247
297
|
type: CornerType.BOTTOM_LEFT,
|
|
248
|
-
|
|
298
|
+
gridIndex: 433,
|
|
299
|
+
position: Vector(580, 700), // Center
|
|
249
300
|
},
|
|
250
301
|
{
|
|
251
302
|
type: CornerType.BOTTOM_RIGHT,
|
|
303
|
+
gridIndex: 447,
|
|
252
304
|
position: Vector(1100, 700),
|
|
253
305
|
},
|
|
254
306
|
],
|
|
@@ -257,27 +309,33 @@ export const ROOM_SHAPE_CORNERS: {
|
|
|
257
309
|
[RoomShape.LBR]: [
|
|
258
310
|
{
|
|
259
311
|
type: CornerType.TOP_LEFT,
|
|
312
|
+
gridIndex: 0,
|
|
260
313
|
position: Vector(60, 140),
|
|
261
314
|
},
|
|
262
315
|
{
|
|
263
316
|
type: CornerType.TOP_RIGHT,
|
|
317
|
+
gridIndex: 27,
|
|
264
318
|
position: Vector(1100, 140),
|
|
265
319
|
},
|
|
266
320
|
{
|
|
267
321
|
type: CornerType.TOP_LEFT,
|
|
268
|
-
|
|
322
|
+
gridIndex: 238,
|
|
323
|
+
position: Vector(580, 420), // Center
|
|
269
324
|
},
|
|
270
325
|
{
|
|
271
326
|
type: CornerType.BOTTOM_RIGHT,
|
|
272
|
-
|
|
327
|
+
gridIndex: 251,
|
|
328
|
+
position: Vector(1100, 420), // Right
|
|
273
329
|
},
|
|
274
330
|
{
|
|
275
331
|
type: CornerType.BOTTOM_LEFT,
|
|
332
|
+
gridIndex: 420,
|
|
276
333
|
position: Vector(60, 700),
|
|
277
334
|
},
|
|
278
335
|
{
|
|
279
336
|
type: CornerType.BOTTOM_RIGHT,
|
|
280
|
-
|
|
337
|
+
gridIndex: 434,
|
|
338
|
+
position: Vector(580, 700), // Right
|
|
281
339
|
},
|
|
282
340
|
],
|
|
283
341
|
} as const;
|