Added host side command for quarrying.
This commit is contained in:
@@ -12,7 +12,7 @@ local MOVETO = "moveto"
|
||||
local STATUS = "status"
|
||||
local POSITION = "position"
|
||||
local HEADING = "heading"
|
||||
local QUARRYCHUNK = "quarry"
|
||||
local QUARRY = "quarry"
|
||||
local TASK = "task"
|
||||
local FAILED = "failed"
|
||||
-- Constant messaging
|
||||
@@ -421,8 +421,10 @@ local function quarry(x, y, z, forward, right, pattern)
|
||||
end
|
||||
if (y > 0) then
|
||||
attemptMoveUp();
|
||||
elseif (y < 0) then
|
||||
attemptMoveDown();
|
||||
else
|
||||
if not attemptMoveDown() then
|
||||
sendLog(FAILED, "Unable to move further down for quarrying.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -515,7 +517,9 @@ local function listen()
|
||||
elseif data["request"] == QUARRY then
|
||||
if heading ~= nil then
|
||||
quarry(data["content"][1], data["content"][2], data["content"][3], heading, rightAxis)
|
||||
sendLog(QUARRY, "Using actual position for quarrying.")
|
||||
else
|
||||
sendLog(QUARRY, "Using relative position for quarrying.")
|
||||
quarry(data["content"][1], data["content"][2], data["content"][3], relHeading, relRightAxis)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user