mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-08-20 12:54:05 +02:00
add a "digtron_protected" node group for modders to use if they want to prevent digtrons from digging their nodes
This commit is contained in:
parent
be3bab36e4
commit
12f4a03ef2
@ -13,6 +13,7 @@ The basic nodes that can be assembled into a functioning digging machine are:
|
|||||||
|
|
||||||
A digging machine's components must be connected to the control node via a path leading through the faces of the nodes - diagonal connections across edges and corners don't count.
|
A digging machine's components must be connected to the control node via a path leading through the faces of the nodes - diagonal connections across edges and corners don't count.
|
||||||
|
|
||||||
|
Note for modders: if you wish to make a node impenetrable to Digtron's digging, add it to the "digtron_protected" group.
|
||||||
|
|
||||||
Crafting recipes
|
Crafting recipes
|
||||||
================
|
================
|
||||||
|
2
util.lua
2
util.lua
@ -41,7 +41,7 @@ digtron.mark_diggable = function(pos, nodes_dug)
|
|||||||
local target = minetest.get_node(pos)
|
local target = minetest.get_node(pos)
|
||||||
|
|
||||||
-- prevent digtrons from being marked for digging.
|
-- prevent digtrons from being marked for digging.
|
||||||
if minetest.get_item_group(target.name, "digtron") ~= 0 then
|
if minetest.get_item_group(target.name, "digtron") ~= 0 or minetest.get_item_group(target.name, "digtron_protected") ~= 0 then
|
||||||
return 0, {}
|
return 0, {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user