diff --git a/move_controller/flycontroller.lua b/move_controller/flycontroller.lua index ecfadb5..70a21b3 100644 --- a/move_controller/flycontroller.lua +++ b/move_controller/flycontroller.lua @@ -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, }) diff --git a/move_controller/movecontroller.lua b/move_controller/movecontroller.lua index 8ed5360..5f7ce00 100644 --- a/move_controller/movecontroller.lua +++ b/move_controller/movecontroller.lua @@ -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, }) diff --git a/move_controller/turncontroller.lua b/move_controller/turncontroller.lua index 6f13f7d..10fb4cb 100644 --- a/move_controller/turncontroller.lua +++ b/move_controller/turncontroller.lua @@ -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, })