mirror of
https://github.com/minetest-mods/ropes.git
synced 2024-11-28 10:23:44 +01:00
Fixed rope dropping
This commit is contained in:
parent
291f04fa50
commit
ef90e46b34
4
init.lua
4
init.lua
@ -223,11 +223,9 @@ minetest.register_abm({
|
|||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
local p = {x=pos.x, y=pos.y-1, z=pos.z}
|
local p = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
local n = minetest.env:get_node(p)
|
local n = minetest.env:get_node(p)
|
||||||
|
|
||||||
--remove if top node is removed
|
--remove if top node is removed
|
||||||
if n.name == "air" then
|
if n.name == "air" then
|
||||||
minetest.env:remove_node(pos)
|
minetest.env:set_node(pos, {name="vines:rope"})
|
||||||
minetest.env:add_node(pos, {name="vines:rope"})
|
|
||||||
minetest.env:add_node(p, {name="vines:rope_end"})
|
minetest.env:add_node(p, {name="vines:rope_end"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user