isaacscript-common 3.9.0 → 3.10.0
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.
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local Set = ____lualib.Set
|
|
3
|
-
local __TS__New = ____lualib.__TS__New
|
|
4
1
|
local ____exports = {}
|
|
5
|
-
local hasSubscriptions, postBombUpdate
|
|
2
|
+
local hasSubscriptions, postBombUpdate
|
|
6
3
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
4
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
-
local
|
|
9
|
-
local
|
|
5
|
+
local ____constants = require("constants")
|
|
6
|
+
local BOMB_EXPLODE_FRAME = ____constants.BOMB_EXPLODE_FRAME
|
|
10
7
|
local ____postBoneDetonated = require("callbacks.subscriptions.postBoneDetonated")
|
|
11
8
|
local postBombDetonatedFire = ____postBoneDetonated.postBombDetonatedFire
|
|
12
9
|
local postBombDetonatedHasSubscriptions = ____postBoneDetonated.postBombDetonatedHasSubscriptions
|
|
@@ -17,17 +14,13 @@ function postBombUpdate(self, bomb)
|
|
|
17
14
|
if not hasSubscriptions(nil) then
|
|
18
15
|
return
|
|
19
16
|
end
|
|
20
|
-
|
|
21
|
-
if not v.room.firedSet:has(index) then
|
|
22
|
-
v.room.firedSet:add(index)
|
|
17
|
+
if bomb.FrameCount == BOMB_EXPLODE_FRAME then
|
|
23
18
|
postBombDetonatedFire(nil, bomb)
|
|
24
19
|
end
|
|
25
20
|
end
|
|
26
|
-
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
21
|
---
|
|
28
22
|
-- @internal
|
|
29
23
|
function ____exports.postBombDetonatedInit(self, mod)
|
|
30
|
-
saveDataManager(nil, "postBombDetonated", v, hasSubscriptions)
|
|
31
24
|
mod:AddCallback(ModCallback.POST_BOMB_UPDATE, postBombUpdate)
|
|
32
25
|
end
|
|
33
26
|
return ____exports
|