Don't try to remove node from invalid network master
This commit is contained in:
parent
5b5816a65c
commit
4ac7210f40
3
api.lua
3
api.lua
@ -514,6 +514,9 @@ end
|
|||||||
|
|
||||||
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
||||||
local meta=minetest.get_meta(pos)
|
local meta=minetest.get_meta(pos)
|
||||||
|
if not meta:contains("industrialtest.network") then
|
||||||
|
return
|
||||||
|
end
|
||||||
local network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
local network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
||||||
local removed=false
|
local removed=false
|
||||||
for key,node in ipairs(network) do
|
for key,node in ipairs(network) do
|
||||||
|
Loading…
Reference in New Issue
Block a user