out of bounds check for placement tool
This commit is contained in:
parent
e0046e2d91
commit
493f74d63f
1 changed files with 5 additions and 0 deletions
5
tool.lua
5
tool.lua
|
|
@ -78,6 +78,11 @@ minetest.register_craftitem("protector:tool", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- do not place protector out of map bounds
|
||||||
|
if minetest.find_node_near(pos, 1, {"ignore"}) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- do we have protectors to use ?
|
-- do we have protectors to use ?
|
||||||
local nod
|
local nod
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue