mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
Placing fences now takes into account protection systems
This commit is contained in:
parent
8df6442311
commit
618aa5f167
@ -115,11 +115,20 @@ minetest.register_node(":default:sign_wall", {
|
|||||||
groups = sign_groups,
|
groups = sign_groups,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local def = minetest.registered_nodes[minetest.env:get_node(pointed_thing.above).name]
|
local name
|
||||||
if homedecor_node_is_owned(pointed_thing.above, placer)
|
name = minetest.env:get_node(pointed_thing.under).name
|
||||||
or (not def.buildable_to) then
|
if fences_with_sign[name] then
|
||||||
return itemstack
|
if homedecor_node_is_owned(pointed_thing.under, placer) then
|
||||||
end
|
return itemstack
|
||||||
|
end
|
||||||
|
else
|
||||||
|
name = minetest.env:get_node(pointed_thing.above).name
|
||||||
|
local def = minetest.registered_nodes[name]
|
||||||
|
if homedecor_node_is_owned(pointed_thing.above, placer)
|
||||||
|
or (not def.buildable_to) then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local node=minetest.env:get_node(pointed_thing.under)
|
local node=minetest.env:get_node(pointed_thing.under)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user