fix(tunnels-miner): crash at first start

This commit is contained in:
Guillaume ARM 2024-05-26 03:50:55 +02:00
parent c2e63d427a
commit 1747263d26

View File

@ -1,12 +1,12 @@
local STATIC_CONFIG = require('config/tunnels')
local turtleUtils = require('libs/turle-utils')
local turtleUtils = require('libs/turtle-utils')
local IDLE_TIME = 3
local TIME_TO_START = 3
local IDLE_TIME_BETWEEN_TUNNELS = 1
local SPACE_BETWEEN_TUNNELS = 3
local VERSION = "1.0.0"
local VERSION = "1.0.1"
local MOVES_BY_DIRECTION = {
right = {
@ -49,7 +49,7 @@ local function assertValidConfig(config)
error('config.DIRECTION should be "left" or "right"', 0)
end
if config.DISTANCE_Z > 0 then
if config.DISTANCE_Z <= 0 then
error('config.DISTANCE_Z should be a positive number', 0)
end