relevant code: (prefab file 'treasurechest' line 190-199)
local function onhit(inst, worker)
if not inst:HasTag("burnt") then
inst.AnimState:PlayAnimation("hit")
inst.AnimState:PushAnimation("closed", true)
if inst.components.container then
inst.components.container:DropEverything()
inst.components.container:Close()
end
end
end
the "inst.components.container:DropEverything()" should not be for roottrunk_child
Steps to Reproduce
1. c_spawn('roottrunk_child').
2.open it, c_give('hammar').
3.c_give("cutgrass"), put cutgrass in container.
4.make sure the root trunk is not closed, and hammer it one time.
5.the cutgrass will drop from the root trunk. But this is not happened when roottrunk is closed.
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now