diff --git a/init.lua b/init.lua index 41e2c2f..19c5140 100644 --- a/init.lua +++ b/init.lua @@ -58,6 +58,8 @@ techage.collider_min_depth = tonumber(minetest.settings:get("techage_collider_mi techage.recipe_checker_enabled = minetest.settings:get_bool("techage_recipe_checker_enabled") ~= false techage.stair_aliases_enabled = minetest.settings:get_bool("techage_stair_aliases_enabled") ~= false techage.disable_lava_above_sea_level = minetest.settings:get_bool("techage_disable_lava_above_sea_level") ~= false +techage.maximum_move_controller_distance = tonumber(minetest.settings:get("techage_maximum_move_controller_distance")) or 400 +techage.maximum_move_controller_blocks = tonumber(minetest.settings:get("techage_maximum_move_controller_blocks")) or 16 -- allow to load marshal and sqlite3 techage.IE = minetest.request_insecure_environment() diff --git a/logic/sequencer2.lua b/logic/sequencer2.lua index ad6c46c..ec542a4 100644 --- a/logic/sequencer2.lua +++ b/logic/sequencer2.lua @@ -353,10 +353,9 @@ local INFO = [[Commands: 'goto ', 'stop', 'on', 'off']] techage.register_node({"techage:ta4_sequencer"}, { on_recv_message = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) - if (topic == "goto" or topic == "on") and not nvm.running and not delayed_start then - local mem = techage.get_mem(pos) + if (topic == "goto" or topic == "on") and not nvm.running then nvm.running = true - mem.idx = tonumber(payload or 1) or 1 + nvm.idx = tonumber(payload or 1) or 1 restart_timer(pos, 1) logic.infotext(M(pos), S("TA4 Sequencer"), S("running")) elseif topic == "stop" or (topic == "off" and M(pos):get_int("ignore_off") == 0) then @@ -372,7 +371,7 @@ techage.register_node({"techage:ta4_sequencer"}, { on_beduino_receive_cmnd = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) if topic == 13 then - if payload[1] ~= 0 and not nvm.running and not delayed_start then + if payload[1] ~= 0 and not nvm.running then nvm.running = true nvm.idx = tonumber(payload or 1) or 1 restart_timer(pos, 1) diff --git a/move_controller/movecontroller.lua b/move_controller/movecontroller.lua index da9f0e4..2e5493f 100644 --- a/move_controller/movecontroller.lua +++ b/move_controller/movecontroller.lua @@ -22,8 +22,8 @@ local MP = minetest.get_modpath("techage") local mark = dofile(MP .. "/basis/mark_lib.lua") local fly = techage.flylib -local MAX_DIST = 1000 -local MAX_BLOCKS = 16 +local MAX_DIST = techage.maximum_move_controller_distance +local MAX_BLOCKS = techage.maximum_move_controller_blocks local WRENCH_MENU = { { diff --git a/settingtypes.txt b/settingtypes.txt index 1ee3153..83a55d9 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -44,3 +44,9 @@ techage_stair_aliases_enabled (Enable stair aliases) bool false # Disable lava above sea level (to prevent griefing) techage_disable_lava_above_sea_level (Disable lava above sea level) bool true + +# Maximum distance for the TA4 move controller +techage_maximum_move_controller_distance (Maximum distance for the TA4 move controller) int 400 + +# Maximum number of blocks for the TA4 move controller +techage_maximum_move_controller_blocks (Maximum number of blocks for the TA4 move controller) int 16