mirror of
https://github.com/minetest-mods/digtron.git
synced 2025-01-03 09:37:27 +01:00
prevent digging of immortal nodes
This commit is contained in:
parent
5985788181
commit
d4a03478e2
4
util.lua
4
util.lua
@ -45,7 +45,9 @@ digtron.mark_diggable = function(pos, nodes_dug, player)
|
||||
local target = minetest.get_node(pos)
|
||||
|
||||
-- prevent digtrons from being marked for digging.
|
||||
if minetest.get_item_group(target.name, "digtron") ~= 0 or minetest.get_item_group(target.name, "digtron_protected") ~= 0 then
|
||||
if minetest.get_item_group(target.name, "digtron") ~= 0 or
|
||||
minetest.get_item_group(target.name, "digtron_protected") ~= 0 or
|
||||
minetest.get_item_group(target.name, "immortal") ~= 0 then
|
||||
return 0
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user