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 .. "]"
|
"label[0.3,6.3;" .. status .. "]"
|
||||||
end
|
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", {
|
minetest.register_node("techage:ta5_flycontroller", {
|
||||||
description = S("TA5 Fly Controller"),
|
description = S("TA5 Fly Controller"),
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -268,7 +257,7 @@ techage.register_node({"techage:ta5_flycontroller"}, {
|
|||||||
return 2, ""
|
return 2, ""
|
||||||
end,
|
end,
|
||||||
on_node_load = function(pos, node)
|
on_node_load = function(pos, node)
|
||||||
reset_state(pos)
|
M(pos):set_string("status", "")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -85,17 +85,6 @@ local function formspec(nvm, meta)
|
|||||||
"label[0.3,4.3;" .. status .. "]"
|
"label[0.3,4.3;" .. status .. "]"
|
||||||
end
|
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", {
|
minetest.register_node("techage:ta4_movecontroller", {
|
||||||
description = S("TA4 Move Controller"),
|
description = S("TA4 Move Controller"),
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -273,7 +262,7 @@ techage.register_node({"techage:ta4_movecontroller"}, {
|
|||||||
end,
|
end,
|
||||||
on_node_load = function(pos, node)
|
on_node_load = function(pos, node)
|
||||||
M(pos):set_string("teleport_mode", "") -- delete not working (legacy) op mode
|
M(pos):set_string("teleport_mode", "") -- delete not working (legacy) op mode
|
||||||
reset_state(pos)
|
M(pos):set_string("status", "")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -38,15 +38,6 @@ local function formspec(nvm, meta)
|
|||||||
"label[0.3,2.5;" .. status .. "]"
|
"label[0.3,2.5;" .. status .. "]"
|
||||||
end
|
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", {
|
minetest.register_node("techage:ta4_turncontroller", {
|
||||||
description = S("TA4 Turn Controller"),
|
description = S("TA4 Turn Controller"),
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -202,7 +193,7 @@ techage.register_node({"techage:ta4_turncontroller"}, {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_node_load = function(pos, node)
|
on_node_load = function(pos, node)
|
||||||
reset_state(pos)
|
M(pos):set_string("status", "")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user