Added a move here action.
This commit is contained in:
parent
1bdc320818
commit
118a692b3a
@ -19,6 +19,8 @@ local HEADING = "heading"
|
||||
local QUARRYCHUNK = "quarry"
|
||||
local TASK = "task"
|
||||
local FAILED = "failed"
|
||||
-- Constant local actions
|
||||
local MOVEHERE = "movehere"
|
||||
-- Constant messsage types
|
||||
local LOG = "LOG"
|
||||
local REQUEST = "REQ"
|
||||
@ -86,6 +88,10 @@ local function listenForCommands()
|
||||
sendDirective(LEADER, HEADING)
|
||||
elseif string.find(input, QUARRYCHUNK) == 1 then
|
||||
sendDirective(LEADER, input)
|
||||
elseif string.find(input, MOVEHERE) == 1 then
|
||||
local x,y,z = gps.locate()
|
||||
y = y + 1
|
||||
sendDirective(LEADER, MOVETO, x, y, z)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user