mirror of
https://github.com/minetest-mods/towercrane.git
synced 2024-11-26 01:03:45 +01:00
hook bugfix
This commit is contained in:
parent
d19e401fb5
commit
37479a77b7
10
init.lua
10
init.lua
@ -11,6 +11,7 @@
|
||||
|
||||
History:
|
||||
2017-06-04 v0.01 first version
|
||||
2017-06-06 v0.02 Hook bugfix
|
||||
]]--
|
||||
|
||||
|
||||
@ -311,9 +312,16 @@ minetest.register_node("towercrane:base", {
|
||||
local height = meta:get_int("height")
|
||||
local width = meta:get_int("width")
|
||||
|
||||
-- remove crane
|
||||
if dir ~= nil and height ~= nil and width ~= nil then
|
||||
dig_crane(pos, dir, height, width)
|
||||
end
|
||||
-- remove hook
|
||||
local id = minetest.hash_node_position(pos)
|
||||
if towercrane.id then
|
||||
towercrane.id:remove()
|
||||
towercrane.id = nil
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@ -383,8 +391,6 @@ minetest.register_node("towercrane:mast_ctrl_on", {
|
||||
if towercrane.id then
|
||||
towercrane.id:remove()
|
||||
towercrane.id = nil
|
||||
else
|
||||
|
||||
end
|
||||
end,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user