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 QUARRYCHUNK = "quarry"
|
||||||
local TASK = "task"
|
local TASK = "task"
|
||||||
local FAILED = "failed"
|
local FAILED = "failed"
|
||||||
|
-- Constant local actions
|
||||||
|
local MOVEHERE = "movehere"
|
||||||
-- Constant messsage types
|
-- Constant messsage types
|
||||||
local LOG = "LOG"
|
local LOG = "LOG"
|
||||||
local REQUEST = "REQ"
|
local REQUEST = "REQ"
|
||||||
@ -86,6 +88,10 @@ local function listenForCommands()
|
|||||||
sendDirective(LEADER, HEADING)
|
sendDirective(LEADER, HEADING)
|
||||||
elseif string.find(input, QUARRYCHUNK) == 1 then
|
elseif string.find(input, QUARRYCHUNK) == 1 then
|
||||||
sendDirective(LEADER, input)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user