Disallow placing light on each other

master
PilzAdam 2015-11-01 15:03:38 +01:00
parent cdcde267c3
commit 4d150af357
1 changed files with 7 additions and 0 deletions

View File

@ -675,6 +675,13 @@ minetest.register_node("score:light", {
on_drop = function(itemstack, dropper, pos)
return itemstack
end,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local under = minetest.get_node(pointed_thing.under)
if under.name == "score:light" then
minetest.remove_node(pos)
return true
end
end,
})
minetest.register_craftitem("score:score", {