territory marker changes/fixes: now stack_as_node. now pickup as group by default. now correctly right-clicks into existing stack. go stone now blocks optics

pull/5/head
capitalthree 1 year ago
parent 558a45b705
commit 78da25d42b
  1. 10
      rules.lua
  2. 2
      stones.lua

@ -297,7 +297,10 @@ end
function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing)
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)
end
@ -320,7 +323,10 @@ end
function lc_liberties.handle_dig(pos, node, digger)
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
minetest.node_dig(v, node, digger)
end

@ -61,6 +61,7 @@ local function reg(name, basename, basedef)
snappy = 1,
falling_node = 1,
falling_repose = 1,
optic_opaque = 1,
go_stone = 1
},
@ -106,6 +107,7 @@ local function reg(name, basename, basedef)
falling_node = 1,
falling_repose = 1,
go_territory_marker = 1,
stack_as_node = 1,
},
go_team = name,

Loading…
Cancel
Save