This commit is contained in:
kaadmy 2015-11-15 08:11:23 -08:00
commit b59126db20

View File

@ -1,4 +1,3 @@
--
-- Crafting items
--
@ -102,6 +101,9 @@ minetest.register_craftitem(
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
local pos_protected = minetest.get_pointed_thing_position(pointed_thing, true)
if minetest.is_protected(pos_protected, user) then return end
itemstack:take_item()
local inv=user:get_inventory()
@ -135,6 +137,9 @@ minetest.register_craftitem(
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
local pos_protected = minetest.get_pointed_thing_position(pointed_thing, true)
if minetest.is_protected(pos_protected, user) then return end
itemstack:take_item()
local inv=user:get_inventory()
@ -168,6 +173,9 @@ minetest.register_craftitem(
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
local pos_protected = minetest.get_pointed_thing_position(pointed_thing, true)
if minetest.is_protected(pos_protected, user) then return end
itemstack:take_item()
local inv=user:get_inventory()
@ -280,4 +288,4 @@ minetest.register_craftitem(
end,
})
default.log("craftitems", "loaded")
default.log("craftitems", "loaded")