feat(miner): add 3s delay at start
This commit is contained in:
parent
ffccce4700
commit
50cecdee4d
@ -14,6 +14,7 @@ local MAX_Y = INITIAL_TARGET_Y + (config.height - 1)
|
||||
local MAX_Z = TARGET_Z
|
||||
|
||||
local MIN_PERCENTAGE_NEEDED = 10
|
||||
local TIME_TO_START = 3
|
||||
|
||||
local miner = {
|
||||
robot = robotApi.create(),
|
||||
@ -138,8 +139,12 @@ local function checkConfig()
|
||||
end
|
||||
end
|
||||
|
||||
local function minerStarted()
|
||||
local function startMiner()
|
||||
turtle.select(1)
|
||||
|
||||
print('Miner will starting in ' .. TIME_TO_START .. ' seconds...')
|
||||
os.sleep(TIME_TO_START)
|
||||
|
||||
miner.started = true
|
||||
print("> Miner program started, minimum percentgae fuel needed: " .. MIN_PERCENTAGE_NEEDED)
|
||||
end
|
||||
@ -344,7 +349,7 @@ if not miner.started then
|
||||
while not waitForUserConfirmation() do end
|
||||
end
|
||||
|
||||
minerStarted()
|
||||
startMiner()
|
||||
saveMinerState()
|
||||
|
||||
while not isProgramFinished() do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user