Compare commits
No commits in common. "9a8f81e428bb1316b8628dfe1897e7a111e753f7" and "c7d317512b3bdedb45bf52e2010ee8099c389aed" have entirely different histories.
9a8f81e428
...
c7d317512b
1 changed files with 8 additions and 11 deletions
19
mine.lua
19
mine.lua
|
|
@ -254,14 +254,6 @@ function mine (block)
|
||||||
local height = block.v2.y + offset
|
local height = block.v2.y + offset
|
||||||
local start_v = copy_v(block.v1)
|
local start_v = copy_v(block.v1)
|
||||||
local end_v = block.v1 + block.v2
|
local end_v = block.v1 + block.v2
|
||||||
if height > 2 then
|
|
||||||
start_v = start_v + UNIT_Y
|
|
||||||
end_v = end_v - UNIT_Y
|
|
||||||
elseif height < -2 then
|
|
||||||
start_v = start_v - UNIT_Y
|
|
||||||
end_v = end_v + UNIT_Y
|
|
||||||
end
|
|
||||||
moveAbs(start_v)
|
|
||||||
if height % 3 == 0 then
|
if height % 3 == 0 then
|
||||||
mode.mine = { up = true, forward = true, down = true }
|
mode.mine = { up = true, forward = true, down = true }
|
||||||
elseif height == 2 then
|
elseif height == 2 then
|
||||||
|
|
@ -271,6 +263,14 @@ function mine (block)
|
||||||
mode.mine = { forward = true, down = true }
|
mode.mine = { forward = true, down = true }
|
||||||
end_v = end_v + UNIT_Y
|
end_v = end_v + UNIT_Y
|
||||||
end
|
end
|
||||||
|
if height > 2 then
|
||||||
|
start_v = start_v + UNIT_Y
|
||||||
|
end_v = end_v - UNIT_Y
|
||||||
|
elseif height < -2 then
|
||||||
|
start_v = start_v - UNIT_Y
|
||||||
|
end_v = end_v + UNIT_Y
|
||||||
|
end
|
||||||
|
moveAbs(start_v)
|
||||||
moveAbs(end_v)
|
moveAbs(end_v)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -286,9 +286,6 @@ function splitHorizontal (block)
|
||||||
-- Future work: potentially split a large block into smaller blocks
|
-- Future work: potentially split a large block into smaller blocks
|
||||||
-- based on currentPos (think splitting down the middle instead of
|
-- based on currentPos (think splitting down the middle instead of
|
||||||
-- splitting off of one end)
|
-- splitting off of one end)
|
||||||
local differentSigns = function (a, b)
|
|
||||||
return math.abs(a + b) < math.abs(a) + math.abs(b)
|
|
||||||
end
|
|
||||||
local bigBlock = function (block)
|
local bigBlock = function (block)
|
||||||
return (block.v2.x >= BIG_DIM) and (block.v2.z >= BIG_DIM)
|
return (block.v2.x >= BIG_DIM) and (block.v2.z >= BIG_DIM)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue