@ -297,7 +297,10 @@ end
function lc_liberties . handle_territory_fill ( itemstack , placer , pointed_thing )
function lc_liberties . handle_territory_fill ( itemstack , placer , pointed_thing )
cache = { }
cache = { }
if placer.get_player_control and placer : get_player_control ( ) . aux1 then
if ( placer.get_player_control and placer : get_player_control ( ) . aux1 )
or
( pointed_thing and pointed_thing.under and minetest.get_node ( pointed_thing.under ) . name == " nc_items:stack " )
then
return minetest.item_place ( itemstack , placer , pointed_thing )
return minetest.item_place ( itemstack , placer , pointed_thing )
end
end
@ -320,7 +323,10 @@ end
function lc_liberties . handle_dig ( pos , node , digger )
function lc_liberties . handle_dig ( pos , node , digger )
cache = { }
cache = { }
if digger.get_player_control and digger : get_player_control ( ) . aux1 then
if ( digger.get_player_control and digger : get_player_control ( ) . aux1 )
~=
( minetest.registered_items [ node.name ] . groups.go_territory_marker ~= nil )
then
for i , v in pairs ( connected_group ( pos ) . stones ) do
for i , v in pairs ( connected_group ( pos ) . stones ) do
minetest.node_dig ( v , node , digger )
minetest.node_dig ( v , node , digger )
end
end