diff --git a/rules.lua b/rules.lua index f0febba..92392c7 100644 --- a/rules.lua +++ b/rules.lua @@ -348,13 +348,18 @@ end function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing) local control = placer.get_player_control and placer:get_player_control() - if (control and (control.aux1 or control.sneak)) - or - (pointed_thing and pointed_thing.under and minetest.get_node(pointed_thing.under).name == "nc_items:stack") - then + if (control and (control.aux1 or control.sneak)) then return minetest.item_place(itemstack, placer, pointed_thing) end + if (pointed_thing and pointed_thing.under) then + local under = minetest.get_node(pointed_thing.under) + local override_rightclick = minetest.registered_nodes[under.name].on_rightclick + if override_rightclick then + return override_rightclick(pointed_thing.under, under, placer, itemstack, pointed_thing) + end + end + if pointed_thing and pointed_thing.above then cache = {}