sneak works in addition to aux1, for inverting pickup-as-group or placing single territory markers

master
capitalthree 6 months ago
parent cbc2d2c1a7
commit 8fb6fcc381
  1. 7
      rules.lua

@ -346,7 +346,9 @@ function lc_liberties.handle_placement(pos)
end
function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing)
if (placer.get_player_control and placer:get_player_control().aux1)
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
@ -374,7 +376,8 @@ end
function lc_liberties.handle_dig(pos, node, digger)
cache = {}
if (digger.get_player_control and digger:get_player_control().aux1)
local control = digger.get_player_control and digger:get_player_control()
if (control and (control.aux1 or control.sneak))
~=
(minetest.registered_items[node.name].groups.go_territory_marker ~= nil)
then

Loading…
Cancel
Save