isaacscript-common 1.2.43 → 1.2.44
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.
|
@@ -4,7 +4,7 @@ local Set = ____lualib.Set
|
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local Map = ____lualib.Map
|
|
6
6
|
local ____exports = {}
|
|
7
|
-
local hasSubscriptions, postKnifeRenderBoneClub, boneClubAnimationChanged, BONE_SWING_ANIMATIONS, v
|
|
7
|
+
local hasSubscriptions, postKnifeRender, postKnifeRenderBoneClub, boneClubAnimationChanged, BONE_SWING_ANIMATIONS, v
|
|
8
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
9
9
|
local saveDataManager = ____exports.saveDataManager
|
|
10
10
|
local ____postBoneSwing = require("callbacks.subscriptions.postBoneSwing")
|
|
@@ -13,10 +13,16 @@ local postBoneSwingHasSubscriptions = ____postBoneSwing.postBoneSwingHasSubscrip
|
|
|
13
13
|
function hasSubscriptions(self)
|
|
14
14
|
return postBoneSwingHasSubscriptions(nil)
|
|
15
15
|
end
|
|
16
|
-
function
|
|
16
|
+
function postKnifeRender(self, knife)
|
|
17
17
|
if not hasSubscriptions(nil) then
|
|
18
18
|
return
|
|
19
19
|
end
|
|
20
|
+
if knife.Variant ~= 1 then
|
|
21
|
+
return
|
|
22
|
+
end
|
|
23
|
+
postKnifeRenderBoneClub(nil, knife)
|
|
24
|
+
end
|
|
25
|
+
function postKnifeRenderBoneClub(self, boneClub)
|
|
20
26
|
local sprite = boneClub:GetSprite()
|
|
21
27
|
local animation = sprite:GetAnimation()
|
|
22
28
|
local ptrHash = GetPtrHash(boneClub)
|
|
@@ -35,6 +41,6 @@ BONE_SWING_ANIMATIONS = __TS__New(Set, {"Swing", "Swing2", "Spin"})
|
|
|
35
41
|
v = {room = {boneClubAnimations = __TS__New(Map)}}
|
|
36
42
|
function ____exports.postBoneSwingCallbackInit(self, mod)
|
|
37
43
|
saveDataManager(nil, "postBoneSwing", v, hasSubscriptions)
|
|
38
|
-
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_RENDER,
|
|
44
|
+
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_RENDER, postKnifeRender)
|
|
39
45
|
end
|
|
40
46
|
return ____exports
|