mirror of
https://github.com/kepler155c/opus
synced 2025-10-15 15:57:40 +00:00
Overlapping windows
This commit is contained in:
@@ -57,10 +57,12 @@ function turtle.run(fn, ...)
|
||||
local e, id, abort = os.pullEventRaw('turtle_ticket')
|
||||
if e == 'terminate' then
|
||||
releaseTicket(ticketId)
|
||||
os.queueEvent('turtle_response')
|
||||
error('Terminated')
|
||||
end
|
||||
if abort then
|
||||
-- the function was queued, but the queue was cleared
|
||||
os.queueEvent('turtle_response')
|
||||
return false, 'aborted'
|
||||
end
|
||||
if id == ticketId then
|
||||
@@ -72,6 +74,7 @@ function turtle.run(fn, ...)
|
||||
if not s and m then
|
||||
printError(m)
|
||||
end
|
||||
os.queueEvent('turtle_response')
|
||||
return s, m
|
||||
end
|
||||
end
|
||||
|
@@ -17,6 +17,7 @@ local state = {
|
||||
moveDig = noop,
|
||||
moveCallback = noop,
|
||||
locations = {},
|
||||
coordSystem = 'relative', -- type of coordinate system being used
|
||||
}
|
||||
|
||||
function turtle.getState()
|
||||
@@ -44,6 +45,7 @@ function turtle.reset()
|
||||
state.moveDig = noop
|
||||
state.moveCallback = noop
|
||||
state.locations = {}
|
||||
state.coordSystem = 'relative'
|
||||
|
||||
return true
|
||||
end
|
||||
@@ -231,7 +233,6 @@ turtle.digPolicies = {
|
||||
if not turtle.isTurtleAtSide(action.side) then
|
||||
return action.dig()
|
||||
end
|
||||
|
||||
return Util.tryTimes(6, function()
|
||||
-- if not turtle.isTurtleAtSide(action.side) then
|
||||
-- return true --action.dig()
|
||||
|
Reference in New Issue
Block a user