isaacscript-common 1.0.498 → 1.0.502
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/customRevive.lua +9 -5
- package/dist/callbacks/itemPickup.lua +9 -5
- package/dist/callbacks/postBombInitLate.lua +8 -20
- package/dist/callbacks/postCursedTeleport.lua +5 -3
- package/dist/callbacks/postEffectInitLate.lua +8 -20
- package/dist/callbacks/postEsauJr.lua +9 -5
- package/dist/callbacks/postFamiliarInitLate.lua +6 -18
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGridEntity.lua +13 -7
- package/dist/callbacks/postKnifeInitLate.lua +8 -20
- package/dist/callbacks/postLaserInitLate.lua +8 -20
- package/dist/callbacks/postNPCInitLate.lua +8 -20
- package/dist/callbacks/postNewRoomEarly.d.ts +2 -0
- package/dist/callbacks/postNewRoomEarly.lua +43 -0
- package/dist/callbacks/postPickupCollect.lua +5 -3
- package/dist/callbacks/postPickupInitLate.lua +8 -20
- package/dist/callbacks/postPlayerChangeHealth.lua +5 -3
- package/dist/callbacks/postPlayerChangeType.lua +5 -3
- package/dist/callbacks/postPlayerFatalDamage.lua +5 -3
- package/dist/callbacks/postPlayerInitLate.lua +5 -3
- package/dist/callbacks/postPlayerReordered.lua +16 -10
- package/dist/callbacks/postProjectileInitLate.lua +8 -20
- package/dist/callbacks/postPurchase.lua +11 -3
- package/dist/callbacks/postSacrifice.lua +5 -3
- package/dist/callbacks/postSlotInitUpdate.lua +9 -5
- package/dist/callbacks/postSlotRenderBroken.lua +9 -5
- package/dist/callbacks/postTearInitLate.lua +8 -20
- package/dist/callbacks/postTransformation.lua +5 -3
- package/dist/callbacks/reorderedCallbacks.lua +18 -12
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postFlip.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +4 -0
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +18 -0
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPurchase.lua +3 -3
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSacrifice.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.d.ts +3 -3
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.lua +3 -3
- package/dist/constants.d.ts +18 -8
- package/dist/constants.lua +10 -8
- package/dist/features/deployJSONRoom.lua +16 -16
- package/dist/features/getCollectibleItemPoolType.lua +6 -28
- package/dist/features/saveDataManager/main.lua +5 -3
- package/dist/functions/collectibles.d.ts +23 -4
- package/dist/functions/collectibles.lua +22 -4
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/gridEntity.d.ts +10 -5
- package/dist/functions/gridEntity.lua +19 -1
- 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 +40 -20
- package/dist/functions/rooms.lua +63 -52
- package/dist/functions/sprite.d.ts +11 -0
- package/dist/functions/sprite.lua +9 -0
- package/dist/functions/util.d.ts +2 -2
- package/dist/functions/util.lua +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.lua +1 -1
- 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 +256 -243
- package/dist/upgradeMod.d.ts +2 -2
- package/dist/upgradeMod.lua +9 -6
- package/package.json +2 -2
|
@@ -1,46 +1,87 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local getCallbackName
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local
|
|
18
|
-
local
|
|
19
|
-
local
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local
|
|
25
|
-
local
|
|
26
|
-
local
|
|
27
|
-
local
|
|
28
|
-
local
|
|
29
|
-
local
|
|
30
|
-
local
|
|
31
|
-
local
|
|
32
|
-
local
|
|
33
|
-
local
|
|
34
|
-
local
|
|
35
|
-
local
|
|
36
|
-
local
|
|
37
|
-
local
|
|
38
|
-
local
|
|
39
|
-
local
|
|
40
|
-
local
|
|
41
|
-
local
|
|
42
|
-
local
|
|
43
|
-
local
|
|
4
|
+
local getCallbackName, getCallbackRegisterFunction
|
|
5
|
+
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
6
|
+
local postBombInitLateRegister = ____postBombInitLate.postBombInitLateRegister
|
|
7
|
+
local ____postCursedTeleport = require("callbacks.subscriptions.postCursedTeleport")
|
|
8
|
+
local postCursedTeleportRegister = ____postCursedTeleport.postCursedTeleportRegister
|
|
9
|
+
local ____postCustomRevive = require("callbacks.subscriptions.postCustomRevive")
|
|
10
|
+
local postCustomReviveRegister = ____postCustomRevive.postCustomReviveRegister
|
|
11
|
+
local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
12
|
+
local postEffectInitLateRegister = ____postEffectInitLate.postEffectInitLateRegister
|
|
13
|
+
local ____postEsauJr = require("callbacks.subscriptions.postEsauJr")
|
|
14
|
+
local postEsauJrRegister = ____postEsauJr.postEsauJrRegister
|
|
15
|
+
local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
16
|
+
local postFamiliarInitLateRegister = ____postFamiliarInitLate.postFamiliarInitLateRegister
|
|
17
|
+
local ____postFirstEsauJr = require("callbacks.subscriptions.postFirstEsauJr")
|
|
18
|
+
local postFirstEsauJrRegister = ____postFirstEsauJr.postFirstEsauJrRegister
|
|
19
|
+
local ____postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
|
|
20
|
+
local postFirstFlipRegister = ____postFirstFlip.postFirstFlipRegister
|
|
21
|
+
local ____postFlip = require("callbacks.subscriptions.postFlip")
|
|
22
|
+
local postFlipRegister = ____postFlip.postFlipRegister
|
|
23
|
+
local ____postGameStartedReordered = require("callbacks.subscriptions.postGameStartedReordered")
|
|
24
|
+
local postGameStartedReorderedRegister = ____postGameStartedReordered.postGameStartedReorderedRegister
|
|
25
|
+
local ____postGridEntityInit = require("callbacks.subscriptions.postGridEntityInit")
|
|
26
|
+
local postGridEntityInitRegister = ____postGridEntityInit.postGridEntityInitRegister
|
|
27
|
+
local ____postGridEntityRemove = require("callbacks.subscriptions.postGridEntityRemove")
|
|
28
|
+
local postGridEntityRemoveRegister = ____postGridEntityRemove.postGridEntityRemoveRegister
|
|
29
|
+
local ____postGridEntityUpdate = require("callbacks.subscriptions.postGridEntityUpdate")
|
|
30
|
+
local postGridEntityUpdateRegister = ____postGridEntityUpdate.postGridEntityUpdateRegister
|
|
31
|
+
local ____postItemPickup = require("callbacks.subscriptions.postItemPickup")
|
|
32
|
+
local postItemPickupRegister = ____postItemPickup.postItemPickupRegister
|
|
33
|
+
local ____postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
|
|
34
|
+
local postKnifeInitLateRegister = ____postKnifeInitLate.postKnifeInitLateRegister
|
|
35
|
+
local ____postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate")
|
|
36
|
+
local postLaserInitLateRegister = ____postLaserInitLate.postLaserInitLateRegister
|
|
37
|
+
local ____postNewLevelReordered = require("callbacks.subscriptions.postNewLevelReordered")
|
|
38
|
+
local postNewLevelReorderedRegister = ____postNewLevelReordered.postNewLevelReorderedRegister
|
|
39
|
+
local ____postNewRoomEarly = require("callbacks.subscriptions.postNewRoomEarly")
|
|
40
|
+
local postNewRoomEarlyRegister = ____postNewRoomEarly.postNewRoomEarlyRegister
|
|
41
|
+
local ____postNewRoomReordered = require("callbacks.subscriptions.postNewRoomReordered")
|
|
42
|
+
local postNewRoomReorderedRegister = ____postNewRoomReordered.postNewRoomReorderedRegister
|
|
43
|
+
local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
44
|
+
local postNPCInitLateRegister = ____postNPCInitLate.postNPCInitLateRegister
|
|
45
|
+
local ____postPickupCollect = require("callbacks.subscriptions.postPickupCollect")
|
|
46
|
+
local postPickupCollectRegister = ____postPickupCollect.postPickupCollectRegister
|
|
47
|
+
local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
48
|
+
local postPickupInitLateRegister = ____postPickupInitLate.postPickupInitLateRegister
|
|
49
|
+
local ____postPlayerChangeHealth = require("callbacks.subscriptions.postPlayerChangeHealth")
|
|
50
|
+
local postPlayerChangeHealthRegister = ____postPlayerChangeHealth.postPlayerChangeHealthRegister
|
|
51
|
+
local ____postPlayerChangeType = require("callbacks.subscriptions.postPlayerChangeType")
|
|
52
|
+
local postPlayerChangeTypeRegister = ____postPlayerChangeType.postPlayerChangeTypeRegister
|
|
53
|
+
local ____postPlayerFatalDamage = require("callbacks.subscriptions.postPlayerFatalDamage")
|
|
54
|
+
local postPlayerFatalDamageRegister = ____postPlayerFatalDamage.postPlayerFatalDamageRegister
|
|
55
|
+
local ____postPlayerInitLate = require("callbacks.subscriptions.postPlayerInitLate")
|
|
56
|
+
local postPlayerInitLateRegister = ____postPlayerInitLate.postPlayerInitLateRegister
|
|
57
|
+
local ____postPlayerInitReordered = require("callbacks.subscriptions.postPlayerInitReordered")
|
|
58
|
+
local postPlayerInitReorderedRegister = ____postPlayerInitReordered.postPlayerInitReorderedRegister
|
|
59
|
+
local ____postPlayerRenderReordered = require("callbacks.subscriptions.postPlayerRenderReordered")
|
|
60
|
+
local postPlayerRenderReorderedRegister = ____postPlayerRenderReordered.postPlayerRenderReorderedRegister
|
|
61
|
+
local ____postPlayerUpdateReordered = require("callbacks.subscriptions.postPlayerUpdateReordered")
|
|
62
|
+
local postPlayerUpdateReorderedRegister = ____postPlayerUpdateReordered.postPlayerUpdateReorderedRegister
|
|
63
|
+
local ____postProjectileInitLate = require("callbacks.subscriptions.postProjectileInitLate")
|
|
64
|
+
local postProjectileInitLateRegister = ____postProjectileInitLate.postProjectileInitLateRegister
|
|
65
|
+
local ____postPurchase = require("callbacks.subscriptions.postPurchase")
|
|
66
|
+
local postPurchaseRegister = ____postPurchase.postPurchaseRegister
|
|
67
|
+
local ____postSacrifice = require("callbacks.subscriptions.postSacrifice")
|
|
68
|
+
local postSacrificeRegister = ____postSacrifice.postSacrificeRegister
|
|
69
|
+
local ____postSlotDestroyed = require("callbacks.subscriptions.postSlotDestroyed")
|
|
70
|
+
local postSlotDestroyedRegister = ____postSlotDestroyed.postSlotDestroyedRegister
|
|
71
|
+
local ____postSlotInit = require("callbacks.subscriptions.postSlotInit")
|
|
72
|
+
local postSlotInitRegister = ____postSlotInit.postSlotInitRegister
|
|
73
|
+
local ____postSlotRender = require("callbacks.subscriptions.postSlotRender")
|
|
74
|
+
local postSlotRenderRegister = ____postSlotRender.postSlotRenderRegister
|
|
75
|
+
local ____postSlotUpdate = require("callbacks.subscriptions.postSlotUpdate")
|
|
76
|
+
local postSlotUpdateRegister = ____postSlotUpdate.postSlotUpdateRegister
|
|
77
|
+
local ____postTearInitLate = require("callbacks.subscriptions.postTearInitLate")
|
|
78
|
+
local postTearInitLateRegister = ____postTearInitLate.postTearInitLateRegister
|
|
79
|
+
local ____postTransformation = require("callbacks.subscriptions.postTransformation")
|
|
80
|
+
local postTransformationRegister = ____postTransformation.postTransformationRegister
|
|
81
|
+
local ____preCustomRevive = require("callbacks.subscriptions.preCustomRevive")
|
|
82
|
+
local preCustomReviveRegister = ____preCustomRevive.preCustomReviveRegister
|
|
83
|
+
local ____preItemPickup = require("callbacks.subscriptions.preItemPickup")
|
|
84
|
+
local preItemPickupRegister = ____preItemPickup.preItemPickupRegister
|
|
44
85
|
local ____log = require("functions.log")
|
|
45
86
|
local getDebugPrependString = ____log.getDebugPrependString
|
|
46
87
|
local ____util = require("functions.util")
|
|
@@ -59,333 +100,305 @@ function getCallbackName(self, callbackID)
|
|
|
59
100
|
end
|
|
60
101
|
return "MC_UNKNOWN"
|
|
61
102
|
end
|
|
62
|
-
|
|
63
|
-
local ModUpgraded = ____exports.ModUpgraded
|
|
64
|
-
ModUpgraded.name = "ModUpgraded"
|
|
65
|
-
function ModUpgraded.prototype.____constructor(self, mod, verbose)
|
|
66
|
-
self.Mod = mod
|
|
67
|
-
self.Verbose = verbose
|
|
68
|
-
self.Name = mod.Name
|
|
69
|
-
end
|
|
70
|
-
function ModUpgraded.prototype.AddCallback(self, callbackID, ...)
|
|
71
|
-
local args = {...}
|
|
72
|
-
if self.Verbose then
|
|
73
|
-
local callback = args[1]
|
|
74
|
-
local optionalArg = args[2]
|
|
75
|
-
local callbackName = getCallbackName(nil, callbackID)
|
|
76
|
-
local debugMsg = getDebugPrependString(nil, callbackName)
|
|
77
|
-
local function callbackWithLogger(____, ...)
|
|
78
|
-
Isaac.DebugString(debugMsg .. " - START")
|
|
79
|
-
local value = callback(nil, ...)
|
|
80
|
-
Isaac.DebugString((debugMsg .. " - END - ") .. tostring(value))
|
|
81
|
-
return value
|
|
82
|
-
end
|
|
83
|
-
self.Mod:AddCallback(callbackID, callbackWithLogger, optionalArg)
|
|
84
|
-
else
|
|
85
|
-
self.Mod:AddCallback(
|
|
86
|
-
callbackID,
|
|
87
|
-
__TS__Spread(args)
|
|
88
|
-
)
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
function ModUpgraded.prototype.HasData(self)
|
|
92
|
-
return self.Mod:HasData()
|
|
93
|
-
end
|
|
94
|
-
function ModUpgraded.prototype.LoadData(self)
|
|
95
|
-
return self.Mod:LoadData()
|
|
96
|
-
end
|
|
97
|
-
function ModUpgraded.prototype.RemoveCallback(self, callbackID, callback)
|
|
98
|
-
self.Mod:RemoveCallback(callbackID, callback)
|
|
99
|
-
end
|
|
100
|
-
function ModUpgraded.prototype.RemoveData(self)
|
|
101
|
-
self.Mod:RemoveData()
|
|
102
|
-
end
|
|
103
|
-
function ModUpgraded.prototype.SaveData(self, data)
|
|
104
|
-
self.Mod:SaveData(data)
|
|
105
|
-
end
|
|
106
|
-
function ModUpgraded.prototype.AddCallbackCustom(self, callbackID, ...)
|
|
107
|
-
local args = {...}
|
|
103
|
+
function getCallbackRegisterFunction(self, callbackID)
|
|
108
104
|
repeat
|
|
109
|
-
local
|
|
110
|
-
local
|
|
111
|
-
if
|
|
105
|
+
local ____switch17 = callbackID
|
|
106
|
+
local ____cond17 = ____switch17 == ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED
|
|
107
|
+
if ____cond17 then
|
|
112
108
|
do
|
|
113
|
-
|
|
114
|
-
break
|
|
109
|
+
return postGameStartedReorderedRegister
|
|
115
110
|
end
|
|
116
111
|
end
|
|
117
|
-
|
|
118
|
-
if
|
|
112
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_LEVEL_REORDERED
|
|
113
|
+
if ____cond17 then
|
|
119
114
|
do
|
|
120
|
-
|
|
121
|
-
break
|
|
115
|
+
return postNewLevelReorderedRegister
|
|
122
116
|
end
|
|
123
117
|
end
|
|
124
|
-
|
|
125
|
-
if
|
|
118
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_REORDERED
|
|
119
|
+
if ____cond17 then
|
|
126
120
|
do
|
|
127
|
-
|
|
128
|
-
break
|
|
121
|
+
return postNewRoomReorderedRegister
|
|
129
122
|
end
|
|
130
123
|
end
|
|
131
|
-
|
|
132
|
-
if
|
|
124
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_REORDERED
|
|
125
|
+
if ____cond17 then
|
|
133
126
|
do
|
|
134
|
-
|
|
135
|
-
break
|
|
127
|
+
return postPlayerInitReorderedRegister
|
|
136
128
|
end
|
|
137
129
|
end
|
|
138
|
-
|
|
139
|
-
if
|
|
130
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_UPDATE_REORDERED
|
|
131
|
+
if ____cond17 then
|
|
140
132
|
do
|
|
141
|
-
|
|
142
|
-
break
|
|
133
|
+
return postPlayerUpdateReorderedRegister
|
|
143
134
|
end
|
|
144
135
|
end
|
|
145
|
-
|
|
146
|
-
if
|
|
136
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED
|
|
137
|
+
if ____cond17 then
|
|
147
138
|
do
|
|
148
|
-
|
|
149
|
-
break
|
|
139
|
+
return postPlayerRenderReorderedRegister
|
|
150
140
|
end
|
|
151
141
|
end
|
|
152
|
-
|
|
153
|
-
if
|
|
142
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY
|
|
143
|
+
if ____cond17 then
|
|
154
144
|
do
|
|
155
|
-
|
|
156
|
-
break
|
|
145
|
+
return postNewRoomEarlyRegister
|
|
157
146
|
end
|
|
158
147
|
end
|
|
159
|
-
|
|
160
|
-
if
|
|
148
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE
|
|
149
|
+
if ____cond17 then
|
|
161
150
|
do
|
|
162
|
-
|
|
163
|
-
break
|
|
151
|
+
return postPlayerInitLateRegister
|
|
164
152
|
end
|
|
165
153
|
end
|
|
166
|
-
|
|
167
|
-
if
|
|
154
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_TEAR_INIT_LATE
|
|
155
|
+
if ____cond17 then
|
|
168
156
|
do
|
|
169
|
-
|
|
170
|
-
break
|
|
157
|
+
return postTearInitLateRegister
|
|
171
158
|
end
|
|
172
159
|
end
|
|
173
|
-
|
|
174
|
-
if
|
|
160
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE
|
|
161
|
+
if ____cond17 then
|
|
175
162
|
do
|
|
176
|
-
|
|
177
|
-
break
|
|
163
|
+
return postFamiliarInitLateRegister
|
|
178
164
|
end
|
|
179
165
|
end
|
|
180
|
-
|
|
181
|
-
if
|
|
166
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_BOMB_INIT_LATE
|
|
167
|
+
if ____cond17 then
|
|
182
168
|
do
|
|
183
|
-
|
|
184
|
-
break
|
|
169
|
+
return postBombInitLateRegister
|
|
185
170
|
end
|
|
186
171
|
end
|
|
187
|
-
|
|
188
|
-
if
|
|
172
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE
|
|
173
|
+
if ____cond17 then
|
|
189
174
|
do
|
|
190
|
-
|
|
191
|
-
break
|
|
175
|
+
return postPickupInitLateRegister
|
|
192
176
|
end
|
|
193
177
|
end
|
|
194
|
-
|
|
195
|
-
if
|
|
178
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_LASER_INIT_LATE
|
|
179
|
+
if ____cond17 then
|
|
196
180
|
do
|
|
197
|
-
|
|
198
|
-
break
|
|
181
|
+
return postLaserInitLateRegister
|
|
199
182
|
end
|
|
200
183
|
end
|
|
201
|
-
|
|
202
|
-
if
|
|
184
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE
|
|
185
|
+
if ____cond17 then
|
|
203
186
|
do
|
|
204
|
-
|
|
205
|
-
break
|
|
187
|
+
return postKnifeInitLateRegister
|
|
206
188
|
end
|
|
207
189
|
end
|
|
208
|
-
|
|
209
|
-
if
|
|
190
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE
|
|
191
|
+
if ____cond17 then
|
|
210
192
|
do
|
|
211
|
-
|
|
212
|
-
break
|
|
193
|
+
return postProjectileInitLateRegister
|
|
213
194
|
end
|
|
214
195
|
end
|
|
215
|
-
|
|
216
|
-
if
|
|
196
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_NPC_INIT_LATE
|
|
197
|
+
if ____cond17 then
|
|
217
198
|
do
|
|
218
|
-
|
|
219
|
-
break
|
|
199
|
+
return postNPCInitLateRegister
|
|
220
200
|
end
|
|
221
201
|
end
|
|
222
|
-
|
|
223
|
-
if
|
|
202
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE
|
|
203
|
+
if ____cond17 then
|
|
224
204
|
do
|
|
225
|
-
|
|
226
|
-
break
|
|
205
|
+
return postEffectInitLateRegister
|
|
227
206
|
end
|
|
228
207
|
end
|
|
229
|
-
|
|
230
|
-
if
|
|
208
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PICKUP_COLLECT
|
|
209
|
+
if ____cond17 then
|
|
231
210
|
do
|
|
232
|
-
|
|
233
|
-
break
|
|
211
|
+
return postPickupCollectRegister
|
|
234
212
|
end
|
|
235
213
|
end
|
|
236
|
-
|
|
237
|
-
if
|
|
214
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_PRE_ITEM_PICKUP
|
|
215
|
+
if ____cond17 then
|
|
238
216
|
do
|
|
239
|
-
|
|
240
|
-
break
|
|
217
|
+
return preItemPickupRegister
|
|
241
218
|
end
|
|
242
219
|
end
|
|
243
|
-
|
|
244
|
-
if
|
|
220
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_ITEM_PICKUP
|
|
221
|
+
if ____cond17 then
|
|
245
222
|
do
|
|
246
|
-
|
|
247
|
-
break
|
|
223
|
+
return postItemPickupRegister
|
|
248
224
|
end
|
|
249
225
|
end
|
|
250
|
-
|
|
251
|
-
if
|
|
226
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE
|
|
227
|
+
if ____cond17 then
|
|
252
228
|
do
|
|
253
|
-
|
|
254
|
-
break
|
|
229
|
+
return postPlayerChangeTypeRegister
|
|
255
230
|
end
|
|
256
231
|
end
|
|
257
|
-
|
|
258
|
-
if
|
|
232
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH
|
|
233
|
+
if ____cond17 then
|
|
259
234
|
do
|
|
260
|
-
|
|
261
|
-
break
|
|
235
|
+
return postPlayerChangeHealthRegister
|
|
262
236
|
end
|
|
263
237
|
end
|
|
264
|
-
|
|
265
|
-
if
|
|
238
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE
|
|
239
|
+
if ____cond17 then
|
|
266
240
|
do
|
|
267
|
-
|
|
268
|
-
break
|
|
241
|
+
return postPlayerFatalDamageRegister
|
|
269
242
|
end
|
|
270
243
|
end
|
|
271
|
-
|
|
272
|
-
if
|
|
244
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE
|
|
245
|
+
if ____cond17 then
|
|
273
246
|
do
|
|
274
|
-
|
|
275
|
-
break
|
|
247
|
+
return preCustomReviveRegister
|
|
276
248
|
end
|
|
277
249
|
end
|
|
278
|
-
|
|
279
|
-
if
|
|
250
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_CUSTOM_REVIVE
|
|
251
|
+
if ____cond17 then
|
|
280
252
|
do
|
|
281
|
-
|
|
282
|
-
break
|
|
253
|
+
return postCustomReviveRegister
|
|
283
254
|
end
|
|
284
255
|
end
|
|
285
|
-
|
|
286
|
-
if
|
|
256
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FLIP
|
|
257
|
+
if ____cond17 then
|
|
287
258
|
do
|
|
288
|
-
|
|
289
|
-
break
|
|
259
|
+
return postFlipRegister
|
|
290
260
|
end
|
|
291
261
|
end
|
|
292
|
-
|
|
293
|
-
if
|
|
262
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FIRST_FLIP
|
|
263
|
+
if ____cond17 then
|
|
294
264
|
do
|
|
295
|
-
|
|
296
|
-
break
|
|
265
|
+
return postFirstFlipRegister
|
|
297
266
|
end
|
|
298
267
|
end
|
|
299
|
-
|
|
300
|
-
if
|
|
268
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_ESAU_JR
|
|
269
|
+
if ____cond17 then
|
|
301
270
|
do
|
|
302
|
-
|
|
303
|
-
break
|
|
271
|
+
return postEsauJrRegister
|
|
304
272
|
end
|
|
305
273
|
end
|
|
306
|
-
|
|
307
|
-
if
|
|
274
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_FIRST_ESAU_JR
|
|
275
|
+
if ____cond17 then
|
|
308
276
|
do
|
|
309
|
-
|
|
310
|
-
break
|
|
277
|
+
return postFirstEsauJrRegister
|
|
311
278
|
end
|
|
312
279
|
end
|
|
313
|
-
|
|
314
|
-
if
|
|
280
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_TRANSFORMATION
|
|
281
|
+
if ____cond17 then
|
|
315
282
|
do
|
|
316
|
-
|
|
317
|
-
break
|
|
283
|
+
return postTransformationRegister
|
|
318
284
|
end
|
|
319
285
|
end
|
|
320
|
-
|
|
321
|
-
if
|
|
286
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_PURCHASE
|
|
287
|
+
if ____cond17 then
|
|
322
288
|
do
|
|
323
|
-
|
|
324
|
-
break
|
|
289
|
+
return postPurchaseRegister
|
|
325
290
|
end
|
|
326
291
|
end
|
|
327
|
-
|
|
328
|
-
if
|
|
292
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SACRIFICE
|
|
293
|
+
if ____cond17 then
|
|
329
294
|
do
|
|
330
|
-
|
|
331
|
-
break
|
|
295
|
+
return postSacrificeRegister
|
|
332
296
|
end
|
|
333
297
|
end
|
|
334
|
-
|
|
335
|
-
if
|
|
298
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_CURSED_TELEPORT
|
|
299
|
+
if ____cond17 then
|
|
336
300
|
do
|
|
337
|
-
|
|
338
|
-
break
|
|
301
|
+
return postCursedTeleportRegister
|
|
339
302
|
end
|
|
340
303
|
end
|
|
341
|
-
|
|
342
|
-
if
|
|
304
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_INIT
|
|
305
|
+
if ____cond17 then
|
|
343
306
|
do
|
|
344
|
-
|
|
345
|
-
break
|
|
307
|
+
return postSlotInitRegister
|
|
346
308
|
end
|
|
347
309
|
end
|
|
348
|
-
|
|
349
|
-
if
|
|
310
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_UPDATE
|
|
311
|
+
if ____cond17 then
|
|
350
312
|
do
|
|
351
|
-
|
|
352
|
-
break
|
|
313
|
+
return postSlotUpdateRegister
|
|
353
314
|
end
|
|
354
315
|
end
|
|
355
|
-
|
|
356
|
-
if
|
|
316
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_RENDER
|
|
317
|
+
if ____cond17 then
|
|
357
318
|
do
|
|
358
|
-
|
|
359
|
-
break
|
|
319
|
+
return postSlotRenderRegister
|
|
360
320
|
end
|
|
361
321
|
end
|
|
362
|
-
|
|
363
|
-
if
|
|
322
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_SLOT_DESTROYED
|
|
323
|
+
if ____cond17 then
|
|
364
324
|
do
|
|
365
|
-
|
|
366
|
-
break
|
|
325
|
+
return postSlotDestroyedRegister
|
|
367
326
|
end
|
|
368
327
|
end
|
|
369
|
-
|
|
370
|
-
if
|
|
328
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT
|
|
329
|
+
if ____cond17 then
|
|
371
330
|
do
|
|
372
|
-
|
|
373
|
-
break
|
|
331
|
+
return postGridEntityInitRegister
|
|
374
332
|
end
|
|
375
333
|
end
|
|
376
|
-
|
|
377
|
-
if
|
|
334
|
+
____cond17 = ____cond17 or ____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE
|
|
335
|
+
if ____cond17 then
|
|
378
336
|
do
|
|
379
|
-
|
|
380
|
-
|
|
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
|
|
381
344
|
end
|
|
382
345
|
end
|
|
383
346
|
do
|
|
384
347
|
do
|
|
385
348
|
ensureAllCases(nil, callbackID)
|
|
386
349
|
error(("The custom callback ID of \"" .. tostring(callbackID)) .. "\" is not valid.")
|
|
350
|
+
return function()
|
|
351
|
+
end
|
|
387
352
|
end
|
|
388
353
|
end
|
|
389
354
|
until true
|
|
390
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
|
|
391
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;
|