isaacscript-common 52.0.0 → 52.0.1
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.rollup.d.ts +2 -6
- package/dist/isaacscript-common.lua +244 -236
- package/dist/src/functions/gridEntities.d.ts +2 -5
- package/dist/src/functions/gridEntities.d.ts.map +1 -1
- package/dist/src/functions/gridEntities.lua +220 -212
- package/dist/src/objects/gridEntityTypeToANM2Name.d.ts +32 -0
- package/dist/src/objects/gridEntityTypeToANM2Name.d.ts.map +1 -0
- package/dist/src/objects/gridEntityTypeToANM2Name.lua +35 -0
- package/package.json +1 -1
- package/src/functions/gridEntities.ts +33 -19
- package/src/objects/gridEntityTypeToANM2Name.ts +36 -0
- package/dist/src/objects/gridEntityTypeToANM2Path.d.ts +0 -31
- package/dist/src/objects/gridEntityTypeToANM2Path.d.ts.map +0 -1
- package/dist/src/objects/gridEntityTypeToANM2Path.lua +0 -34
- package/src/objects/gridEntityTypeToANM2Path.ts +0 -35
|
@@ -6,7 +6,7 @@ local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
|
6
6
|
local Set = ____lualib.Set
|
|
7
7
|
local Map = ____lualib.Map
|
|
8
8
|
local ____exports = {}
|
|
9
|
-
local getAllGridEntities
|
|
9
|
+
local getAllGridEntities, getGridEntityANM2Name, getGridEntityANM2NameDecoration, getRockPNGName
|
|
10
10
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
11
11
|
local BackdropType = ____isaac_2Dtypescript_2Ddefinitions.BackdropType
|
|
12
12
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
@@ -29,8 +29,8 @@ local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
|
|
|
29
29
|
local ____roomShapeToTopLeftWallGridIndexMap = require("src.maps.roomShapeToTopLeftWallGridIndexMap")
|
|
30
30
|
local DEFAULT_TOP_LEFT_WALL_GRID_INDEX = ____roomShapeToTopLeftWallGridIndexMap.DEFAULT_TOP_LEFT_WALL_GRID_INDEX
|
|
31
31
|
local ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = ____roomShapeToTopLeftWallGridIndexMap.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP
|
|
32
|
-
local
|
|
33
|
-
local
|
|
32
|
+
local ____gridEntityTypeToANM2Name = require("src.objects.gridEntityTypeToANM2Name")
|
|
33
|
+
local GRID_ENTITY_TYPE_TO_ANM2_NAME = ____gridEntityTypeToANM2Name.GRID_ENTITY_TYPE_TO_ANM2_NAME
|
|
34
34
|
local ____poopGridEntityXMLTypesSet = require("src.sets.poopGridEntityXMLTypesSet")
|
|
35
35
|
local POOP_GRID_ENTITY_XML_TYPES_SET = ____poopGridEntityXMLTypesSet.POOP_GRID_ENTITY_XML_TYPES_SET
|
|
36
36
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
@@ -72,100 +72,114 @@ function getAllGridEntities(self)
|
|
|
72
72
|
end
|
|
73
73
|
return gridEntities
|
|
74
74
|
end
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
function getGridEntityANM2Name(self, gridEntityType)
|
|
76
|
+
repeat
|
|
77
|
+
local ____switch33 = gridEntityType
|
|
78
|
+
local ____cond33 = ____switch33 == GridEntityType.DECORATION
|
|
79
|
+
if ____cond33 then
|
|
80
|
+
do
|
|
81
|
+
return getGridEntityANM2NameDecoration(nil)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
do
|
|
85
|
+
do
|
|
86
|
+
return GRID_ENTITY_TYPE_TO_ANM2_NAME[gridEntityType]
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
until true
|
|
90
|
+
end
|
|
91
|
+
function getGridEntityANM2NameDecoration(self)
|
|
78
92
|
local room = game:GetRoom()
|
|
79
93
|
local backdropType = room:GetBackdropType()
|
|
80
94
|
repeat
|
|
81
|
-
local
|
|
82
|
-
local
|
|
83
|
-
if
|
|
95
|
+
local ____switch37 = backdropType
|
|
96
|
+
local ____cond37 = ____switch37 == BackdropType.BASEMENT or ____switch37 == BackdropType.CELLAR or ____switch37 == BackdropType.BURNING_BASEMENT or ____switch37 == BackdropType.DOWNPOUR_ENTRANCE or ____switch37 == BackdropType.ISAACS_BEDROOM or ____switch37 == BackdropType.CLOSET
|
|
97
|
+
if ____cond37 then
|
|
84
98
|
do
|
|
85
|
-
return "
|
|
99
|
+
return "Props_01_Basement.anm2"
|
|
86
100
|
end
|
|
87
101
|
end
|
|
88
|
-
|
|
89
|
-
if
|
|
102
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.CAVES or ____switch37 == BackdropType.CATACOMBS or ____switch37 == BackdropType.FLOODED_CAVES or ____switch37 == BackdropType.MINES_ENTRANCE)
|
|
103
|
+
if ____cond37 then
|
|
90
104
|
do
|
|
91
|
-
return "
|
|
105
|
+
return "Props_03_Caves.anm2"
|
|
92
106
|
end
|
|
93
107
|
end
|
|
94
|
-
|
|
95
|
-
if
|
|
108
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.DEPTHS or ____switch37 == BackdropType.NECROPOLIS or ____switch37 == BackdropType.DANK_DEPTHS or ____switch37 == BackdropType.SACRIFICE or ____switch37 == BackdropType.MAUSOLEUM or ____switch37 == BackdropType.MAUSOLEUM_ENTRANCE or ____switch37 == BackdropType.CORPSE_ENTRANCE or ____switch37 == BackdropType.MAUSOLEUM_2 or ____switch37 == BackdropType.MAUSOLEUM_3 or ____switch37 == BackdropType.MAUSOLEUM_4 or ____switch37 == BackdropType.CLOSET_B or ____switch37 == BackdropType.DARK_CLOSET)
|
|
109
|
+
if ____cond37 then
|
|
96
110
|
do
|
|
97
|
-
return "
|
|
111
|
+
return "Props_05_Depths.anm2"
|
|
98
112
|
end
|
|
99
113
|
end
|
|
100
|
-
|
|
101
|
-
if
|
|
114
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.WOMB or ____switch37 == BackdropType.SCARRED_WOMB)
|
|
115
|
+
if ____cond37 then
|
|
102
116
|
do
|
|
103
|
-
return "
|
|
117
|
+
return "Props_07_The Womb.anm2"
|
|
104
118
|
end
|
|
105
119
|
end
|
|
106
|
-
|
|
107
|
-
if
|
|
120
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.UTERO
|
|
121
|
+
if ____cond37 then
|
|
108
122
|
do
|
|
109
|
-
return "
|
|
123
|
+
return "Props_07_Utero.anm2"
|
|
110
124
|
end
|
|
111
125
|
end
|
|
112
|
-
|
|
113
|
-
if
|
|
126
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.BLUE_WOMB or ____switch37 == BackdropType.BLUE_WOMB_PASS)
|
|
127
|
+
if ____cond37 then
|
|
114
128
|
do
|
|
115
|
-
return "
|
|
129
|
+
return "Props_07_The Womb_blue.anm2"
|
|
116
130
|
end
|
|
117
131
|
end
|
|
118
|
-
|
|
119
|
-
if
|
|
132
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.SHEOL or ____switch37 == BackdropType.GEHENNA)
|
|
133
|
+
if ____cond37 then
|
|
120
134
|
do
|
|
121
|
-
return "
|
|
135
|
+
return "Props_09_Sheol.anm2"
|
|
122
136
|
end
|
|
123
137
|
end
|
|
124
|
-
|
|
125
|
-
if
|
|
138
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.CATHEDRAL
|
|
139
|
+
if ____cond37 then
|
|
126
140
|
do
|
|
127
|
-
return "
|
|
141
|
+
return "Props_10_Cathedral.anm2"
|
|
128
142
|
end
|
|
129
143
|
end
|
|
130
|
-
|
|
131
|
-
if
|
|
144
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.CHEST
|
|
145
|
+
if ____cond37 then
|
|
132
146
|
do
|
|
133
|
-
return "
|
|
147
|
+
return "Props_11_The Chest.anm2"
|
|
134
148
|
end
|
|
135
149
|
end
|
|
136
|
-
|
|
137
|
-
if
|
|
150
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.GREED_SHOP
|
|
151
|
+
if ____cond37 then
|
|
138
152
|
do
|
|
139
|
-
return "
|
|
153
|
+
return "Props_12_Greed.anm2"
|
|
140
154
|
end
|
|
141
155
|
end
|
|
142
|
-
|
|
143
|
-
if
|
|
156
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.DOWNPOUR
|
|
157
|
+
if ____cond37 then
|
|
144
158
|
do
|
|
145
|
-
return "
|
|
159
|
+
return "props_01x_downpour.anm2"
|
|
146
160
|
end
|
|
147
161
|
end
|
|
148
|
-
|
|
149
|
-
if
|
|
162
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.MINES or ____switch37 == BackdropType.ASHPIT or ____switch37 == BackdropType.MINES_SHAFT or ____switch37 == BackdropType.ASHPIT_SHAFT)
|
|
163
|
+
if ____cond37 then
|
|
150
164
|
do
|
|
151
|
-
return "
|
|
165
|
+
return "props_03x_mines.anm2"
|
|
152
166
|
end
|
|
153
167
|
end
|
|
154
|
-
|
|
155
|
-
if
|
|
168
|
+
____cond37 = ____cond37 or (____switch37 == BackdropType.CORPSE or ____switch37 == BackdropType.CORPSE_2 or ____switch37 == BackdropType.CORPSE_3 or ____switch37 == BackdropType.MORTIS)
|
|
169
|
+
if ____cond37 then
|
|
156
170
|
do
|
|
157
|
-
return "
|
|
171
|
+
return "props_07_the corpse.anm2"
|
|
158
172
|
end
|
|
159
173
|
end
|
|
160
|
-
|
|
161
|
-
if
|
|
174
|
+
____cond37 = ____cond37 or ____switch37 == BackdropType.DROSS
|
|
175
|
+
if ____cond37 then
|
|
162
176
|
do
|
|
163
|
-
return "
|
|
177
|
+
return "props_02x_dross.anm2"
|
|
164
178
|
end
|
|
165
179
|
end
|
|
166
180
|
do
|
|
167
181
|
do
|
|
168
|
-
return "
|
|
182
|
+
return "Props_01_Basement.anm2"
|
|
169
183
|
end
|
|
170
184
|
end
|
|
171
185
|
until true
|
|
@@ -176,6 +190,156 @@ function ____exports.getGridEntityCollisionPoints(self, gridEntity)
|
|
|
176
190
|
local bottomRight = Vector(gridEntity.Position.X + DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y + DISTANCE_OF_GRID_TILE / 2)
|
|
177
191
|
return {topLeft = topLeft, bottomRight = bottomRight}
|
|
178
192
|
end
|
|
193
|
+
function getRockPNGName(self)
|
|
194
|
+
local room = game:GetRoom()
|
|
195
|
+
local backdropType = room:GetBackdropType()
|
|
196
|
+
repeat
|
|
197
|
+
local ____switch60 = backdropType
|
|
198
|
+
local ____cond60 = ____switch60 == BackdropType.BASEMENT or ____switch60 == BackdropType.CHEST
|
|
199
|
+
if ____cond60 then
|
|
200
|
+
do
|
|
201
|
+
return "rocks_basement.png"
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CELLAR
|
|
205
|
+
if ____cond60 then
|
|
206
|
+
do
|
|
207
|
+
return "rocks_cellar.png"
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.BURNING_BASEMENT
|
|
211
|
+
if ____cond60 then
|
|
212
|
+
do
|
|
213
|
+
return "rocks_burningbasement.png"
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CAVES
|
|
217
|
+
if ____cond60 then
|
|
218
|
+
do
|
|
219
|
+
return "rocks_caves.png"
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CATACOMBS
|
|
223
|
+
if ____cond60 then
|
|
224
|
+
do
|
|
225
|
+
return "rocks_catacombs.png"
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.FLOODED_CAVES
|
|
229
|
+
if ____cond60 then
|
|
230
|
+
do
|
|
231
|
+
return "rocks_drownedcaves.png"
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.DEPTHS or ____switch60 == BackdropType.NECROPOLIS or ____switch60 == BackdropType.DANK_DEPTHS or ____switch60 == BackdropType.SACRIFICE or ____switch60 == BackdropType.DARK_CLOSET)
|
|
235
|
+
if ____cond60 then
|
|
236
|
+
do
|
|
237
|
+
return "rocks_depths.png"
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.WOMB
|
|
241
|
+
if ____cond60 then
|
|
242
|
+
do
|
|
243
|
+
return "rocks_womb.png"
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.UTERO
|
|
247
|
+
if ____cond60 then
|
|
248
|
+
do
|
|
249
|
+
return "rocks_utero.png"
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.SCARRED_WOMB
|
|
253
|
+
if ____cond60 then
|
|
254
|
+
do
|
|
255
|
+
return "rocks_scarredwomb.png"
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.BLUE_WOMB or ____switch60 == BackdropType.BLUE_WOMB_PASS)
|
|
259
|
+
if ____cond60 then
|
|
260
|
+
do
|
|
261
|
+
return "rocks_bluewomb.png"
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.SHEOL or ____switch60 == BackdropType.DARK_ROOM)
|
|
265
|
+
if ____cond60 then
|
|
266
|
+
do
|
|
267
|
+
return "rocks_sheol.png"
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.CATHEDRAL or ____switch60 == BackdropType.PLANETARIUM)
|
|
271
|
+
if ____cond60 then
|
|
272
|
+
do
|
|
273
|
+
return "rocks_cathedral.png"
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.SECRET or ____switch60 == BackdropType.MINES or ____switch60 == BackdropType.MINES_ENTRANCE or ____switch60 == BackdropType.MINES_SHAFT)
|
|
277
|
+
if ____cond60 then
|
|
278
|
+
do
|
|
279
|
+
return "rocks_secretroom.png"
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.DOWNPOUR or ____switch60 == BackdropType.DOWNPOUR_ENTRANCE)
|
|
283
|
+
if ____cond60 then
|
|
284
|
+
do
|
|
285
|
+
return "rocks_downpour.png"
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.MAUSOLEUM or ____switch60 == BackdropType.MAUSOLEUM_ENTRANCE or ____switch60 == BackdropType.MAUSOLEUM_2 or ____switch60 == BackdropType.MAUSOLEUM_3 or ____switch60 == BackdropType.MAUSOLEUM_4)
|
|
289
|
+
if ____cond60 then
|
|
290
|
+
do
|
|
291
|
+
return "rocks_mausoleum.png"
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.CORPSE or ____switch60 == BackdropType.MORTIS)
|
|
295
|
+
if ____cond60 then
|
|
296
|
+
do
|
|
297
|
+
return "rocks_corpse.png"
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CORPSE_ENTRANCE
|
|
301
|
+
if ____cond60 then
|
|
302
|
+
do
|
|
303
|
+
return "rocks_corpseentrance.png"
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CORPSE_2
|
|
307
|
+
if ____cond60 then
|
|
308
|
+
do
|
|
309
|
+
return "rocks_corpse2.png"
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.CORPSE_3
|
|
313
|
+
if ____cond60 then
|
|
314
|
+
do
|
|
315
|
+
return "rocks_corpse3.png"
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.DROSS
|
|
319
|
+
if ____cond60 then
|
|
320
|
+
do
|
|
321
|
+
return "rocks_dross.png"
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
____cond60 = ____cond60 or (____switch60 == BackdropType.ASHPIT or ____switch60 == BackdropType.ASHPIT_SHAFT)
|
|
325
|
+
if ____cond60 then
|
|
326
|
+
do
|
|
327
|
+
return "rocks_ashpit.png"
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
____cond60 = ____cond60 or ____switch60 == BackdropType.GEHENNA
|
|
331
|
+
if ____cond60 then
|
|
332
|
+
do
|
|
333
|
+
return "rocks_gehenna.png"
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
do
|
|
337
|
+
do
|
|
338
|
+
return "rocks_basement.png"
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
until true
|
|
342
|
+
end
|
|
179
343
|
--- Helper function to get the grid index of the top left wall. (This will depend on what the current
|
|
180
344
|
-- room shape is.)
|
|
181
345
|
--
|
|
@@ -480,20 +644,8 @@ function ____exports.getGridEntitiesMap(self, ...)
|
|
|
480
644
|
end
|
|
481
645
|
--- Helper function to get the ANM2 path for a grid entity type.
|
|
482
646
|
function ____exports.getGridEntityANM2Path(self, gridEntityType)
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
local ____cond32 = ____switch32 == GridEntityType.DECORATION
|
|
486
|
-
if ____cond32 then
|
|
487
|
-
do
|
|
488
|
-
return ____exports.getGridEntityANM2PathDecoration(nil)
|
|
489
|
-
end
|
|
490
|
-
end
|
|
491
|
-
do
|
|
492
|
-
do
|
|
493
|
-
return GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType]
|
|
494
|
-
end
|
|
495
|
-
end
|
|
496
|
-
until true
|
|
647
|
+
local gridEntityANM2Name = getGridEntityANM2Name(nil, gridEntityType)
|
|
648
|
+
return "gfx/grid/" .. tostring(gridEntityANM2Name)
|
|
497
649
|
end
|
|
498
650
|
--- Helper function to get a string containing the grid entity's type and variant.
|
|
499
651
|
function ____exports.getGridEntityID(self, gridEntity)
|
|
@@ -519,155 +671,11 @@ function ____exports.getMatchingGridEntities(self, gridEntityType, variant)
|
|
|
519
671
|
end
|
|
520
672
|
--- Helper function to get the PNG path for a rock. This depends on the current room's backdrop. The
|
|
521
673
|
-- values are taken from the "backdrops.xml" file.
|
|
674
|
+
--
|
|
675
|
+
-- All of the rock PNGs are in the "gfx/grid" directory.
|
|
522
676
|
function ____exports.getRockPNGPath(self)
|
|
523
|
-
local
|
|
524
|
-
|
|
525
|
-
repeat
|
|
526
|
-
local ____switch58 = backdropType
|
|
527
|
-
local ____cond58 = ____switch58 == BackdropType.BASEMENT or ____switch58 == BackdropType.CHEST
|
|
528
|
-
if ____cond58 then
|
|
529
|
-
do
|
|
530
|
-
return "rocks_basement.png"
|
|
531
|
-
end
|
|
532
|
-
end
|
|
533
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CELLAR
|
|
534
|
-
if ____cond58 then
|
|
535
|
-
do
|
|
536
|
-
return "rocks_cellar.png"
|
|
537
|
-
end
|
|
538
|
-
end
|
|
539
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.BURNING_BASEMENT
|
|
540
|
-
if ____cond58 then
|
|
541
|
-
do
|
|
542
|
-
return "rocks_burningbasement.png"
|
|
543
|
-
end
|
|
544
|
-
end
|
|
545
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CAVES
|
|
546
|
-
if ____cond58 then
|
|
547
|
-
do
|
|
548
|
-
return "rocks_caves.png"
|
|
549
|
-
end
|
|
550
|
-
end
|
|
551
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CATACOMBS
|
|
552
|
-
if ____cond58 then
|
|
553
|
-
do
|
|
554
|
-
return "rocks_catacombs.png"
|
|
555
|
-
end
|
|
556
|
-
end
|
|
557
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.FLOODED_CAVES
|
|
558
|
-
if ____cond58 then
|
|
559
|
-
do
|
|
560
|
-
return "rocks_drownedcaves.png"
|
|
561
|
-
end
|
|
562
|
-
end
|
|
563
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.DEPTHS or ____switch58 == BackdropType.NECROPOLIS or ____switch58 == BackdropType.DANK_DEPTHS or ____switch58 == BackdropType.SACRIFICE or ____switch58 == BackdropType.DARK_CLOSET)
|
|
564
|
-
if ____cond58 then
|
|
565
|
-
do
|
|
566
|
-
return "rocks_depths.png"
|
|
567
|
-
end
|
|
568
|
-
end
|
|
569
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.WOMB
|
|
570
|
-
if ____cond58 then
|
|
571
|
-
do
|
|
572
|
-
return "rocks_womb.png"
|
|
573
|
-
end
|
|
574
|
-
end
|
|
575
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.UTERO
|
|
576
|
-
if ____cond58 then
|
|
577
|
-
do
|
|
578
|
-
return "rocks_utero.png"
|
|
579
|
-
end
|
|
580
|
-
end
|
|
581
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.SCARRED_WOMB
|
|
582
|
-
if ____cond58 then
|
|
583
|
-
do
|
|
584
|
-
return "rocks_scarredwomb.png"
|
|
585
|
-
end
|
|
586
|
-
end
|
|
587
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.BLUE_WOMB or ____switch58 == BackdropType.BLUE_WOMB_PASS)
|
|
588
|
-
if ____cond58 then
|
|
589
|
-
do
|
|
590
|
-
return "rocks_bluewomb.png"
|
|
591
|
-
end
|
|
592
|
-
end
|
|
593
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.SHEOL or ____switch58 == BackdropType.DARK_ROOM)
|
|
594
|
-
if ____cond58 then
|
|
595
|
-
do
|
|
596
|
-
return "rocks_sheol.png"
|
|
597
|
-
end
|
|
598
|
-
end
|
|
599
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.CATHEDRAL or ____switch58 == BackdropType.PLANETARIUM)
|
|
600
|
-
if ____cond58 then
|
|
601
|
-
do
|
|
602
|
-
return "rocks_cathedral.png"
|
|
603
|
-
end
|
|
604
|
-
end
|
|
605
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.SECRET or ____switch58 == BackdropType.MINES or ____switch58 == BackdropType.MINES_ENTRANCE or ____switch58 == BackdropType.MINES_SHAFT)
|
|
606
|
-
if ____cond58 then
|
|
607
|
-
do
|
|
608
|
-
return "rocks_secretroom.png"
|
|
609
|
-
end
|
|
610
|
-
end
|
|
611
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.DOWNPOUR or ____switch58 == BackdropType.DOWNPOUR_ENTRANCE)
|
|
612
|
-
if ____cond58 then
|
|
613
|
-
do
|
|
614
|
-
return "rocks_downpour.png"
|
|
615
|
-
end
|
|
616
|
-
end
|
|
617
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.MAUSOLEUM or ____switch58 == BackdropType.MAUSOLEUM_ENTRANCE or ____switch58 == BackdropType.MAUSOLEUM_2 or ____switch58 == BackdropType.MAUSOLEUM_3 or ____switch58 == BackdropType.MAUSOLEUM_4)
|
|
618
|
-
if ____cond58 then
|
|
619
|
-
do
|
|
620
|
-
return "rocks_mausoleum.png"
|
|
621
|
-
end
|
|
622
|
-
end
|
|
623
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.CORPSE or ____switch58 == BackdropType.MORTIS)
|
|
624
|
-
if ____cond58 then
|
|
625
|
-
do
|
|
626
|
-
return "rocks_corpse.png"
|
|
627
|
-
end
|
|
628
|
-
end
|
|
629
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CORPSE_ENTRANCE
|
|
630
|
-
if ____cond58 then
|
|
631
|
-
do
|
|
632
|
-
return "rocks_corpseentrance.png"
|
|
633
|
-
end
|
|
634
|
-
end
|
|
635
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CORPSE_2
|
|
636
|
-
if ____cond58 then
|
|
637
|
-
do
|
|
638
|
-
return "rocks_corpse2.png"
|
|
639
|
-
end
|
|
640
|
-
end
|
|
641
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.CORPSE_3
|
|
642
|
-
if ____cond58 then
|
|
643
|
-
do
|
|
644
|
-
return "rocks_corpse3.png"
|
|
645
|
-
end
|
|
646
|
-
end
|
|
647
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.DROSS
|
|
648
|
-
if ____cond58 then
|
|
649
|
-
do
|
|
650
|
-
return "rocks_dross.png"
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
|
-
____cond58 = ____cond58 or (____switch58 == BackdropType.ASHPIT or ____switch58 == BackdropType.ASHPIT_SHAFT)
|
|
654
|
-
if ____cond58 then
|
|
655
|
-
do
|
|
656
|
-
return "rocks_ashpit.png"
|
|
657
|
-
end
|
|
658
|
-
end
|
|
659
|
-
____cond58 = ____cond58 or ____switch58 == BackdropType.GEHENNA
|
|
660
|
-
if ____cond58 then
|
|
661
|
-
do
|
|
662
|
-
return "rocks_gehenna.png"
|
|
663
|
-
end
|
|
664
|
-
end
|
|
665
|
-
do
|
|
666
|
-
do
|
|
667
|
-
return "rocks_basement.png"
|
|
668
|
-
end
|
|
669
|
-
end
|
|
670
|
-
until true
|
|
677
|
+
local rockPNGName = getRockPNGName(nil)
|
|
678
|
+
return "gfx/grid/" .. rockPNGName
|
|
671
679
|
end
|
|
672
680
|
--- Helper function to get the grid entities on the surrounding tiles from the provided grid entity.
|
|
673
681
|
--
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** These files exist in the "gfx/grid" directory. */
|
|
2
|
+
export declare const GRID_ENTITY_TYPE_TO_ANM2_NAME: {
|
|
3
|
+
readonly 0: undefined;
|
|
4
|
+
readonly 1: "Props_01_Basement.anm2";
|
|
5
|
+
readonly 2: "grid_rock.anm2";
|
|
6
|
+
readonly 3: "grid_rock.anm2";
|
|
7
|
+
readonly 4: "grid_rock.anm2";
|
|
8
|
+
readonly 5: "grid_rock.anm2";
|
|
9
|
+
readonly 6: "grid_rock.anm2";
|
|
10
|
+
readonly 7: "grid_pit.anm2";
|
|
11
|
+
readonly 8: "grid_spikes.anm2";
|
|
12
|
+
readonly 9: "grid_spikes.anm2";
|
|
13
|
+
readonly 10: "grid_web.anm2";
|
|
14
|
+
readonly 11: "grid_locks.anm2";
|
|
15
|
+
readonly 12: "grid_tnt.anm2";
|
|
16
|
+
readonly 13: "grid_fireplace.anm2";
|
|
17
|
+
readonly 14: "grid_poop.anm2";
|
|
18
|
+
readonly 15: undefined;
|
|
19
|
+
readonly 16: undefined;
|
|
20
|
+
readonly 17: "Door_11_TrapDoor.anm2";
|
|
21
|
+
readonly 18: "door_20_secrettrapdoor.anm2";
|
|
22
|
+
readonly 19: undefined;
|
|
23
|
+
readonly 20: "grid_pressureplate.anm2";
|
|
24
|
+
readonly 21: undefined;
|
|
25
|
+
readonly 22: "grid_rock.anm2";
|
|
26
|
+
readonly 23: "grid_teleporter.anm2";
|
|
27
|
+
readonly 24: "grid_rock.anm2";
|
|
28
|
+
readonly 25: "grid_rock.anm2";
|
|
29
|
+
readonly 26: "grid_rock.anm2";
|
|
30
|
+
readonly 27: "grid_rock.anm2";
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=gridEntityTypeToANM2Name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridEntityTypeToANM2Name.d.ts","sourceRoot":"","sources":["../../../src/objects/gridEntityTypeToANM2Name.ts"],"names":[],"mappings":"AAIA,qDAAqD;AACrD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BqB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
4
|
+
--- These files exist in the "gfx/grid" directory.
|
|
5
|
+
____exports.GRID_ENTITY_TYPE_TO_ANM2_NAME = {
|
|
6
|
+
[GridEntityType.NULL] = nil,
|
|
7
|
+
[GridEntityType.DECORATION] = "Props_01_Basement.anm2",
|
|
8
|
+
[GridEntityType.ROCK] = "grid_rock.anm2",
|
|
9
|
+
[GridEntityType.BLOCK] = "grid_rock.anm2",
|
|
10
|
+
[GridEntityType.ROCK_TINTED] = "grid_rock.anm2",
|
|
11
|
+
[GridEntityType.ROCK_BOMB] = "grid_rock.anm2",
|
|
12
|
+
[GridEntityType.ROCK_ALT] = "grid_rock.anm2",
|
|
13
|
+
[GridEntityType.PIT] = "grid_pit.anm2",
|
|
14
|
+
[GridEntityType.SPIKES] = "grid_spikes.anm2",
|
|
15
|
+
[GridEntityType.SPIKES_ON_OFF] = "grid_spikes.anm2",
|
|
16
|
+
[GridEntityType.SPIDER_WEB] = "grid_web.anm2",
|
|
17
|
+
[GridEntityType.LOCK] = "grid_locks.anm2",
|
|
18
|
+
[GridEntityType.TNT] = "grid_tnt.anm2",
|
|
19
|
+
[GridEntityType.FIREPLACE] = "grid_fireplace.anm2",
|
|
20
|
+
[GridEntityType.POOP] = "grid_poop.anm2",
|
|
21
|
+
[GridEntityType.WALL] = nil,
|
|
22
|
+
[GridEntityType.DOOR] = nil,
|
|
23
|
+
[GridEntityType.TRAPDOOR] = "Door_11_TrapDoor.anm2",
|
|
24
|
+
[GridEntityType.CRAWL_SPACE] = "door_20_secrettrapdoor.anm2",
|
|
25
|
+
[GridEntityType.GRAVITY] = nil,
|
|
26
|
+
[GridEntityType.PRESSURE_PLATE] = "grid_pressureplate.anm2",
|
|
27
|
+
[GridEntityType.STATUE] = nil,
|
|
28
|
+
[GridEntityType.ROCK_SUPER_SPECIAL] = "grid_rock.anm2",
|
|
29
|
+
[GridEntityType.TELEPORTER] = "grid_teleporter.anm2",
|
|
30
|
+
[GridEntityType.PILLAR] = "grid_rock.anm2",
|
|
31
|
+
[GridEntityType.ROCK_SPIKED] = "grid_rock.anm2",
|
|
32
|
+
[GridEntityType.ROCK_ALT_2] = "grid_rock.anm2",
|
|
33
|
+
[GridEntityType.ROCK_GOLD] = "grid_rock.anm2"
|
|
34
|
+
}
|
|
35
|
+
return ____exports
|