Fix missing protection violation hook
Remove debug code.
This commit is contained in:
parent
7e5905a9a4
commit
6aca7f5091
@ -58,16 +58,17 @@ function minetest.item_place_node(itemstack, placer, pointed_thing, ...)
|
||||
local pos = nodecore.buildable_to(pointed_thing.under)
|
||||
and pointed_thing.under or pointed_thing.above
|
||||
local name = placer and placer:is_player() and placer:get_player_name()
|
||||
if pos and name and check(pos, itemstack:get_name(), name) then return itemstack end
|
||||
if pos and name and check(pos, itemstack:get_name(), name) then
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return itemstack
|
||||
end
|
||||
return old_place(itemstack, placer, pointed_thing, ...)
|
||||
end
|
||||
|
||||
-- Search for special-case nodes like totes that have custom place logic.
|
||||
local function placedone(...) placing = nil return ... end
|
||||
local function checkdef(name, def)
|
||||
minetest.log(name)
|
||||
if not (def.on_place and match(name)) then return end
|
||||
minetest.log("MATCH!!!!!")
|
||||
local oldp = def.on_place
|
||||
rawset(def, "on_place", function(...)
|
||||
placing = name
|
||||
|
Loading…
x
Reference in New Issue
Block a user