mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 20:32:22 +01:00
Was only testing controller node for player protection
This commit is contained in:
parent
444411936c
commit
2b84b4a3da
@ -94,6 +94,12 @@ function DigtronLayout.create(pos, player)
|
|||||||
self.protected:set(testpos.x, testpos.y, testpos.z, true)
|
self.protected:set(testpos.x, testpos.y, testpos.z, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local is_protected = false
|
||||||
|
if minetest.is_protected(testpos, player:get_player_name()) and not minetest.check_player_privs(player, "protection_bypass") then
|
||||||
|
self.protected:set(testpos.x, testpos.y, testpos.z, true)
|
||||||
|
is_protected = true
|
||||||
|
end
|
||||||
|
|
||||||
local group_number = minetest.get_item_group(node.name, "digtron")
|
local group_number = minetest.get_item_group(node.name, "digtron")
|
||||||
if group_number > 0 then
|
if group_number > 0 then
|
||||||
@ -116,7 +122,7 @@ function DigtronLayout.create(pos, player)
|
|||||||
table.insert(self.fuelstores, node_image)
|
table.insert(self.fuelstores, node_image)
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.is_protected(pos, player:get_player_name()) and not minetest.check_player_privs(player, "protection_bypass") then
|
if is_protected then
|
||||||
self.contains_protected_node = true
|
self.contains_protected_node = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user