The current check for existing protectors:
if #core.find_nodes_in_area(vector.subtract(pos, 1), vector.add(pos, 1),
opens an edge case where two protectors placed at a distance of (protector.radius * 2) + 1 will leave a single-node-wide unprotected gap between them.
The placer checks for protector nodes within a 1-node radius, and prevents adjacent placement when adjacency is needed to fully cover protection radius.
For players, the expected behavior of the placer tool is that it always places a new protector at a distance to protect the area between an existing protector and the new one.
As a local workaround (not a suggested fix), replacing find_nodes_in_area with get_node produces the expected behavior:
if core.get_node(pos).name:match("^protector:protect[%a%d_]*$") then
core.chat_send_player(name, S("Protector already in place!"))
return
end
The current check for existing protectors:
https://codeberg.org/tenplus1/protector/src/commit/b4d62961070be13a180900b1ad85d333ad46127b/tool.lua#L66
opens an edge case where two protectors placed at a distance of `(protector.radius * 2) + 1` will leave a single-node-wide unprotected gap between them.
The placer checks for protector nodes within a 1-node radius, and prevents adjacent placement when adjacency is needed to fully cover protection radius.
For players, the expected behavior of the placer tool is that it always places a new protector at a distance to protect the area between an existing protector and the new one.
As a local workaround (not a suggested fix), replacing find_nodes_in_area with get_node produces the expected behavior:
```lua
if core.get_node(pos).name:match("^protector:protect[%a%d_]*$") then
core.chat_send_player(name, S("Protector already in place!"))
return
end
```