Remove the reset feature again
This commit is contained in:
parent
9a699a361f
commit
ec982b0de0
@ -79,17 +79,6 @@ local function formspec(nvm, meta)
|
||||
"label[0.3,6.3;" .. status .. "]"
|
||||
end
|
||||
|
||||
local function reset_state(pos)
|
||||
local meta = M(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.lpos1 = {}
|
||||
nvm.lpos2 = {}
|
||||
nvm.running = nil
|
||||
nvm.moveBA = false
|
||||
meta:set_string("status", "")
|
||||
meta:set_string("formspec", formspec(nvm, meta))
|
||||
end
|
||||
|
||||
minetest.register_node("techage:ta5_flycontroller", {
|
||||
description = S("TA5 Fly Controller"),
|
||||
tiles = {
|
||||
@ -268,7 +257,7 @@ techage.register_node({"techage:ta5_flycontroller"}, {
|
||||
return 2, ""
|
||||
end,
|
||||
on_node_load = function(pos, node)
|
||||
reset_state(pos)
|
||||
M(pos):set_string("status", "")
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -85,17 +85,6 @@ local function formspec(nvm, meta)
|
||||
"label[0.3,4.3;" .. status .. "]"
|
||||
end
|
||||
|
||||
local function reset_state(pos)
|
||||
local meta = M(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.lpos1 = {}
|
||||
nvm.lpos2 = {}
|
||||
nvm.running = nil
|
||||
nvm.lastpos = nil
|
||||
meta:set_string("status", "")
|
||||
meta:set_string("formspec", formspec(nvm, meta))
|
||||
end
|
||||
|
||||
minetest.register_node("techage:ta4_movecontroller", {
|
||||
description = S("TA4 Move Controller"),
|
||||
tiles = {
|
||||
@ -273,7 +262,7 @@ techage.register_node({"techage:ta4_movecontroller"}, {
|
||||
end,
|
||||
on_node_load = function(pos, node)
|
||||
M(pos):set_string("teleport_mode", "") -- delete not working (legacy) op mode
|
||||
reset_state(pos)
|
||||
M(pos):set_string("status", "")
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -38,15 +38,6 @@ local function formspec(nvm, meta)
|
||||
"label[0.3,2.5;" .. status .. "]"
|
||||
end
|
||||
|
||||
local function reset_state(pos)
|
||||
local meta = M(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.lpos1 = {}
|
||||
nvm.lpos2 = {}
|
||||
meta:set_string("status", "")
|
||||
meta:set_string("formspec", formspec(nvm, meta))
|
||||
end
|
||||
|
||||
minetest.register_node("techage:ta4_turncontroller", {
|
||||
description = S("TA4 Turn Controller"),
|
||||
tiles = {
|
||||
@ -202,7 +193,7 @@ techage.register_node({"techage:ta4_turncontroller"}, {
|
||||
end
|
||||
end,
|
||||
on_node_load = function(pos, node)
|
||||
reset_state(pos)
|
||||
M(pos):set_string("status", "")
|
||||
end,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user