isaacscript-common 1.0.498 → 1.0.499
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 +5 -3
- package/dist/callbacks/postCursedTeleport.lua +5 -3
- package/dist/callbacks/postEffectInitLate.lua +5 -3
- package/dist/callbacks/postEsauJr.lua +9 -5
- package/dist/callbacks/postFamiliarInitLate.lua +5 -3
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGridEntity.lua +13 -7
- package/dist/callbacks/postKnifeInitLate.lua +5 -3
- package/dist/callbacks/postLaserInitLate.lua +5 -3
- package/dist/callbacks/postNPCInitLate.lua +5 -3
- package/dist/callbacks/postPickupCollect.lua +5 -3
- package/dist/callbacks/postPickupInitLate.lua +5 -3
- 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 +5 -3
- 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 +5 -3
- 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/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/getCollectibleItemPoolType.lua +5 -22
- package/dist/functions/collectibles.d.ts +20 -1
- package/dist/functions/collectibles.lua +18 -4
- package/dist/functions/gridEntity.d.ts +2 -3
- package/dist/functions/gridEntity.lua +3 -1
- package/dist/functions/rooms.d.ts +1 -2
- package/dist/functions/rooms.lua +3 -5
- package/dist/functions/sprite.d.ts +11 -0
- package/dist/functions/sprite.lua +9 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.lua +0 -8
- package/dist/types/ModUpgraded.lua +234 -78
- 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)
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
11
|
+
local postBombInitLateFire = ____postBombInitLate.postBombInitLateFire
|
|
12
|
+
local postBombInitLateHasSubscriptions = ____postBombInitLate.postBombInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postBombInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postBombUpdate(self, bomb)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postBombUpdate(self, bomb)
|
|
|
25
27
|
local index = GetPtrHash(bomb)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postBombInitLateFire(nil, bomb)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -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()
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
11
|
+
local postEffectInitLateFire = ____postEffectInitLate.postEffectInitLateFire
|
|
12
|
+
local postEffectInitLateHasSubscriptions = ____postEffectInitLate.postEffectInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postEffectInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postEffectUpdate(self, effect)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postEffectUpdate(self, effect)
|
|
|
25
27
|
local index = GetPtrHash(effect)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postEffectInitLateFire(nil, effect)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -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
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
11
|
+
local postFamiliarInitLateFire = ____postFamiliarInitLate.postFamiliarInitLateFire
|
|
12
|
+
local postFamiliarInitLateHasSubscriptions = ____postFamiliarInitLate.postFamiliarInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postFamiliarInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postFamiliarUpdate(self, familiar)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postFamiliarUpdate(self, familiar)
|
|
|
25
27
|
local index = GetPtrHash(familiar)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postFamiliarInitLateFire(nil, familiar)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -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)}}
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
|
|
11
|
+
local postKnifeInitLateFire = ____postKnifeInitLate.postKnifeInitLateFire
|
|
12
|
+
local postKnifeInitLateHasSubscriptions = ____postKnifeInitLate.postKnifeInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postKnifeInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postKnifeUpdate(self, knife)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postKnifeUpdate(self, knife)
|
|
|
25
27
|
local index = GetPtrHash(knife)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postKnifeInitLateFire(nil, knife)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postLaserInitLate = require("callbacks.subscriptions.postLaserInitLate")
|
|
11
|
+
local postLaserInitLateFire = ____postLaserInitLate.postLaserInitLateFire
|
|
12
|
+
local postLaserInitLateHasSubscriptions = ____postLaserInitLate.postLaserInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postLaserInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postLaserUpdate(self, laser)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postLaserUpdate(self, laser)
|
|
|
25
27
|
local index = GetPtrHash(laser)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postLaserInitLateFire(nil, laser)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
|
|
11
|
+
local postNPCInitLateFire = ____postNPCInitLate.postNPCInitLateFire
|
|
12
|
+
local postNPCInitLateHasSubscriptions = ____postNPCInitLate.postNPCInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postNPCInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postNPCUpdate(self, npc)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postNPCUpdate(self, npc)
|
|
|
25
27
|
local index = GetPtrHash(npc)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postNPCInitLateFire(nil, npc)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -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)}}
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
11
|
+
local postPickupInitLateFire = ____postPickupInitLate.postPickupInitLateFire
|
|
12
|
+
local postPickupInitLateHasSubscriptions = ____postPickupInitLate.postPickupInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postPickupInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postPickupUpdate(self, pickup)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postPickupUpdate(self, pickup)
|
|
|
25
27
|
local index = GetPtrHash(pickup)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postPickupInitLateFire(nil, pickup)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -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)}}
|
|
@@ -6,9 +6,11 @@ local getPlayerNumAllHearts = ____player.getPlayerNumAllHearts
|
|
|
6
6
|
local hasLostCurse = ____player.hasLostCurse
|
|
7
7
|
local ____revive = require("functions.revive")
|
|
8
8
|
local willPlayerRevive = ____revive.willPlayerRevive
|
|
9
|
-
local
|
|
9
|
+
local ____postPlayerFatalDamage = require("callbacks.subscriptions.postPlayerFatalDamage")
|
|
10
|
+
local postPlayerFatalDamageFire = ____postPlayerFatalDamage.postPlayerFatalDamageFire
|
|
11
|
+
local postPlayerFatalDamageHasSubscriptions = ____postPlayerFatalDamage.postPlayerFatalDamageHasSubscriptions
|
|
10
12
|
function hasSubscriptions(self)
|
|
11
|
-
return
|
|
13
|
+
return postPlayerFatalDamageHasSubscriptions(nil)
|
|
12
14
|
end
|
|
13
15
|
function entityTakeDmgPlayer(self, tookDamage, damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
|
|
14
16
|
if not hasSubscriptions(nil) then
|
|
@@ -24,7 +26,7 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, _damageFlags, _dama
|
|
|
24
26
|
if not damageIsFatal(nil, player, damageAmount) and not hasLostCurse(nil, player) then
|
|
25
27
|
return nil
|
|
26
28
|
end
|
|
27
|
-
local shouldSustainDeath =
|
|
29
|
+
local shouldSustainDeath = postPlayerFatalDamageFire(nil, player)
|
|
28
30
|
if shouldSustainDeath ~= nil then
|
|
29
31
|
return shouldSustainDeath
|
|
30
32
|
end
|
|
@@ -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 getPlayerIndex = ____player.getPlayerIndex
|
|
9
|
-
local
|
|
9
|
+
local ____postPlayerInitLate = require("callbacks.subscriptions.postPlayerInitLate")
|
|
10
|
+
local postPlayerInitLateFire = ____postPlayerInitLate.postPlayerInitLateFire
|
|
11
|
+
local postPlayerInitLateHasSubscriptions = ____postPlayerInitLate.postPlayerInitLateHasSubscriptions
|
|
10
12
|
function hasSubscriptions(self)
|
|
11
|
-
return
|
|
13
|
+
return postPlayerInitLateHasSubscriptions(nil)
|
|
12
14
|
end
|
|
13
15
|
function postPlayerUpdate(self, player)
|
|
14
16
|
if not hasSubscriptions(nil) then
|
|
@@ -17,7 +19,7 @@ function postPlayerUpdate(self, player)
|
|
|
17
19
|
local playerIndex = getPlayerIndex(nil, player)
|
|
18
20
|
if not v.run.firedSet:has(playerIndex) then
|
|
19
21
|
v.run.firedSet:add(playerIndex)
|
|
20
|
-
|
|
22
|
+
postPlayerInitLateFire(nil, player)
|
|
21
23
|
end
|
|
22
24
|
end
|
|
23
25
|
v = {run = {firedSet = __TS__New(Set)}}
|
|
@@ -9,18 +9,24 @@ local arrayEmpty = ____array.arrayEmpty
|
|
|
9
9
|
local ____player = require("functions.player")
|
|
10
10
|
local getPlayerFromIndex = ____player.getPlayerFromIndex
|
|
11
11
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local
|
|
12
|
+
local ____postPlayerInitReordered = require("callbacks.subscriptions.postPlayerInitReordered")
|
|
13
|
+
local postPlayerInitReorderedFire = ____postPlayerInitReordered.postPlayerInitReorderedFire
|
|
14
|
+
local postPlayerInitReorderedHasSubscriptions = ____postPlayerInitReordered.postPlayerInitReorderedHasSubscriptions
|
|
15
|
+
local ____postPlayerRenderReordered = require("callbacks.subscriptions.postPlayerRenderReordered")
|
|
16
|
+
local postPlayerRenderReorderedFire = ____postPlayerRenderReordered.postPlayerRenderReorderedFire
|
|
17
|
+
local postPlayerRenderReorderedHasSubscriptions = ____postPlayerRenderReordered.postPlayerRenderReorderedHasSubscriptions
|
|
18
|
+
local ____postPlayerUpdateReordered = require("callbacks.subscriptions.postPlayerUpdateReordered")
|
|
19
|
+
local postPlayerUpdateReorderedFire = ____postPlayerUpdateReordered.postPlayerUpdateReorderedFire
|
|
20
|
+
local postPlayerUpdateReorderedHasSubscriptions = ____postPlayerUpdateReordered.postPlayerUpdateReorderedHasSubscriptions
|
|
15
21
|
function hasSubscriptions(self)
|
|
16
|
-
return
|
|
22
|
+
return postPlayerInitReorderedHasSubscriptions(nil) or postPlayerUpdateReorderedHasSubscriptions(nil) or postPlayerRenderReorderedHasSubscriptions(nil)
|
|
17
23
|
end
|
|
18
24
|
function postPlayerInit(self, player)
|
|
19
25
|
if not hasSubscriptions(nil) then
|
|
20
26
|
return
|
|
21
27
|
end
|
|
22
28
|
if v.run.postGameStartedFiredOnThisRun then
|
|
23
|
-
|
|
29
|
+
postPlayerInitReorderedFire(nil, player)
|
|
24
30
|
else
|
|
25
31
|
local playerIndex = getPlayerIndex(nil, player)
|
|
26
32
|
__TS__ArrayPush(v.run.postPlayerInitQueue, playerIndex)
|
|
@@ -31,7 +37,7 @@ function postPlayerUpdate(self, player)
|
|
|
31
37
|
return
|
|
32
38
|
end
|
|
33
39
|
if v.run.postGameStartedFiredOnThisRun then
|
|
34
|
-
|
|
40
|
+
postPlayerUpdateReorderedFire(nil, player)
|
|
35
41
|
else
|
|
36
42
|
local playerIndex = getPlayerIndex(nil, player)
|
|
37
43
|
__TS__ArrayPush(v.run.postPlayerUpdateQueue, playerIndex)
|
|
@@ -42,7 +48,7 @@ function postPlayerRender(self, player)
|
|
|
42
48
|
return
|
|
43
49
|
end
|
|
44
50
|
if v.run.postGameStartedFiredOnThisRun then
|
|
45
|
-
|
|
51
|
+
postPlayerRenderReorderedFire(nil, player)
|
|
46
52
|
else
|
|
47
53
|
local playerIndex = getPlayerIndex(nil, player)
|
|
48
54
|
__TS__ArrayPush(v.run.postPlayerRenderQueue, playerIndex)
|
|
@@ -53,9 +59,9 @@ function postGameStarted(self)
|
|
|
53
59
|
return
|
|
54
60
|
end
|
|
55
61
|
v.run.postGameStartedFiredOnThisRun = true
|
|
56
|
-
dequeue(nil, v.run.postPlayerInitQueue,
|
|
57
|
-
dequeue(nil, v.run.postPlayerUpdateQueue,
|
|
58
|
-
dequeue(nil, v.run.postPlayerRenderQueue,
|
|
62
|
+
dequeue(nil, v.run.postPlayerInitQueue, postPlayerInitReorderedFire)
|
|
63
|
+
dequeue(nil, v.run.postPlayerUpdateQueue, postPlayerUpdateReorderedFire)
|
|
64
|
+
dequeue(nil, v.run.postPlayerRenderQueue, postPlayerRenderReorderedFire)
|
|
59
65
|
end
|
|
60
66
|
function dequeue(self, playerIndexes, fireFunction)
|
|
61
67
|
for ____, playerIndex in ipairs(playerIndexes) do
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____rooms = require("functions.rooms")
|
|
8
8
|
local getRoomIndex = ____rooms.getRoomIndex
|
|
9
9
|
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
10
|
-
local
|
|
10
|
+
local ____postProjectileInitLate = require("callbacks.subscriptions.postProjectileInitLate")
|
|
11
|
+
local postProjectileInitLateFire = ____postProjectileInitLate.postProjectileInitLateFire
|
|
12
|
+
local postProjectileInitLateHasSubscriptions = ____postProjectileInitLate.postProjectileInitLateHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postProjectileInitLateHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postProjectileUpdate(self, projectile)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -25,7 +27,7 @@ function postProjectileUpdate(self, projectile)
|
|
|
25
27
|
local index = GetPtrHash(projectile)
|
|
26
28
|
if not v.run.firedSet:has(index) then
|
|
27
29
|
v.run.firedSet:add(index)
|
|
28
|
-
|
|
30
|
+
postProjectileInitLateFire(nil, projectile)
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
v = {run = {
|
|
@@ -7,9 +7,11 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
7
7
|
local ____player = require("functions.player")
|
|
8
8
|
local getPlayerIndex = ____player.getPlayerIndex
|
|
9
9
|
local getPlayers = ____player.getPlayers
|
|
10
|
-
local
|
|
10
|
+
local ____postPurchase = require("callbacks.subscriptions.postPurchase")
|
|
11
|
+
local postPurchaseFire = ____postPurchase.postPurchaseFire
|
|
12
|
+
local postPurchaseHasSubscriptions = ____postPurchase.postPurchaseHasSubscriptions
|
|
11
13
|
function hasSubscriptions(self)
|
|
12
|
-
return
|
|
14
|
+
return postPurchaseHasSubscriptions(nil)
|
|
13
15
|
end
|
|
14
16
|
function postUpdate(self)
|
|
15
17
|
if not hasSubscriptions(nil) then
|
|
@@ -41,7 +43,13 @@ function checkPickupsPurchased(self, pickups, players)
|
|
|
41
43
|
goto __continue9
|
|
42
44
|
end
|
|
43
45
|
if not playerHoldingItemLastFrame and playerHoldingItem then
|
|
44
|
-
|
|
46
|
+
postPurchaseFire(
|
|
47
|
+
nil,
|
|
48
|
+
player,
|
|
49
|
+
pickupDescription.variant,
|
|
50
|
+
pickupDescription.subtype,
|
|
51
|
+
pickupDescription.price
|
|
52
|
+
)
|
|
45
53
|
break
|
|
46
54
|
end
|
|
47
55
|
end
|
|
@@ -5,9 +5,11 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
5
5
|
local saveDataManager = ____exports.saveDataManager
|
|
6
6
|
local ____flag = require("functions.flag")
|
|
7
7
|
local hasFlag = ____flag.hasFlag
|
|
8
|
-
local
|
|
8
|
+
local ____postSacrifice = require("callbacks.subscriptions.postSacrifice")
|
|
9
|
+
local postSacrificeFire = ____postSacrifice.postSacrificeFire
|
|
10
|
+
local postSacrificeHasSubscriptions = ____postSacrifice.postSacrificeHasSubscriptions
|
|
9
11
|
function hasSubscriptions(self)
|
|
10
|
-
return
|
|
12
|
+
return postSacrificeHasSubscriptions(nil)
|
|
11
13
|
end
|
|
12
14
|
function entityTakeDmgPlayer(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
|
|
13
15
|
if not hasSubscriptions(nil) then
|
|
@@ -24,7 +26,7 @@ function entityTakeDmgPlayer(self, tookDamage, _damageAmount, damageFlags, _dama
|
|
|
24
26
|
if roomType == RoomType.ROOM_SACRIFICE and isSpikeDamage then
|
|
25
27
|
local ____v_level_0, ____numSacrifices_1 = v.level, "numSacrifices"
|
|
26
28
|
____v_level_0[____numSacrifices_1] = ____v_level_0[____numSacrifices_1] + 1
|
|
27
|
-
|
|
29
|
+
postSacrificeFire(nil, player, v.level.numSacrifices)
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
v = {level = {numSacrifices = 0}}
|