isaacscript-common 1.0.499 → 1.0.503
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/callbacks/postBombInitLate.lua +3 -17
- package/dist/callbacks/postEffectInitLate.lua +3 -17
- package/dist/callbacks/postFamiliarInitLate.lua +1 -15
- package/dist/callbacks/postKnifeInitLate.lua +3 -17
- package/dist/callbacks/postLaserInitLate.lua +3 -17
- package/dist/callbacks/postNPCInitLate.lua +3 -17
- package/dist/callbacks/postNewRoomEarly.d.ts +2 -0
- package/dist/callbacks/postNewRoomEarly.lua +50 -0
- package/dist/callbacks/postPickupInitLate.lua +3 -17
- package/dist/callbacks/postProjectileInitLate.lua +3 -17
- package/dist/callbacks/postTearInitLate.lua +3 -17
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +4 -0
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +18 -0
- package/dist/features/deployJSONRoom.lua +16 -16
- package/dist/features/getCollectibleItemPoolType.lua +1 -6
- package/dist/features/saveDataManager/main.lua +5 -3
- package/dist/functions/collectibles.d.ts +5 -5
- package/dist/functions/collectibles.lua +4 -0
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/gridEntity.d.ts +8 -2
- package/dist/functions/gridEntity.lua +16 -0
- package/dist/functions/input.d.ts +3 -5
- package/dist/functions/player.d.ts +5 -5
- package/dist/functions/revive.d.ts +2 -2
- package/dist/functions/rooms.d.ts +39 -18
- package/dist/functions/rooms.lua +60 -47
- package/dist/functions/util.d.ts +2 -2
- package/dist/functions/util.lua +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +8 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +3 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +12 -0
- package/dist/types/CallbackParametersCustom.d.ts +4 -0
- package/dist/types/ModCallbacksCustom.d.ts +34 -33
- package/dist/types/ModCallbacksCustom.lua +35 -33
- package/dist/types/ModUpgraded.lua +178 -321
- package/dist/upgradeMod.d.ts +2 -2
- package/dist/upgradeMod.lua +9 -6
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local getCallbackName
|
|
4
|
+
local getCallbackName, getCallbackRegisterFunction
|
|
5
5
|
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
6
6
|
local postBombInitLateRegister = ____postBombInitLate.postBombInitLateRegister
|
|
7
7
|
local ____postCursedTeleport = require("callbacks.subscriptions.postCursedTeleport")
|
|
@@ -36,6 +36,8 @@ local ____postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate
|
|
|
36
36
|
local postLaserInitLateRegister = ____postLaserInitLate.postLaserInitLateRegister
|
|
37
37
|
local ____postNewLevelReordered = require("callbacks.subscriptions.postNewLevelReordered")
|
|
38
38
|
local postNewLevelReorderedRegister = ____postNewLevelReordered.postNewLevelReorderedRegister
|
|
39
|
+
local ____postNewRoomEarly = require("callbacks.subscriptions.postNewRoomEarly")
|
|
40
|
+
local postNewRoomEarlyRegister = ____postNewRoomEarly.postNewRoomEarlyRegister
|
|
39
41
|
local ____postNewRoomReordered = require("callbacks.subscriptions.postNewRoomReordered")
|
|
40
42
|
local postNewRoomReorderedRegister = ____postNewRoomReordered.postNewRoomReorderedRegister
|
|
41
43
|
local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
@@ -98,450 +100,305 @@ function getCallbackName(self, callbackID)
|
|
|
98
100
|
end
|
|
99
101
|
return "MC_UNKNOWN"
|
|
100
102
|
end
|
|
101
|
-
|
|
102
|
-
local ModUpgraded = ____exports.ModUpgraded
|
|
103
|
-
ModUpgraded.name = "ModUpgraded"
|
|
104
|
-
function ModUpgraded.prototype.____constructor(self, mod, verbose)
|
|
105
|
-
self.Mod = mod
|
|
106
|
-
self.Verbose = verbose
|
|
107
|
-
self.Name = mod.Name
|
|
108
|
-
end
|
|
109
|
-
function ModUpgraded.prototype.AddCallback(self, callbackID, ...)
|
|
110
|
-
local args = {...}
|
|
111
|
-
if self.Verbose then
|
|
112
|
-
local callback = args[1]
|
|
113
|
-
local optionalArg = args[2]
|
|
114
|
-
local callbackName = getCallbackName(nil, callbackID)
|
|
115
|
-
local debugMsg = getDebugPrependString(nil, callbackName)
|
|
116
|
-
local function callbackWithLogger(____, ...)
|
|
117
|
-
Isaac.DebugString(debugMsg .. " - START")
|
|
118
|
-
local value = callback(nil, ...)
|
|
119
|
-
Isaac.DebugString((debugMsg .. " - END - ") .. tostring(value))
|
|
120
|
-
return value
|
|
121
|
-
end
|
|
122
|
-
self.Mod:AddCallback(callbackID, callbackWithLogger, optionalArg)
|
|
123
|
-
else
|
|
124
|
-
self.Mod:AddCallback(
|
|
125
|
-
callbackID,
|
|
126
|
-
__TS__Spread(args)
|
|
127
|
-
)
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
function ModUpgraded.prototype.HasData(self)
|
|
131
|
-
return self.Mod:HasData()
|
|
132
|
-
end
|
|
133
|
-
function ModUpgraded.prototype.LoadData(self)
|
|
134
|
-
return self.Mod:LoadData()
|
|
135
|
-
end
|
|
136
|
-
function ModUpgraded.prototype.RemoveCallback(self, callbackID, callback)
|
|
137
|
-
self.Mod:RemoveCallback(callbackID, callback)
|
|
138
|
-
end
|
|
139
|
-
function ModUpgraded.prototype.RemoveData(self)
|
|
140
|
-
self.Mod:RemoveData()
|
|
141
|
-
end
|
|
142
|
-
function ModUpgraded.prototype.SaveData(self, data)
|
|
143
|
-
self.Mod:SaveData(data)
|
|
144
|
-
end
|
|
145
|
-
function ModUpgraded.prototype.AddCallbackCustom(self, callbackID, ...)
|
|
146
|
-
local args = {...}
|
|
103
|
+
function getCallbackRegisterFunction(self, callbackID)
|
|
147
104
|
repeat
|
|
148
|
-
local
|
|
149
|
-
local
|
|
150
|
-
if
|
|
105
|
+
local ____switch17 = callbackID
|
|
106
|
+
local ____cond17 = ____switch17 == ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED
|
|
107
|
+
if ____cond17 then
|
|
151
108
|
do
|
|
152
|
-
postGameStartedReorderedRegister
|
|
153
|
-
nil,
|
|
154
|
-
table.unpack(args)
|
|
155
|
-
)
|
|
156
|
-
break
|
|
109
|
+
return postGameStartedReorderedRegister
|
|
157
110
|
end
|
|
158
111
|
end
|
|
159
|
-
|
|
160
|
-
if
|
|
112
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_LEVEL_REORDERED
|
|
113
|
+
if ____cond17 then
|
|
161
114
|
do
|
|
162
|
-
postNewLevelReorderedRegister
|
|
163
|
-
nil,
|
|
164
|
-
table.unpack(args)
|
|
165
|
-
)
|
|
166
|
-
break
|
|
115
|
+
return postNewLevelReorderedRegister
|
|
167
116
|
end
|
|
168
117
|
end
|
|
169
|
-
|
|
170
|
-
if
|
|
118
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_REORDERED
|
|
119
|
+
if ____cond17 then
|
|
171
120
|
do
|
|
172
|
-
postNewRoomReorderedRegister
|
|
173
|
-
nil,
|
|
174
|
-
table.unpack(args)
|
|
175
|
-
)
|
|
176
|
-
break
|
|
121
|
+
return postNewRoomReorderedRegister
|
|
177
122
|
end
|
|
178
123
|
end
|
|
179
|
-
|
|
180
|
-
if
|
|
124
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_REORDERED
|
|
125
|
+
if ____cond17 then
|
|
181
126
|
do
|
|
182
|
-
postPlayerInitReorderedRegister
|
|
183
|
-
nil,
|
|
184
|
-
table.unpack(args)
|
|
185
|
-
)
|
|
186
|
-
break
|
|
127
|
+
return postPlayerInitReorderedRegister
|
|
187
128
|
end
|
|
188
129
|
end
|
|
189
|
-
|
|
190
|
-
if
|
|
130
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_UPDATE_REORDERED
|
|
131
|
+
if ____cond17 then
|
|
191
132
|
do
|
|
192
|
-
postPlayerUpdateReorderedRegister
|
|
193
|
-
nil,
|
|
194
|
-
table.unpack(args)
|
|
195
|
-
)
|
|
196
|
-
break
|
|
133
|
+
return postPlayerUpdateReorderedRegister
|
|
197
134
|
end
|
|
198
135
|
end
|
|
199
|
-
|
|
200
|
-
if
|
|
136
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED
|
|
137
|
+
if ____cond17 then
|
|
201
138
|
do
|
|
202
|
-
postPlayerRenderReorderedRegister
|
|
203
|
-
nil,
|
|
204
|
-
table.unpack(args)
|
|
205
|
-
)
|
|
206
|
-
break
|
|
139
|
+
return postPlayerRenderReorderedRegister
|
|
207
140
|
end
|
|
208
141
|
end
|
|
209
|
-
|
|
210
|
-
if
|
|
142
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY
|
|
143
|
+
if ____cond17 then
|
|
211
144
|
do
|
|
212
|
-
|
|
213
|
-
nil,
|
|
214
|
-
table.unpack(args)
|
|
215
|
-
)
|
|
216
|
-
break
|
|
145
|
+
return postNewRoomEarlyRegister
|
|
217
146
|
end
|
|
218
147
|
end
|
|
219
|
-
|
|
220
|
-
if
|
|
148
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE
|
|
149
|
+
if ____cond17 then
|
|
221
150
|
do
|
|
222
|
-
|
|
223
|
-
nil,
|
|
224
|
-
table.unpack(args)
|
|
225
|
-
)
|
|
226
|
-
break
|
|
151
|
+
return postPlayerInitLateRegister
|
|
227
152
|
end
|
|
228
153
|
end
|
|
229
|
-
|
|
230
|
-
if
|
|
154
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_TEAR_INIT_LATE
|
|
155
|
+
if ____cond17 then
|
|
231
156
|
do
|
|
232
|
-
|
|
233
|
-
nil,
|
|
234
|
-
table.unpack(args)
|
|
235
|
-
)
|
|
236
|
-
break
|
|
157
|
+
return postTearInitLateRegister
|
|
237
158
|
end
|
|
238
159
|
end
|
|
239
|
-
|
|
240
|
-
if
|
|
160
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE
|
|
161
|
+
if ____cond17 then
|
|
241
162
|
do
|
|
242
|
-
|
|
243
|
-
nil,
|
|
244
|
-
table.unpack(args)
|
|
245
|
-
)
|
|
246
|
-
break
|
|
163
|
+
return postFamiliarInitLateRegister
|
|
247
164
|
end
|
|
248
165
|
end
|
|
249
|
-
|
|
250
|
-
if
|
|
166
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_BOMB_INIT_LATE
|
|
167
|
+
if ____cond17 then
|
|
251
168
|
do
|
|
252
|
-
|
|
253
|
-
nil,
|
|
254
|
-
table.unpack(args)
|
|
255
|
-
)
|
|
256
|
-
break
|
|
169
|
+
return postBombInitLateRegister
|
|
257
170
|
end
|
|
258
171
|
end
|
|
259
|
-
|
|
260
|
-
if
|
|
172
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE
|
|
173
|
+
if ____cond17 then
|
|
261
174
|
do
|
|
262
|
-
|
|
263
|
-
nil,
|
|
264
|
-
table.unpack(args)
|
|
265
|
-
)
|
|
266
|
-
break
|
|
175
|
+
return postPickupInitLateRegister
|
|
267
176
|
end
|
|
268
177
|
end
|
|
269
|
-
|
|
270
|
-
if
|
|
178
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_LASER_INIT_LATE
|
|
179
|
+
if ____cond17 then
|
|
271
180
|
do
|
|
272
|
-
|
|
273
|
-
nil,
|
|
274
|
-
table.unpack(args)
|
|
275
|
-
)
|
|
276
|
-
break
|
|
181
|
+
return postLaserInitLateRegister
|
|
277
182
|
end
|
|
278
183
|
end
|
|
279
|
-
|
|
280
|
-
if
|
|
184
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE
|
|
185
|
+
if ____cond17 then
|
|
281
186
|
do
|
|
282
|
-
|
|
283
|
-
nil,
|
|
284
|
-
table.unpack(args)
|
|
285
|
-
)
|
|
286
|
-
break
|
|
187
|
+
return postKnifeInitLateRegister
|
|
287
188
|
end
|
|
288
189
|
end
|
|
289
|
-
|
|
290
|
-
if
|
|
190
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE
|
|
191
|
+
if ____cond17 then
|
|
291
192
|
do
|
|
292
|
-
|
|
293
|
-
nil,
|
|
294
|
-
table.unpack(args)
|
|
295
|
-
)
|
|
296
|
-
break
|
|
193
|
+
return postProjectileInitLateRegister
|
|
297
194
|
end
|
|
298
195
|
end
|
|
299
|
-
|
|
300
|
-
if
|
|
196
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NPC_INIT_LATE
|
|
197
|
+
if ____cond17 then
|
|
301
198
|
do
|
|
302
|
-
|
|
303
|
-
nil,
|
|
304
|
-
table.unpack(args)
|
|
305
|
-
)
|
|
306
|
-
break
|
|
199
|
+
return postNPCInitLateRegister
|
|
307
200
|
end
|
|
308
201
|
end
|
|
309
|
-
|
|
310
|
-
if
|
|
202
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE
|
|
203
|
+
if ____cond17 then
|
|
311
204
|
do
|
|
312
|
-
|
|
313
|
-
nil,
|
|
314
|
-
table.unpack(args)
|
|
315
|
-
)
|
|
316
|
-
break
|
|
205
|
+
return postEffectInitLateRegister
|
|
317
206
|
end
|
|
318
207
|
end
|
|
319
|
-
|
|
320
|
-
if
|
|
208
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PICKUP_COLLECT
|
|
209
|
+
if ____cond17 then
|
|
321
210
|
do
|
|
322
|
-
|
|
323
|
-
nil,
|
|
324
|
-
table.unpack(args)
|
|
325
|
-
)
|
|
326
|
-
break
|
|
211
|
+
return postPickupCollectRegister
|
|
327
212
|
end
|
|
328
213
|
end
|
|
329
|
-
|
|
330
|
-
if
|
|
214
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_PRE_ITEM_PICKUP
|
|
215
|
+
if ____cond17 then
|
|
331
216
|
do
|
|
332
|
-
|
|
333
|
-
nil,
|
|
334
|
-
table.unpack(args)
|
|
335
|
-
)
|
|
336
|
-
break
|
|
217
|
+
return preItemPickupRegister
|
|
337
218
|
end
|
|
338
219
|
end
|
|
339
|
-
|
|
340
|
-
if
|
|
220
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_ITEM_PICKUP
|
|
221
|
+
if ____cond17 then
|
|
341
222
|
do
|
|
342
|
-
|
|
343
|
-
nil,
|
|
344
|
-
table.unpack(args)
|
|
345
|
-
)
|
|
346
|
-
break
|
|
223
|
+
return postItemPickupRegister
|
|
347
224
|
end
|
|
348
225
|
end
|
|
349
|
-
|
|
350
|
-
if
|
|
226
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE
|
|
227
|
+
if ____cond17 then
|
|
351
228
|
do
|
|
352
|
-
|
|
353
|
-
nil,
|
|
354
|
-
table.unpack(args)
|
|
355
|
-
)
|
|
356
|
-
break
|
|
229
|
+
return postPlayerChangeTypeRegister
|
|
357
230
|
end
|
|
358
231
|
end
|
|
359
|
-
|
|
360
|
-
if
|
|
232
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH
|
|
233
|
+
if ____cond17 then
|
|
361
234
|
do
|
|
362
|
-
|
|
363
|
-
nil,
|
|
364
|
-
table.unpack(args)
|
|
365
|
-
)
|
|
366
|
-
break
|
|
235
|
+
return postPlayerChangeHealthRegister
|
|
367
236
|
end
|
|
368
237
|
end
|
|
369
|
-
|
|
370
|
-
if
|
|
238
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE
|
|
239
|
+
if ____cond17 then
|
|
371
240
|
do
|
|
372
|
-
|
|
373
|
-
nil,
|
|
374
|
-
table.unpack(args)
|
|
375
|
-
)
|
|
376
|
-
break
|
|
241
|
+
return postPlayerFatalDamageRegister
|
|
377
242
|
end
|
|
378
243
|
end
|
|
379
|
-
|
|
380
|
-
if
|
|
244
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE
|
|
245
|
+
if ____cond17 then
|
|
381
246
|
do
|
|
382
|
-
|
|
383
|
-
nil,
|
|
384
|
-
table.unpack(args)
|
|
385
|
-
)
|
|
386
|
-
break
|
|
247
|
+
return preCustomReviveRegister
|
|
387
248
|
end
|
|
388
249
|
end
|
|
389
|
-
|
|
390
|
-
if
|
|
250
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_CUSTOM_REVIVE
|
|
251
|
+
if ____cond17 then
|
|
391
252
|
do
|
|
392
|
-
|
|
393
|
-
nil,
|
|
394
|
-
table.unpack(args)
|
|
395
|
-
)
|
|
396
|
-
break
|
|
253
|
+
return postCustomReviveRegister
|
|
397
254
|
end
|
|
398
255
|
end
|
|
399
|
-
|
|
400
|
-
if
|
|
256
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FLIP
|
|
257
|
+
if ____cond17 then
|
|
401
258
|
do
|
|
402
|
-
|
|
403
|
-
nil,
|
|
404
|
-
table.unpack(args)
|
|
405
|
-
)
|
|
406
|
-
break
|
|
259
|
+
return postFlipRegister
|
|
407
260
|
end
|
|
408
261
|
end
|
|
409
|
-
|
|
410
|
-
if
|
|
262
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FIRST_FLIP
|
|
263
|
+
if ____cond17 then
|
|
411
264
|
do
|
|
412
|
-
|
|
413
|
-
nil,
|
|
414
|
-
table.unpack(args)
|
|
415
|
-
)
|
|
416
|
-
break
|
|
265
|
+
return postFirstFlipRegister
|
|
417
266
|
end
|
|
418
267
|
end
|
|
419
|
-
|
|
420
|
-
if
|
|
268
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_ESAU_JR
|
|
269
|
+
if ____cond17 then
|
|
421
270
|
do
|
|
422
|
-
|
|
423
|
-
nil,
|
|
424
|
-
table.unpack(args)
|
|
425
|
-
)
|
|
426
|
-
break
|
|
271
|
+
return postEsauJrRegister
|
|
427
272
|
end
|
|
428
273
|
end
|
|
429
|
-
|
|
430
|
-
if
|
|
274
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FIRST_ESAU_JR
|
|
275
|
+
if ____cond17 then
|
|
431
276
|
do
|
|
432
|
-
|
|
433
|
-
nil,
|
|
434
|
-
table.unpack(args)
|
|
435
|
-
)
|
|
436
|
-
break
|
|
277
|
+
return postFirstEsauJrRegister
|
|
437
278
|
end
|
|
438
279
|
end
|
|
439
|
-
|
|
440
|
-
if
|
|
280
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_TRANSFORMATION
|
|
281
|
+
if ____cond17 then
|
|
441
282
|
do
|
|
442
|
-
|
|
443
|
-
nil,
|
|
444
|
-
table.unpack(args)
|
|
445
|
-
)
|
|
446
|
-
break
|
|
283
|
+
return postTransformationRegister
|
|
447
284
|
end
|
|
448
285
|
end
|
|
449
|
-
|
|
450
|
-
if
|
|
286
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PURCHASE
|
|
287
|
+
if ____cond17 then
|
|
451
288
|
do
|
|
452
|
-
|
|
453
|
-
nil,
|
|
454
|
-
table.unpack(args)
|
|
455
|
-
)
|
|
456
|
-
break
|
|
289
|
+
return postPurchaseRegister
|
|
457
290
|
end
|
|
458
291
|
end
|
|
459
|
-
|
|
460
|
-
if
|
|
292
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SACRIFICE
|
|
293
|
+
if ____cond17 then
|
|
461
294
|
do
|
|
462
|
-
|
|
463
|
-
nil,
|
|
464
|
-
table.unpack(args)
|
|
465
|
-
)
|
|
466
|
-
break
|
|
295
|
+
return postSacrificeRegister
|
|
467
296
|
end
|
|
468
297
|
end
|
|
469
|
-
|
|
470
|
-
if
|
|
298
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_CURSED_TELEPORT
|
|
299
|
+
if ____cond17 then
|
|
471
300
|
do
|
|
472
|
-
|
|
473
|
-
nil,
|
|
474
|
-
table.unpack(args)
|
|
475
|
-
)
|
|
476
|
-
break
|
|
301
|
+
return postCursedTeleportRegister
|
|
477
302
|
end
|
|
478
303
|
end
|
|
479
|
-
|
|
480
|
-
if
|
|
304
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_INIT
|
|
305
|
+
if ____cond17 then
|
|
481
306
|
do
|
|
482
|
-
|
|
483
|
-
nil,
|
|
484
|
-
table.unpack(args)
|
|
485
|
-
)
|
|
486
|
-
break
|
|
307
|
+
return postSlotInitRegister
|
|
487
308
|
end
|
|
488
309
|
end
|
|
489
|
-
|
|
490
|
-
if
|
|
310
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_UPDATE
|
|
311
|
+
if ____cond17 then
|
|
491
312
|
do
|
|
492
|
-
|
|
493
|
-
nil,
|
|
494
|
-
table.unpack(args)
|
|
495
|
-
)
|
|
496
|
-
break
|
|
313
|
+
return postSlotUpdateRegister
|
|
497
314
|
end
|
|
498
315
|
end
|
|
499
|
-
|
|
500
|
-
if
|
|
316
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_RENDER
|
|
317
|
+
if ____cond17 then
|
|
501
318
|
do
|
|
502
|
-
|
|
503
|
-
nil,
|
|
504
|
-
table.unpack(args)
|
|
505
|
-
)
|
|
506
|
-
break
|
|
319
|
+
return postSlotRenderRegister
|
|
507
320
|
end
|
|
508
321
|
end
|
|
509
|
-
|
|
510
|
-
if
|
|
322
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_DESTROYED
|
|
323
|
+
if ____cond17 then
|
|
511
324
|
do
|
|
512
|
-
|
|
513
|
-
nil,
|
|
514
|
-
table.unpack(args)
|
|
515
|
-
)
|
|
516
|
-
break
|
|
325
|
+
return postSlotDestroyedRegister
|
|
517
326
|
end
|
|
518
327
|
end
|
|
519
|
-
|
|
520
|
-
if
|
|
328
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT
|
|
329
|
+
if ____cond17 then
|
|
521
330
|
do
|
|
522
|
-
|
|
523
|
-
nil,
|
|
524
|
-
table.unpack(args)
|
|
525
|
-
)
|
|
526
|
-
break
|
|
331
|
+
return postGridEntityInitRegister
|
|
527
332
|
end
|
|
528
333
|
end
|
|
529
|
-
|
|
530
|
-
if
|
|
334
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE
|
|
335
|
+
if ____cond17 then
|
|
531
336
|
do
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
337
|
+
return postGridEntityUpdateRegister
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE
|
|
341
|
+
if ____cond17 then
|
|
342
|
+
do
|
|
343
|
+
return postGridEntityRemoveRegister
|
|
537
344
|
end
|
|
538
345
|
end
|
|
539
346
|
do
|
|
540
347
|
do
|
|
541
348
|
ensureAllCases(nil, callbackID)
|
|
542
349
|
error(("The custom callback ID of \"" .. tostring(callbackID)) .. "\" is not valid.")
|
|
350
|
+
return function()
|
|
351
|
+
end
|
|
543
352
|
end
|
|
544
353
|
end
|
|
545
354
|
until true
|
|
546
355
|
end
|
|
356
|
+
____exports.ModUpgraded = __TS__Class()
|
|
357
|
+
local ModUpgraded = ____exports.ModUpgraded
|
|
358
|
+
ModUpgraded.name = "ModUpgraded"
|
|
359
|
+
function ModUpgraded.prototype.____constructor(self, mod, verbose)
|
|
360
|
+
self.Mod = mod
|
|
361
|
+
self.Verbose = verbose
|
|
362
|
+
self.Name = mod.Name
|
|
363
|
+
end
|
|
364
|
+
function ModUpgraded.prototype.AddCallback(self, callbackID, ...)
|
|
365
|
+
local args = {...}
|
|
366
|
+
if self.Verbose then
|
|
367
|
+
local callback = args[1]
|
|
368
|
+
local optionalArg = args[2]
|
|
369
|
+
local callbackName = getCallbackName(nil, callbackID)
|
|
370
|
+
local debugMsg = getDebugPrependString(nil, callbackName)
|
|
371
|
+
local function callbackWithLogger(____, ...)
|
|
372
|
+
Isaac.DebugString(debugMsg .. " - START")
|
|
373
|
+
local value = callback(nil, ...)
|
|
374
|
+
Isaac.DebugString((debugMsg .. " - END - ") .. tostring(value))
|
|
375
|
+
return value
|
|
376
|
+
end
|
|
377
|
+
self.Mod:AddCallback(callbackID, callbackWithLogger, optionalArg)
|
|
378
|
+
else
|
|
379
|
+
self.Mod:AddCallback(
|
|
380
|
+
callbackID,
|
|
381
|
+
__TS__Spread(args)
|
|
382
|
+
)
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
function ModUpgraded.prototype.HasData(self)
|
|
386
|
+
return self.Mod:HasData()
|
|
387
|
+
end
|
|
388
|
+
function ModUpgraded.prototype.LoadData(self)
|
|
389
|
+
return self.Mod:LoadData()
|
|
390
|
+
end
|
|
391
|
+
function ModUpgraded.prototype.RemoveCallback(self, callbackID, callback)
|
|
392
|
+
self.Mod:RemoveCallback(callbackID, callback)
|
|
393
|
+
end
|
|
394
|
+
function ModUpgraded.prototype.RemoveData(self)
|
|
395
|
+
self.Mod:RemoveData()
|
|
396
|
+
end
|
|
397
|
+
function ModUpgraded.prototype.SaveData(self, data)
|
|
398
|
+
self.Mod:SaveData(data)
|
|
399
|
+
end
|
|
400
|
+
function ModUpgraded.prototype.AddCallbackCustom(self, callbackID, ...)
|
|
401
|
+
local callbackRegisterFunction = getCallbackRegisterFunction(nil, callbackID)
|
|
402
|
+
callbackRegisterFunction(nil, ...)
|
|
403
|
+
end
|
|
547
404
|
return ____exports
|
package/dist/upgradeMod.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ import { ModUpgraded } from "./types/ModUpgraded";
|
|
|
18
18
|
* For a list of all custom callbacks, check out the
|
|
19
19
|
* [Function Signatures](https://isaacscript.github.io/docs/function-signatures#custom-callbacks).
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
21
|
+
* @param modVanilla The mod object returned by the `RegisterMod()` function.
|
|
22
22
|
* @param verbose Enables verbose logging for the purposes of crash troubleshooting.
|
|
23
23
|
* Defaults to false.
|
|
24
24
|
* @returns The upgraded mod object.
|
|
25
25
|
* @category Custom Callbacks
|
|
26
26
|
*/
|
|
27
|
-
export declare function upgradeMod(
|
|
27
|
+
export declare function upgradeMod(modVanilla: Mod, verbose?: boolean): ModUpgraded;
|