isaacscript-common 1.0.501 → 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/postBombInitLate.d.ts +2 -2
- package/dist/callbacks/postBombInitLate.lua +4 -13
- package/dist/callbacks/postEffectInitLate.d.ts +2 -2
- package/dist/callbacks/postEffectInitLate.lua +4 -13
- package/dist/callbacks/postFamiliarInitLate.d.ts +2 -2
- package/dist/callbacks/postFamiliarInitLate.lua +1 -10
- package/dist/callbacks/postKnifeInitLate.d.ts +2 -2
- package/dist/callbacks/postKnifeInitLate.lua +4 -13
- package/dist/callbacks/postLaserInitLate.d.ts +2 -2
- package/dist/callbacks/postLaserInitLate.lua +4 -13
- package/dist/callbacks/postNPCInitLate.d.ts +2 -2
- package/dist/callbacks/postNPCInitLate.lua +4 -13
- package/dist/callbacks/postNewRoomEarly.lua +4 -7
- package/dist/callbacks/postPickupInitLate.d.ts +2 -2
- package/dist/callbacks/postPickupInitLate.lua +4 -13
- package/dist/callbacks/postProjectileInitLate.d.ts +2 -2
- package/dist/callbacks/postProjectileInitLate.lua +4 -13
- package/dist/callbacks/postTearInitLate.d.ts +2 -2
- package/dist/callbacks/postTearInitLate.lua +4 -13
- package/dist/features/saveDataManager/main.lua +5 -3
- package/dist/upgradeMod.d.ts +2 -2
- package/dist/upgradeMod.lua +7 -7
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postBombInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postBombInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postBombUpdate,
|
|
4
|
+
local hasSubscriptions, postBombUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
10
8
|
local postBombInitLateFire = ____postBombInitLate.postBombInitLateFire
|
|
11
9
|
local postBombInitLateHasSubscriptions = ____postBombInitLate.postBombInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postBombUpdate(self, bomb)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(bomb)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postBombInitLateFire(nil, bomb)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postBombInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postBombInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_BOMB_UPDATE, postBombUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postEffectInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postEffectInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postEffectUpdate,
|
|
4
|
+
local hasSubscriptions, postEffectUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
10
8
|
local postEffectInitLateFire = ____postEffectInitLate.postEffectInitLateFire
|
|
11
9
|
local postEffectInitLateHasSubscriptions = ____postEffectInitLate.postEffectInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postEffectUpdate(self, effect)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(effect)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postEffectInitLateFire(nil, effect)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postEffectInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postEffectInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_UPDATE, postEffectUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postFamiliarInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postFamiliarInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postFamiliarUpdate,
|
|
4
|
+
local hasSubscriptions, postFamiliarUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
10
8
|
local postFamiliarInitLateFire = ____postFamiliarInitLate.postFamiliarInitLateFire
|
|
11
9
|
local postFamiliarInitLateHasSubscriptions = ____postFamiliarInitLate.postFamiliarInitLateHasSubscriptions
|
|
@@ -22,16 +20,9 @@ function postFamiliarUpdate(self, familiar)
|
|
|
22
20
|
postFamiliarInitLateFire(nil, familiar)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
function postNewRoomEarly(self)
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
23
|
v = {run = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postFamiliarInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postFamiliarInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postKnifeInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postKnifeInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postKnifeUpdate,
|
|
4
|
+
local hasSubscriptions, postKnifeUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
|
|
10
8
|
local postKnifeInitLateFire = ____postKnifeInitLate.postKnifeInitLateFire
|
|
11
9
|
local postKnifeInitLateHasSubscriptions = ____postKnifeInitLate.postKnifeInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postKnifeUpdate(self, knife)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(knife)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postKnifeInitLateFire(nil, knife)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postKnifeInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postKnifeInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_UPDATE, postKnifeUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postLaserInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postLaserInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postLaserUpdate,
|
|
4
|
+
local hasSubscriptions, postLaserUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate")
|
|
10
8
|
local postLaserInitLateFire = ____postLaserInitLate.postLaserInitLateFire
|
|
11
9
|
local postLaserInitLateHasSubscriptions = ____postLaserInitLate.postLaserInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postLaserUpdate(self, laser)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(laser)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postLaserInitLateFire(nil, laser)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postLaserInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postLaserInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_LASER_UPDATE, postLaserUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postNPCInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postNPCInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postNPCUpdate,
|
|
4
|
+
local hasSubscriptions, postNPCUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
10
8
|
local postNPCInitLateFire = ____postNPCInitLate.postNPCInitLateFire
|
|
11
9
|
local postNPCInitLateHasSubscriptions = ____postNPCInitLate.postNPCInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postNPCUpdate(self, npc)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(npc)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postNPCInitLateFire(nil, npc)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postNPCInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postNPCInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_NPC_UPDATE, postNPCUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local hasSubscriptions, postNewRoom, preEntitySpawn, checkRoomChanged,
|
|
4
|
-
local ____exports = require("features.saveDataManager.exports")
|
|
5
|
-
local saveDataManager = ____exports.saveDataManager
|
|
3
|
+
local hasSubscriptions, postNewRoom, preEntitySpawn, checkRoomChanged, currentRoomTopLeftWallPtrHash
|
|
6
4
|
local ____gridEntity = require("functions.gridEntity")
|
|
7
5
|
local getTopLeftWall = ____gridEntity.getTopLeftWall
|
|
8
6
|
local ____postNewRoomEarly = require("callbacks.subscriptions.postNewRoomEarly")
|
|
@@ -32,14 +30,13 @@ function checkRoomChanged(self)
|
|
|
32
30
|
____temp_0 = GetPtrHash(topLeftWall)
|
|
33
31
|
end
|
|
34
32
|
local topLeftWallPtrHash = ____temp_0
|
|
35
|
-
if topLeftWallPtrHash ~=
|
|
36
|
-
|
|
33
|
+
if topLeftWallPtrHash ~= currentRoomTopLeftWallPtrHash then
|
|
34
|
+
currentRoomTopLeftWallPtrHash = topLeftWallPtrHash
|
|
37
35
|
postNewRoomEarlyFire(nil)
|
|
38
36
|
end
|
|
39
37
|
end
|
|
40
|
-
|
|
38
|
+
currentRoomTopLeftWallPtrHash = nil
|
|
41
39
|
function ____exports.postNewRoomEarlyCallbackInit(self, mod)
|
|
42
|
-
saveDataManager(nil, "postNewRoomEarlyCallback", v, hasSubscriptions)
|
|
43
40
|
mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, postNewRoom)
|
|
44
41
|
mod:AddCallback(ModCallbacks.MC_PRE_ENTITY_SPAWN, preEntitySpawn)
|
|
45
42
|
end
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postPickupInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postPickupInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postPickupUpdate,
|
|
4
|
+
local hasSubscriptions, postPickupUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
10
8
|
local postPickupInitLateFire = ____postPickupInitLate.postPickupInitLateFire
|
|
11
9
|
local postPickupInitLateHasSubscriptions = ____postPickupInitLate.postPickupInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postPickupUpdate(self, pickup)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(pickup)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postPickupInitLateFire(nil, pickup)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postPickupInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postPickupInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, postPickupUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postProjectileInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postProjectileInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postProjectileUpdate,
|
|
4
|
+
local hasSubscriptions, postProjectileUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postProjectileInitLate = require("callbacks.subscriptions.postProjectileInitLate")
|
|
10
8
|
local postProjectileInitLateFire = ____postProjectileInitLate.postProjectileInitLateFire
|
|
11
9
|
local postProjectileInitLateHasSubscriptions = ____postProjectileInitLate.postProjectileInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postProjectileUpdate(self, projectile)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(projectile)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postProjectileInitLateFire(nil, projectile)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postProjectileInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postProjectileInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_PROJECTILE_UPDATE, postProjectileUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function postTearInitLateCallbackInit(mod:
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare function postTearInitLateCallbackInit(mod: Mod): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local hasSubscriptions, postTearUpdate,
|
|
4
|
+
local hasSubscriptions, postTearUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
8
|
-
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
9
7
|
local ____postTearInitLate = require("callbacks.subscriptions.postTearInitLate")
|
|
10
8
|
local postTearInitLateFire = ____postTearInitLate.postTearInitLateFire
|
|
11
9
|
local postTearInitLateHasSubscriptions = ____postTearInitLate.postTearInitLateHasSubscriptions
|
|
@@ -17,21 +15,14 @@ function postTearUpdate(self, tear)
|
|
|
17
15
|
return
|
|
18
16
|
end
|
|
19
17
|
local index = GetPtrHash(tear)
|
|
20
|
-
if not v.
|
|
21
|
-
v.
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
22
20
|
postTearInitLateFire(nil, tear)
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
|
-
|
|
26
|
-
if not hasSubscriptions(nil) then
|
|
27
|
-
return
|
|
28
|
-
end
|
|
29
|
-
v.run.firedSet:clear()
|
|
30
|
-
end
|
|
31
|
-
v = {run = {firedSet = __TS__New(Set)}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
32
24
|
function ____exports.postTearInitLateCallbackInit(self, mod)
|
|
33
25
|
saveDataManager(nil, "postTearInitLate", v, hasSubscriptions)
|
|
34
26
|
mod:AddCallback(ModCallbacks.MC_POST_TEAR_UPDATE, postTearUpdate)
|
|
35
|
-
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
36
27
|
end
|
|
37
28
|
return ____exports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local postPlayerInit, preGameExit, postNewLevel,
|
|
3
|
+
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
|
|
4
4
|
local ____errors = require("errors")
|
|
5
5
|
local getUpgradeErrorMsg = ____errors.getUpgradeErrorMsg
|
|
6
6
|
local ____deepCopy = require("functions.deepCopy")
|
|
@@ -8,6 +8,8 @@ local deepCopy = ____deepCopy.deepCopy
|
|
|
8
8
|
local SerializationType = ____deepCopy.SerializationType
|
|
9
9
|
local ____util = require("functions.util")
|
|
10
10
|
local tableClear = ____util.tableClear
|
|
11
|
+
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
12
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
11
13
|
local ____SaveData = require("types.SaveData")
|
|
12
14
|
local SaveDataKeys = ____SaveData.SaveDataKeys
|
|
13
15
|
local ____load = require("features.saveDataManager.load")
|
|
@@ -47,7 +49,7 @@ end
|
|
|
47
49
|
function postNewLevel(self)
|
|
48
50
|
restoreDefaults(nil, SaveDataKeys.Level)
|
|
49
51
|
end
|
|
50
|
-
function
|
|
52
|
+
function postNewRoomEarly(self)
|
|
51
53
|
restoreDefaults(nil, SaveDataKeys.Room)
|
|
52
54
|
end
|
|
53
55
|
function restoreDefaultsAll(self)
|
|
@@ -94,7 +96,7 @@ function ____exports.saveDataManagerInit(self, incomingMod)
|
|
|
94
96
|
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT, postPlayerInit)
|
|
95
97
|
mod:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, preGameExit)
|
|
96
98
|
mod:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, postNewLevel)
|
|
97
|
-
mod:
|
|
99
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
98
100
|
end
|
|
99
101
|
function ____exports.isSaveDataManagerInitialized(self)
|
|
100
102
|
return mod ~= nil
|
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;
|
package/dist/upgradeMod.lua
CHANGED
|
@@ -82,7 +82,6 @@ local ModUpgraded = ____ModUpgraded.ModUpgraded
|
|
|
82
82
|
function initCustomCallbacks(self, mod)
|
|
83
83
|
reorderedCallbacksInit(nil, mod)
|
|
84
84
|
postPlayerReorderedCallbacksInit(nil, mod)
|
|
85
|
-
postNewRoomEarlyCallbackInit(nil, mod)
|
|
86
85
|
postPlayerInitLateCallbackInit(nil, mod)
|
|
87
86
|
postTearInitLateCallbackInit(nil, mod)
|
|
88
87
|
postFamiliarInitLateCallbackInit(nil, mod)
|
|
@@ -118,17 +117,18 @@ function initFeatures(self, mod)
|
|
|
118
117
|
runInNFramesInit(nil, mod)
|
|
119
118
|
sirenHelpersInit(nil, mod)
|
|
120
119
|
end
|
|
121
|
-
function ____exports.upgradeMod(self,
|
|
120
|
+
function ____exports.upgradeMod(self, modVanilla, verbose)
|
|
122
121
|
if verbose == nil then
|
|
123
122
|
verbose = false
|
|
124
123
|
end
|
|
125
|
-
local
|
|
124
|
+
local mod = __TS__New(ModUpgraded, modVanilla, verbose)
|
|
126
125
|
if not areFeaturesInitialized(nil) then
|
|
127
126
|
setFeaturesInitialized(nil)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
postNewRoomEarlyCallbackInit(nil, mod)
|
|
128
|
+
saveDataManagerInit(nil, mod)
|
|
129
|
+
initCustomCallbacks(nil, mod)
|
|
130
|
+
initFeatures(nil, mod)
|
|
131
131
|
end
|
|
132
|
-
return
|
|
132
|
+
return mod
|
|
133
133
|
end
|
|
134
134
|
return ____exports
|