Fix place node on wall
This commit is contained in:
parent
0f0c6cfa54
commit
67853cb7da
@ -280,8 +280,11 @@ hardtorch.register_tool = function(torchname, def)
|
|||||||
if hardtorch.registered_torchs[torchname].nodes_off then
|
if hardtorch.registered_torchs[torchname].nodes_off then
|
||||||
itemstack:set_name(hardtorch.registered_torchs[torchname].nodes_off.node)
|
itemstack:set_name(hardtorch.registered_torchs[torchname].nodes_off.node)
|
||||||
end
|
end
|
||||||
if not minetest.item_place(itemstack, placer, pointed_thing) then
|
|
||||||
return itemstack
|
local sucess
|
||||||
|
itemstack, sucess = minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
|
if sucess == nil then
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Remove item from inventory
|
-- Remove item from inventory
|
||||||
@ -408,9 +411,9 @@ hardtorch.register_tool = function(torchname, def)
|
|||||||
itemstack:set_name(def.nodes.node_wall or def.nodes.node)
|
itemstack:set_name(def.nodes.node_wall or def.nodes.node)
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack = minetest.item_place(itemstack, placer, pointed_thing, wdir)
|
local sucess
|
||||||
|
itemstack, sucess = minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
if not itemstack then
|
if sucess == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user