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
|
@@ -11,10 +11,14 @@ local ____player = require("functions.player")
|
|
|
11
11
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
12
12
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
13
13
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
14
|
-
local
|
|
15
|
-
local
|
|
14
|
+
local ____postCustomRevive = require("callbacks.subscriptions.postCustomRevive")
|
|
15
|
+
local postCustomReviveFire = ____postCustomRevive.postCustomReviveFire
|
|
16
|
+
local postCustomReviveHasSubscriptions = ____postCustomRevive.postCustomReviveHasSubscriptions
|
|
17
|
+
local ____preCustomRevive = require("callbacks.subscriptions.preCustomRevive")
|
|
18
|
+
local preCustomReviveFire = ____preCustomRevive.preCustomReviveFire
|
|
19
|
+
local preCustomReviveHasSubscriptions = ____preCustomRevive.preCustomReviveHasSubscriptions
|
|
16
20
|
function hasSubscriptions(self)
|
|
17
|
-
return
|
|
21
|
+
return preCustomReviveHasSubscriptions(nil) or postCustomReviveHasSubscriptions(nil)
|
|
18
22
|
end
|
|
19
23
|
function postRender(self)
|
|
20
24
|
if v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
@@ -55,7 +59,7 @@ function postPlayerUpdateReordered(self, player)
|
|
|
55
59
|
return
|
|
56
60
|
end
|
|
57
61
|
if v.run.revivalType ~= nil then
|
|
58
|
-
|
|
62
|
+
postCustomReviveFire(nil, playerToCheckHoldingItem, v.run.revivalType)
|
|
59
63
|
end
|
|
60
64
|
v.run.state = CustomReviveState.DISABLED
|
|
61
65
|
v.run.revivalType = nil
|
|
@@ -65,7 +69,7 @@ function postPlayerFatalDamage(self, player)
|
|
|
65
69
|
if not hasSubscriptions(nil) then
|
|
66
70
|
return
|
|
67
71
|
end
|
|
68
|
-
local revivalType =
|
|
72
|
+
local revivalType = preCustomReviveFire(nil, player)
|
|
69
73
|
if revivalType == nil then
|
|
70
74
|
return
|
|
71
75
|
end
|
|
@@ -8,10 +8,14 @@ local ____player = require("functions.player")
|
|
|
8
8
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
9
9
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
10
10
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
11
|
-
local
|
|
12
|
-
local
|
|
11
|
+
local ____postItemPickup = require("callbacks.subscriptions.postItemPickup")
|
|
12
|
+
local postItemPickupFire = ____postItemPickup.postItemPickupFire
|
|
13
|
+
local postItemPickupHasSubscriptions = ____postItemPickup.postItemPickupHasSubscriptions
|
|
14
|
+
local ____preItemPickup = require("callbacks.subscriptions.preItemPickup")
|
|
15
|
+
local preItemPickupFire = ____preItemPickup.preItemPickupFire
|
|
16
|
+
local preItemPickupHasSubscriptions = ____preItemPickup.preItemPickupHasSubscriptions
|
|
13
17
|
function hasSubscriptions(self)
|
|
14
|
-
return
|
|
18
|
+
return preItemPickupHasSubscriptions(nil) or postItemPickupHasSubscriptions(nil)
|
|
15
19
|
end
|
|
16
20
|
function postPlayerUpdateReorderedPlayer(self, player)
|
|
17
21
|
if not hasSubscriptions(nil) then
|
|
@@ -26,7 +30,7 @@ function postPlayerUpdateReorderedPlayer(self, player)
|
|
|
26
30
|
end
|
|
27
31
|
function queueEmpty(self, player, pickingUpItem)
|
|
28
32
|
if pickingUpItem.id ~= CollectibleType.COLLECTIBLE_NULL then
|
|
29
|
-
|
|
33
|
+
postItemPickupFire(nil, player, pickingUpItem)
|
|
30
34
|
pickingUpItem.id = CollectibleType.COLLECTIBLE_NULL
|
|
31
35
|
pickingUpItem.type = ItemType.ITEM_NULL
|
|
32
36
|
end
|
|
@@ -36,7 +40,7 @@ function queueNotEmpty(self, player, pickingUpItem)
|
|
|
36
40
|
if queuedItem ~= nil and queuedItem.ID ~= pickingUpItem.id then
|
|
37
41
|
pickingUpItem.id = queuedItem.ID
|
|
38
42
|
pickingUpItem.type = queuedItem.Type
|
|
39
|
-
|
|
43
|
+
preItemPickupFire(nil, player, pickingUpItem)
|
|
40
44
|
end
|
|
41
45
|
end
|
|
42
46
|
function getPickingUpItemForPlayer(self, player)
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postBombUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
7
|
+
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
8
|
+
local postBombInitLateFire = ____postBombInitLate.postBombInitLateFire
|
|
9
|
+
local postBombInitLateHasSubscriptions = ____postBombInitLate.postBombInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postBombInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postBombUpdate(self, bomb)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(bomb)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postBombInitLateFire(nil, bomb)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postBombInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postBombInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_POST_BOMB_UPDATE, postBombUpdate)
|
|
@@ -9,9 +9,11 @@ local hasFlag = ____flag.hasFlag
|
|
|
9
9
|
local ____player = require("functions.player")
|
|
10
10
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
11
11
|
local getPlayerNumAllHearts = ____player.getPlayerNumAllHearts
|
|
12
|
-
local
|
|
12
|
+
local ____postCursedTeleport = require("callbacks.subscriptions.postCursedTeleport")
|
|
13
|
+
local postCursedTeleportFire = ____postCursedTeleport.postCursedTeleportFire
|
|
14
|
+
local postCursedTeleportHasSubscriptions = ____postCursedTeleport.postCursedTeleportHasSubscriptions
|
|
13
15
|
function hasSubscriptions(self)
|
|
14
|
-
return
|
|
16
|
+
return postCursedTeleportHasSubscriptions(nil)
|
|
15
17
|
end
|
|
16
18
|
function entityTakeDmgPlayer(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
|
|
17
19
|
if not hasSubscriptions(nil) then
|
|
@@ -76,7 +78,7 @@ function postPlayerRenderPlayer(self, player)
|
|
|
76
78
|
return
|
|
77
79
|
end
|
|
78
80
|
v.run.damageFrameMap:set(playerIndex, {gameFrameCount, true})
|
|
79
|
-
|
|
81
|
+
postCursedTeleportFire(nil, player)
|
|
80
82
|
end
|
|
81
83
|
function playerIsTeleportingFromCursedTeleport(self, player, lastDamageFrame)
|
|
82
84
|
local game = Game()
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postEffectUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
7
|
+
local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
8
|
+
local postEffectInitLateFire = ____postEffectInitLate.postEffectInitLateFire
|
|
9
|
+
local postEffectInitLateHasSubscriptions = ____postEffectInitLate.postEffectInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postEffectInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postEffectUpdate(self, effect)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(effect)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postEffectInitLateFire(nil, effect)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postEffectInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postEffectInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_UPDATE, postEffectUpdate)
|
|
@@ -5,10 +5,14 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
5
5
|
local saveDataManager = ____exports.saveDataManager
|
|
6
6
|
local ____player = require("functions.player")
|
|
7
7
|
local getPlayers = ____player.getPlayers
|
|
8
|
-
local
|
|
9
|
-
local
|
|
8
|
+
local ____postEsauJr = require("callbacks.subscriptions.postEsauJr")
|
|
9
|
+
local postEsauJrFire = ____postEsauJr.postEsauJrFire
|
|
10
|
+
local postEsauJrHasSubscriptions = ____postEsauJr.postEsauJrHasSubscriptions
|
|
11
|
+
local ____postFirstEsauJr = require("callbacks.subscriptions.postFirstEsauJr")
|
|
12
|
+
local postFirstEsauJrFire = ____postFirstEsauJr.postFirstEsauJrFire
|
|
13
|
+
local postFirstEsauJrHasSubscriptions = ____postFirstEsauJr.postFirstEsauJrHasSubscriptions
|
|
10
14
|
function hasSubscriptions(self)
|
|
11
|
-
return
|
|
15
|
+
return postEsauJrHasSubscriptions(nil) or postFirstEsauJrHasSubscriptions(nil)
|
|
12
16
|
end
|
|
13
17
|
function postUpdate(self)
|
|
14
18
|
if not hasSubscriptions(nil) then
|
|
@@ -30,9 +34,9 @@ function postUpdate(self)
|
|
|
30
34
|
end
|
|
31
35
|
if not v.run.usedEsauJrAtLeastOnce then
|
|
32
36
|
v.run.usedEsauJrAtLeastOnce = true
|
|
33
|
-
|
|
37
|
+
postFirstEsauJrFire(nil, player)
|
|
34
38
|
end
|
|
35
|
-
|
|
39
|
+
postEsauJrFire(nil, player)
|
|
36
40
|
end
|
|
37
41
|
function getPlayerWithControllerIndex(self, controllerIndex)
|
|
38
42
|
for ____, player in ipairs(getPlayers(nil)) do
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postFamiliarUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
7
|
+
local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
8
|
+
local postFamiliarInitLateFire = ____postFamiliarInitLate.postFamiliarInitLateFire
|
|
9
|
+
local postFamiliarInitLateHasSubscriptions = ____postFamiliarInitLate.postFamiliarInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postFamiliarInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postFamiliarUpdate(self, familiar)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(familiar)
|
|
26
18
|
if not v.run.firedSet:has(index) then
|
|
27
19
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
20
|
+
postFamiliarInitLateFire(nil, familiar)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {run = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {run = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postFamiliarInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postFamiliarInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
@@ -6,10 +6,14 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
6
6
|
local ____player = require("functions.player")
|
|
7
7
|
local getPlayers = ____player.getPlayers
|
|
8
8
|
local isTaintedLazarus = ____player.isTaintedLazarus
|
|
9
|
-
local
|
|
10
|
-
local
|
|
9
|
+
local ____postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
|
|
10
|
+
local postFirstFlipFire = ____postFirstFlip.postFirstFlipFire
|
|
11
|
+
local postFirstFlipHasSubscriptions = ____postFirstFlip.postFirstFlipHasSubscriptions
|
|
12
|
+
local ____postFlip = require("callbacks.subscriptions.postFlip")
|
|
13
|
+
local postFlipFire = ____postFlip.postFlipFire
|
|
14
|
+
local postFlipHasSubscriptions = ____postFlip.postFlipHasSubscriptions
|
|
11
15
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
16
|
+
return postFlipHasSubscriptions(nil) or postFirstFlipHasSubscriptions(nil)
|
|
13
17
|
end
|
|
14
18
|
function useItemFlip(self, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
15
19
|
if not hasSubscriptions(nil) then
|
|
@@ -21,9 +25,9 @@ function useItemFlip(self, _collectibleType, _rng, player, _useFlags, _activeSlo
|
|
|
21
25
|
local newLazarus = getNewLazarus(nil, player)
|
|
22
26
|
if not v.run.usedFlipAtLeastOnce then
|
|
23
27
|
v.run.usedFlipAtLeastOnce = true
|
|
24
|
-
|
|
28
|
+
postFirstFlipFire(nil, newLazarus)
|
|
25
29
|
end
|
|
26
|
-
|
|
30
|
+
postFlipFire(nil, newLazarus)
|
|
27
31
|
end
|
|
28
32
|
function getNewLazarus(self, oldLazarus)
|
|
29
33
|
local oldCharacter = oldLazarus:GetPlayerType()
|
|
@@ -6,11 +6,17 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
7
|
local ____gridEntity = require("functions.gridEntity")
|
|
8
8
|
local getGridEntities = ____gridEntity.getGridEntities
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
9
|
+
local ____postGridEntityInit = require("callbacks.subscriptions.postGridEntityInit")
|
|
10
|
+
local postGridEntityInitFire = ____postGridEntityInit.postGridEntityInitFire
|
|
11
|
+
local postGridEntityInitHasSubscriptions = ____postGridEntityInit.postGridEntityInitHasSubscriptions
|
|
12
|
+
local ____postGridEntityRemove = require("callbacks.subscriptions.postGridEntityRemove")
|
|
13
|
+
local postGridEntityRemoveFire = ____postGridEntityRemove.postGridEntityRemoveFire
|
|
14
|
+
local postGridEntityRemoveHasSubscriptions = ____postGridEntityRemove.postGridEntityRemoveHasSubscriptions
|
|
15
|
+
local ____postGridEntityUpdate = require("callbacks.subscriptions.postGridEntityUpdate")
|
|
16
|
+
local postGridEntityUpdateFire = ____postGridEntityUpdate.postGridEntityUpdateFire
|
|
17
|
+
local postGridEntityUpdateHasSubscriptions = ____postGridEntityUpdate.postGridEntityUpdateHasSubscriptions
|
|
12
18
|
function hasSubscriptions(self)
|
|
13
|
-
return
|
|
19
|
+
return postGridEntityInitHasSubscriptions(nil) or postGridEntityUpdateHasSubscriptions(nil) or postGridEntityRemoveHasSubscriptions(nil)
|
|
14
20
|
end
|
|
15
21
|
function postUpdate(self)
|
|
16
22
|
if not hasSubscriptions(nil) then
|
|
@@ -18,7 +24,7 @@ function postUpdate(self)
|
|
|
18
24
|
end
|
|
19
25
|
for ____, gridEntity in ipairs(getGridEntities(nil)) do
|
|
20
26
|
checkNewGridEntity(nil, gridEntity)
|
|
21
|
-
|
|
27
|
+
postGridEntityUpdateFire(nil, gridEntity)
|
|
22
28
|
end
|
|
23
29
|
checkGridEntityRemoved(nil)
|
|
24
30
|
end
|
|
@@ -33,7 +39,7 @@ function checkGridEntityRemoved(self)
|
|
|
33
39
|
local gridEntity = room:GetGridEntity(gridIndex)
|
|
34
40
|
if gridEntity == nil or gridEntity:GetType() ~= gridEntityType then
|
|
35
41
|
v.room.initializedGridEntities:delete(gridIndex)
|
|
36
|
-
|
|
42
|
+
postGridEntityRemoveFire(nil, gridIndex, gridEntityType)
|
|
37
43
|
end
|
|
38
44
|
end
|
|
39
45
|
end
|
|
@@ -51,7 +57,7 @@ function checkNewGridEntity(self, gridEntity)
|
|
|
51
57
|
local storedGridEntityType = v.room.initializedGridEntities:get(gridIndex)
|
|
52
58
|
if storedGridEntityType ~= gridEntityType then
|
|
53
59
|
v.room.initializedGridEntities:set(gridIndex, gridEntityType)
|
|
54
|
-
|
|
60
|
+
postGridEntityInitFire(nil, gridEntity)
|
|
55
61
|
end
|
|
56
62
|
end
|
|
57
63
|
v = {room = {initializedGridEntities = __TS__New(Map)}}
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postKnifeUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
|
|
7
|
+
local ____postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
|
|
8
|
+
local postKnifeInitLateFire = ____postKnifeInitLate.postKnifeInitLateFire
|
|
9
|
+
local postKnifeInitLateHasSubscriptions = ____postKnifeInitLate.postKnifeInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postKnifeInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postKnifeUpdate(self, knife)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(knife)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postKnifeInitLateFire(nil, knife)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postKnifeInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postKnifeInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_UPDATE, postKnifeUpdate)
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postLaserUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate")
|
|
7
|
+
local ____postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate")
|
|
8
|
+
local postLaserInitLateFire = ____postLaserInitLate.postLaserInitLateFire
|
|
9
|
+
local postLaserInitLateHasSubscriptions = ____postLaserInitLate.postLaserInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postLaserInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postLaserUpdate(self, laser)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(laser)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postLaserInitLateFire(nil, laser)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postLaserInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postLaserInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_POST_LASER_UPDATE, postLaserUpdate)
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postNPCUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
7
|
+
local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
8
|
+
local postNPCInitLateFire = ____postNPCInitLate.postNPCInitLateFire
|
|
9
|
+
local postNPCInitLateHasSubscriptions = ____postNPCInitLate.postNPCInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postNPCInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postNPCUpdate(self, npc)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(npc)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postNPCInitLateFire(nil, npc)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postNPCInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postNPCInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_NPC_UPDATE, postNPCUpdate)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local hasSubscriptions, postNewRoom, preEntitySpawn, checkRoomChanged, currentRoomTopLeftWallPtrHash
|
|
4
|
+
local ____gridEntity = require("functions.gridEntity")
|
|
5
|
+
local getTopLeftWall = ____gridEntity.getTopLeftWall
|
|
6
|
+
local ____postNewRoomEarly = require("callbacks.subscriptions.postNewRoomEarly")
|
|
7
|
+
local postNewRoomEarlyFire = ____postNewRoomEarly.postNewRoomEarlyFire
|
|
8
|
+
local postNewRoomEarlyHasSubscriptions = ____postNewRoomEarly.postNewRoomEarlyHasSubscriptions
|
|
9
|
+
function hasSubscriptions(self)
|
|
10
|
+
return postNewRoomEarlyHasSubscriptions(nil)
|
|
11
|
+
end
|
|
12
|
+
function postNewRoom(self)
|
|
13
|
+
if not hasSubscriptions(nil) then
|
|
14
|
+
return
|
|
15
|
+
end
|
|
16
|
+
checkRoomChanged(nil)
|
|
17
|
+
end
|
|
18
|
+
function preEntitySpawn(self)
|
|
19
|
+
if not hasSubscriptions(nil) then
|
|
20
|
+
return
|
|
21
|
+
end
|
|
22
|
+
checkRoomChanged(nil)
|
|
23
|
+
end
|
|
24
|
+
function checkRoomChanged(self)
|
|
25
|
+
local topLeftWall = getTopLeftWall(nil)
|
|
26
|
+
local ____temp_0
|
|
27
|
+
if topLeftWall == nil then
|
|
28
|
+
____temp_0 = nil
|
|
29
|
+
else
|
|
30
|
+
____temp_0 = GetPtrHash(topLeftWall)
|
|
31
|
+
end
|
|
32
|
+
local topLeftWallPtrHash = ____temp_0
|
|
33
|
+
if topLeftWallPtrHash ~= currentRoomTopLeftWallPtrHash then
|
|
34
|
+
currentRoomTopLeftWallPtrHash = topLeftWallPtrHash
|
|
35
|
+
postNewRoomEarlyFire(nil)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
currentRoomTopLeftWallPtrHash = nil
|
|
39
|
+
function ____exports.postNewRoomEarlyCallbackInit(self, mod)
|
|
40
|
+
mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, postNewRoom)
|
|
41
|
+
mod:AddCallback(ModCallbacks.MC_PRE_ENTITY_SPAWN, preEntitySpawn)
|
|
42
|
+
end
|
|
43
|
+
return ____exports
|
|
@@ -6,9 +6,11 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
7
|
local ____player = require("functions.player")
|
|
8
8
|
local getClosestPlayer = ____player.getClosestPlayer
|
|
9
|
-
local
|
|
9
|
+
local ____postPickupCollect = require("callbacks.subscriptions.postPickupCollect")
|
|
10
|
+
local postPickupCollectFire = ____postPickupCollect.postPickupCollectFire
|
|
11
|
+
local postPickupCollectHasSubscriptions = ____postPickupCollect.postPickupCollectHasSubscriptions
|
|
10
12
|
function hasSubscriptions(self)
|
|
11
|
-
return
|
|
13
|
+
return postPickupCollectHasSubscriptions(nil)
|
|
12
14
|
end
|
|
13
15
|
function postPickupRender(self, pickup)
|
|
14
16
|
if not hasSubscriptions(nil) then
|
|
@@ -23,7 +25,7 @@ function postPickupRender(self, pickup)
|
|
|
23
25
|
if not v.room.firedSet:has(index) then
|
|
24
26
|
v.room.firedSet:add(index)
|
|
25
27
|
local player = getClosestPlayer(nil, pickup.Position)
|
|
26
|
-
|
|
28
|
+
postPickupCollectFire(nil, pickup, player)
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
@@ -4,35 +4,23 @@ local ____exports = {}
|
|
|
4
4
|
local hasSubscriptions, postPickupUpdate, v
|
|
5
5
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
6
|
local saveDataManager = ____exports.saveDataManager
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
7
|
+
local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
8
|
+
local postPickupInitLateFire = ____postPickupInitLate.postPickupInitLateFire
|
|
9
|
+
local postPickupInitLateHasSubscriptions = ____postPickupInitLate.postPickupInitLateHasSubscriptions
|
|
11
10
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
11
|
+
return postPickupInitLateHasSubscriptions(nil)
|
|
13
12
|
end
|
|
14
13
|
function postPickupUpdate(self, pickup)
|
|
15
14
|
if not hasSubscriptions(nil) then
|
|
16
15
|
return
|
|
17
16
|
end
|
|
18
|
-
local roomIndex = getRoomIndex(nil)
|
|
19
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
|
-
v.run.currentRoomIndex = roomIndex
|
|
22
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
|
-
v.run.firedSet:clear()
|
|
24
|
-
end
|
|
25
17
|
local index = GetPtrHash(pickup)
|
|
26
|
-
if not v.
|
|
27
|
-
v.
|
|
28
|
-
|
|
18
|
+
if not v.room.firedSet:has(index) then
|
|
19
|
+
v.room.firedSet:add(index)
|
|
20
|
+
postPickupInitLateFire(nil, pickup)
|
|
29
21
|
end
|
|
30
22
|
end
|
|
31
|
-
v = {
|
|
32
|
-
firedSet = __TS__New(Set),
|
|
33
|
-
currentRoomIndex = nil,
|
|
34
|
-
currentRoomVisitedCount = nil
|
|
35
|
-
}}
|
|
23
|
+
v = {room = {firedSet = __TS__New(Set)}}
|
|
36
24
|
function ____exports.postPickupInitLateCallbackInit(self, mod)
|
|
37
25
|
saveDataManager(nil, "postPickupInitLate", v, hasSubscriptions)
|
|
38
26
|
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, postPickupUpdate)
|
|
@@ -13,9 +13,11 @@ local ____HealthType = require("types.HealthType")
|
|
|
13
13
|
local HealthType = ____HealthType.HealthType
|
|
14
14
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
15
15
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
16
|
-
local
|
|
16
|
+
local ____postPlayerChangeHealth = require("callbacks.subscriptions.postPlayerChangeHealth")
|
|
17
|
+
local postPlayerChangeHealthFire = ____postPlayerChangeHealth.postPlayerChangeHealthFire
|
|
18
|
+
local postPlayerChangeHealthHasSubscriptions = ____postPlayerChangeHealth.postPlayerChangeHealthHasSubscriptions
|
|
17
19
|
function hasSubscriptions(self)
|
|
18
|
-
return
|
|
20
|
+
return postPlayerChangeHealthHasSubscriptions(nil)
|
|
19
21
|
end
|
|
20
22
|
function postPlayerUpdateReordered(self, player)
|
|
21
23
|
if not hasSubscriptions(nil) then
|
|
@@ -32,7 +34,7 @@ function postPlayerUpdateReordered(self, player)
|
|
|
32
34
|
local currentHealthValue = getCurrentHealthValue(nil, player, healthType)
|
|
33
35
|
if storedHealthValue ~= nil and storedHealthValue ~= currentHealthValue then
|
|
34
36
|
local amount = currentHealthValue - storedHealthValue
|
|
35
|
-
|
|
37
|
+
postPlayerChangeHealthFire(nil, player, healthType, amount)
|
|
36
38
|
end
|
|
37
39
|
end
|
|
38
40
|
end
|
|
@@ -8,9 +8,11 @@ local ____player = require("functions.player")
|
|
|
8
8
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
9
9
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
10
10
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
11
|
-
local
|
|
11
|
+
local ____postPlayerChangeType = require("callbacks.subscriptions.postPlayerChangeType")
|
|
12
|
+
local postPlayerChangeTypeFire = ____postPlayerChangeType.postPlayerChangeTypeFire
|
|
13
|
+
local postPlayerChangeTypeHasSubscriptions = ____postPlayerChangeType.postPlayerChangeTypeHasSubscriptions
|
|
12
14
|
function hasSubscriptions(self)
|
|
13
|
-
return
|
|
15
|
+
return postPlayerChangeTypeHasSubscriptions(nil)
|
|
14
16
|
end
|
|
15
17
|
function postPlayerUpdateReorderedPlayer(self, player)
|
|
16
18
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postPlayerUpdateReorderedPlayer(self, player)
|
|
|
25
27
|
end
|
|
26
28
|
if character ~= storedCharacter then
|
|
27
29
|
v.run.characterMap:set(playerIndex, character)
|
|
28
|
-
|
|
30
|
+
postPlayerChangeTypeFire(nil, player)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {characterMap = __TS__New(Map)}}
|