Fix water tunnel issues.

master
David G 2019-01-23 20:44:38 -07:00
parent 42aa261230
commit 324a709051
1 changed files with 41 additions and 36 deletions

View File

@ -6,8 +6,8 @@
-- by David G (kestral246@gmail.com) -- by David G (kestral246@gmail.com)
-- and by Mikola -- and by Mikola
-- Version 2.0-beta-3 - 2019-01-23 -- Version 2.0-beta-4 - 2019-01-23
-- Region functions - merge functions and fix bugs. -- First pass verification of water tunnels -- fixed several bugs. Some minor issues need more review.
-- Fix bug #1, in definition of dig_patterns[11]. -- Fix bug #1, in definition of dig_patterns[11].
-- Feature complete, moving from experimental to beta branch. Now on to validation. -- Feature complete, moving from experimental to beta branch. Now on to validation.
-- Config option changes WIP, they won't be permanent. -- Config option changes WIP, they won't be permanent.
@ -706,33 +706,34 @@ local dig_tunnel = function(cdir, user, pointed_thing)
if minetest.check_player_privs(user, "tunneling") then if minetest.check_player_privs(user, "tunneling") then
local dig_patterns = { local dig_patterns = {
-- Orthogonal (north reference). -- Orthogonal (north reference).
[1] = { {{-3, 3},{0,0, 4, 4,4,4,4, 40,0}}, {{-2, 3},{0,0,4, 4,4,4,4, 4,0}}, {{-1, 3},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0, 3},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 1, 3},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2, 3},{0,0,4, 4,4,4,4, 4,0}}, {{ 3, 3},{0,0, 4, 4,4,4,4, 40,0}}, [1] = { {{-3, 3},{0,0, 4, 4,4,4,4, 40,0}}, {{-2, 3},{0,0,4, 4,4,4, 4, 4,0}}, {{-1, 3},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0, 3},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 1, 3},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2, 3},{0,0,4, 4,4,4, 4, 4,0}}, {{ 3, 3},{0,0, 4, 4,4,4,4, 40,0}},
{{-3, 2},{0,0,37, 3,3,3,3, 30,0}}, {{-2, 2},{0,0,7, 1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0}}, {{ 3, 0},{0,0,37, 3,3,3,3, 30,0}}, {{-3, 0},{0,0,37, 3,3,3,3, 30,0}}, {{-2, 0},{0,0,7, 1,1,1,21, 32,0}}, {{-1, 0},{0,86,6, 1,1,1,1, 2,0}}, {{ 0, 0},{0,86,5, 1,1,1, 1, 2,0}}, {{ 1, 0},{0,86,6, 1,1,1,1, 2,0}}, {{ 2, 0},{0,0,7, 1,1,1,21, 32,0}}, {{ 3, 0},{0,0,37, 3,3,3,3, 30,0}},
{{-3,-1},{0,0, 4, 4,4,4,4, 40,0}}, {{-2,-1},{0,0,4, 4,4,4,4, 4,0}}, {{-1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0,-1},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2,-1},{0,0,4, 4,4,4,4, 4,0}}, {{ 3,-1},{0,0, 4, 4,4,4,4, 40,0}}, {{-3,-1},{0,0, 4, 4,4,4,4, 40,0}}, {{-2,-1},{0,0,4, 4,4,4, 4, 4,0}}, {{-1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0,-1},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2,-1},{0,0,4, 4,4,4, 4, 4,0}}, {{ 3,-1},{0,0, 4, 4,4,4,4, 40,0}},
}, },
-- Knight move (north-northwest reference). -- Knight move (north-northwest reference).
[2] = { {{-4, 3},{0,0, 4, 4,4,4,4, 40,0}}, {{-3, 3},{0,0, 4, 4,4,4, 4, 4,0}}, {{-2, 3},{0, 0,4, 4,4,4, 4, 0,0}}, {{-1, 3},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 0, 3},{0, 0,4, 4,4,4,4, 4,0}}, {{ 1, 3},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 2, 3},{0,0,37, 3,3,3, 3, 30,0}}, [2] = { {{-4, 3},{0,0, 4, 4,4,4,4, 40,0}}, {{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 4,4,4, 4, 4,0}}, {{ 0,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 1,-1},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 2,-1},{0,0, 4, 4,4,4, 4, 4,0}}, {{ 3,-1},{0,0, 4, 4,4,4,4, 40,0}},
}, },
-- Diagonal (northwest reference). -- Diagonal (northwest reference).
[3] = { {{-1, 4},{0, 0, 4, 4,4,4, 4, 40,0}}, {{ 0, 4},{0, 0,37, 3,3,3,3, 30,0}}, {{ 1, 4},{0, 0,37, 3,3,3,3, 30,0}}, [3] = { {{-1, 4},{0, 0, 4, 4,4,4, 4, 40,0}}, {{ 0, 4},{0, 0,37, 3,3,3, 3, 30,0}}, {{ 1, 4},{0, 0,37, 3,3,3, 3, 30,0}},
{{-2, 3},{0, 0, 4, 4,4,4, 4, 4,0}}, {{-1, 3},{0, 0, 4, 4,4,4, 4, 4,0}}, {{ 0, 3},{0, 0, 7, 1,1,1,21, 32,0}}, {{ 1, 3},{0, 0,37, 3,3,3,3, 2,0}}, {{ 2, 3},{0,0,37, 3,3,3,3, 30,0}}, {{-2, 3},{0, 0, 4, 4,4,4, 4, 4,0}}, {{-1, 3},{0, 0, 4, 4,4,4, 4, 4,0}}, {{ 0, 3},{0, 0, 7, 1,1,1,21, 32,0}}, {{ 1, 3},{0, 0,37, 3,3,3, 3, 2,0}}, {{ 2, 3},{0,0,37, 3,3,3,3, 30,0}},
{{-3, 2},{0,0, 4, 4,4, 4, 4, 4,0}}, {{-2, 2},{0, 0, 4, 4,4,4, 4, 4,0}}, {{-1, 2},{0, 0, 4, 4,4,4, 4, 4,0}}, {{ 0, 2},{0,86, 6, 1,1,1,1, 2,0}}, {{ 1, 2},{0, 0, 7, 1,1,1,21, 32,0}}, {{ 2, 2},{0,0,37, 3,3,3,3, 2,0}}, {{ 3, 2},{0,0,37, 3,3,3,3, 30,0}}, {{-3, 2},{0,0, 4, 4,4,4, 4, 4,0}}, {{-2, 2},{0, 0, 4, 4,4,4, 4,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 0,-3},{0, 0, 4, 4,4,4, 4, 40,0}},
}, },
-- Orthogonal slope down (north reference). -- Orthogonal slope down (north reference).
-- Review water tunnel (-3,0), (-2,0), (2,0), (3,0) all 1 below ref level (0 and 87) -- not solid seal, but water's not going to go up.
[10] = {{{-3, 3},{0, 4, 4, 4,4,4,40, 0,0}}, {{-2, 3},{0, 4, 4, 4,4, 4, 4, 0,0}}, {{-1, 3},{ 0,4, 4, 4,4,4,4, 0,0}}, {{ 0, 3},{ 0,4, 4, 4,4,4, 4, 0,0}}, {{ 1, 3},{ 0,4, 4, 4,4,4,4, 0,0}}, {{ 2, 3},{0, 4, 4, 4,4, 4, 4, 0,0}}, {{ 3, 3},{0, 4, 4, 4,4,4,40, 0,0}}, [10] = {{{-3, 3},{0, 4, 4, 4,4,4,40, 0,0}}, {{-2, 3},{0, 4, 4, 4,4, 4, 4, 0,0}}, {{-1, 3},{ 0,4, 4, 4,4,4,4, 0,0}}, {{ 0, 3},{ 0,4, 4, 4,4,4, 4, 0,0}}, {{ 1, 3},{ 0,4, 4, 4,4,4,4, 0,0}}, {{ 2, 3},{0, 4, 4, 4,4, 4, 4, 0,0}}, {{ 3, 3},{0, 4, 4, 4,4,4,40, 0,0}},
{{-3, 2},{0,37, 3, 3,3,3, 3, 30,0}}, {{-2, 2},{0, 7, 1, 1,1,21,32, 32,0}}, {{-1, 2},{86,6, 1, 1,1,1,2, 2,0}}, {{ 0, 2},{86,5, 1, 1,1,1, 2, 2,0}}, {{ 1, 2},{86,6, 1, 1,1,1,2, 2,0}}, {{ 2, 2},{0, 7, 1, 1,1,21,32, 32,0}}, {{ 3, 2},{0,37, 3, 3,3,3, 3, 30,0}}, {{-3, 2},{0,37, 3, 3,3,3, 3, 30,0}}, {{-2, 2},{0, 7, 1, 1,1,21,32, 32,0}}, {{-1, 2},{86,6, 1, 1,1,1,2, 2,0}}, {{ 0, 2},{86,5, 1, 1,1,1, 2, 2,0}}, {{ 1, 2},{86,6, 1, 1,1,1,2, 2,0}}, {{ 2, 2},{0, 7, 1, 1,1,21,32, 32,0}}, {{ 3, 2},{0,37, 3, 3,3,3, 3, 30,0}},
{{-3, 1},{0,37, 3, 3,3,3, 3, 30,0}}, {{-2, 1},{0, 7,13, 1,1, 1,21, 32,0}}, {{-1, 1},{86,6,12, 1,1,1,1, 2,0}}, {{ 0, 1},{86,6,12, 1,1,1,77, 2,0}}, {{ 1, 1},{86,6,12, 1,1,1,1, 2,0}}, {{ 2, 1},{0, 7,13, 1,1, 1,21, 32,0}}, {{ 3, 1},{0,37, 3, 3,3,3, 3, 30,0}}, {{-3, 1},{0,37, 3, 3,3,3, 3, 30,0}}, {{-2, 1},{0, 7,13, 1,1, 1,21, 32,0}}, {{-1, 1},{86,6,12, 1,1,1,1, 2,0}}, {{ 0, 1},{86,6,12, 1,1,1,77, 2,0}}, {{ 1, 1},{86,6,12, 1,1,1,1, 2,0}}, {{ 2, 1},{0, 7,13, 1,1, 1,21, 32,0}}, {{ 3, 1},{0,37, 3, 3,3,3, 3, 30,0}},
@ -741,33 +742,38 @@ local dig_tunnel = function(cdir, user, pointed_thing)
}, },
-- Orthogonal slope up (north reference). -- Orthogonal slope up (north reference).
-- Review water tunnel (-3,2), (-2,2), (2,2), 3,2) all at ref level (0 and 87) -- not solid seal, but water's not going to go up.
[11] = {{{-3, 3},{0,0, 0, 4,4,4,4, 4,40}}, {{-2, 3},{0,0, 0, 4,4,4, 4, 4, 4}}, {{-1, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 0, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 1, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 2, 3},{0,0, 0, 4,4,4, 4, 4, 4}}, {{ 3, 3},{0,0, 0, 4,4,4,4, 4,40}}, [11] = {{{-3, 3},{0,0, 0, 4,4,4,4, 4,40}}, {{-2, 3},{0,0, 0, 4,4,4, 4, 4, 4}}, {{-1, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 0, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 1, 3},{0, 0,0, 4,4,4,4, 4,4}}, {{ 2, 3},{0,0, 0, 4,4,4, 4, 4, 4}}, {{ 3, 3},{0,0, 0, 4,4,4,4, 4,40}},
{{-3, 2},{0,0, 0, 37,3,3,3, 3,30}}, {{-2, 2},{0,0,87, 7,1,1, 1, 21,32}}, {{-1, 2},{0,86,8, 6,1,1,1, 1,2}}, {{ 0, 2},{0,86,8, 5,1,1,1, 1,2}}, {{ 1, 2},{0,86,8, 6,1,1,1, 1,2}}, {{ 2, 2},{0,0,87, 7,1,1, 1, 21,32}}, {{ 3, 2},{0,0, 0, 37,3,3,3, 3,30}}, {{-3, 2},{0,0, 0, 37,3,3,3, 3,30}}, {{-2, 2},{0,0,87, 7,1,1, 1, 21,32}}, {{-1, 2},{0,86,8, 6,1,1,1, 1,2}}, {{ 0, 2},{0,86,8, 5,1,1,1, 1,2}}, {{ 1, 2},{0,86,8, 6,1,1,1, 1,2}}, {{ 2, 2},{0,0,87, 7,1,1, 1, 21,32}}, {{ 3, 2},{0,0, 0, 37,3,3,3, 3,30}},
{{-3, 1},{0,0,37, 3,3,3,3, 3,30}}, {{-2, 1},{0,0, 7, 13,1,1, 1, 21,32}}, {{-1, 1},{0,86,6, 12,1,1,1, 1,2}}, {{ 0, 1},{0,86,6, 12,1,1,1, 77,2}}, {{ 1, 1},{0,86,6, 12,1,1,1, 1,2}}, {{ 2, 1},{0,0, 7, 13,1,1, 1, 21,32}}, {{ 3, 1},{0,0,37, 3,3,3,3, 3,30}}, {{-3, 1},{0,0,37, 3,3,3,3, 3,30}}, {{-2, 1},{0,0, 7, 13,1,1, 1, 21,32}}, {{-1, 1},{0,86,6, 12,1,1,1, 1,2}}, {{ 0, 1},{0,86,6, 12,1,1,1, 77,2}}, {{ 1, 1},{0,86,6, 12,1,1,1, 1,2}}, {{ 2, 1},{0,0, 7, 13,1,1, 1, 21,32}}, {{ 3, 1},{0,0,37, 3,3,3,3, 3,30}},
{{-3, 0},{0,0,37, 3,3,3,3, 3,30}}, {{-2, 0},{0,0, 7, 1,1,1,21, 32, 4}}, {{-1, 0},{0,86,6, 1,1,1,1, 2,4}}, {{ 0, 0},{0,86,5, 1,1,1,1, 2,4}}, {{ 1, 0},{0,86,6, 1,1,1,1, 2,4}}, {{ 2, 0},{0,0, 7, 1,1,1,21, 32, 4}}, {{ 3, 0},{0,0,37, 3,3,3,3, 3,30}}, {{-3, 0},{0,0,37, 3,3,3,3, 3,30}}, {{-2, 0},{0,0, 7, 1,1,1,21, 32, 4}}, {{-1, 0},{0,86,6, 1,1,1,1, 2,4}}, {{ 0, 0},{0,86,5, 1,1,1,1, 2,4}}, {{ 1, 0},{0,86,6, 1,1,1,1, 2,4}}, {{ 2, 0},{0,0, 7, 1,1,1,21, 32, 4}}, {{ 3, 0},{0,0,37, 3,3,3,3, 3,30}},
{{-3,-1},{0,0, 4, 4,4,4,4, 40, 0}}, {{-2,-1},{0,0, 4, 4,4,4,4, 4, 0}}, {{-1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2,-1},{0,0, 4, 4,4,4, 4, 4, 0}}, {{ 3,-1},{0,0, 4, 4,4,4,4, 40, 0}}, {{-3,-1},{0,0, 4, 4,4,4,4, 40, 0}}, {{-2,-1},{0,0, 4, 4,4,4, 4, 4, 0}}, {{-1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 0,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 1,-1},{0, 0,4, 4,4,4,4, 4,0}}, {{ 2,-1},{0,0, 4, 4,4,4, 4, 4, 0}}, {{ 3,-1},{0,0, 4, 4,4,4,4, 40, 0}},
}, },
-- Diagonal slope down (northwest reference). -- Diagonal slope down (northwest reference).
[30] = { {{-1, 4},{ 0, 4, 4, 4,4,4, 4, 0,0}}, {{ 0, 4},{ 0,37, 3, 3,3, 3, 3, 30,0}}, {{ 1, 4},{ 0,37, 3, 3,3,3,3, 30,0}}, -- Review water tunnel (-3,0), (0,3) stacked 32 -- with arch, overdoing seal, could raise height of 21 or remove top 32.
{{-1, 3},{ 0, 4, 4, 4,4,4, 4, 4,0}}, {{ 0, 3},{ 0, 7, 1, 1,1,21,32, 32,0}}, {{ 1, 3},{ 0,37, 3, 3,3,3,3, 2,0}}, {{ 2, 3},{0,37,3, 3,3,3,3, 30,0}}, -- Review water tunnel (-1,-2), (2,1) -- not solid seal, but water's not going to go up.
{{-2, 2},{ 0, 4, 4, 4,4,4,4, 4,0}}, {{-1, 2},{ 0, 4, 4, 4,4,4, 4, 4,0}}, {{ 0, 2},{86, 6,14, 1,1, 1, 1, 2,0}}, {{ 1, 2},{ 0, 7,13, 1,1,1,21, 32,0}}, {{ 2, 2},{0,37,3, 3,3,3,3, 2,0}}, {{ 3, 2},{0,0,37, 3,3,3,3, 30,0}}, [30] = { {{-1, 4},{ 0, 4, 4, 4,4,4, 4, 0,0}}, {{ 0, 4},{ 0,37, 3, 3,3, 3, 3, 0,0}}, {{ 1, 4},{ 0,37, 3, 3,3,3, 3, 0,0}},
{{-4, 1},{0, 4,4, 4,4,4,4, 0,0}}, {{-3, 1},{0, 4,4, 4,4, 4, 4, 4,0}}, {{-2, 1},{ 0, 4, 4, 4,4,4,4, 4,0}}, {{-1, 1},{86, 5,11, 1,1,1,77, 2,0}}, {{ 0, 1},{86, 6,12, 1,1, 1, 1, 2,0}}, {{ 1, 1},{86, 8, 6,10,1,1,1, 2,0}}, {{ 2, 1},{0,87,7, 19,1,1,21, 32,0}}, {{ 3, 1},{0,0,37, 3,3,3,3, 30,0}}, {{-1, 3},{ 0, 4, 4, 4,4,4, 4, 4,0}}, {{ 0, 3},{ 0, 7, 1, 1,1,21,32, 32,0}}, {{ 1, 3},{ 0,37, 3, 3,3,3, 3, 2,0}}, {{ 2, 3},{0,37,3, 3,3,3, 3, 30,0}},
{{-4, 0},{0,37,3, 3,3,3,3, 0,0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,-2},{ 0, 0, 4, 4,4, 4, 4, 4,0}}, {{-4, 0},{0,37,3, 3,3,3,3, 0,0}}, {{-3, 0},{0, 7,1, 1,1,21,32, 32,0}}, {{-2, 0},{86, 6,14, 1,1,1, 1, 2,0}}, {{-1, 0},{86, 6,12, 1,1,1, 1, 2,0}}, {{ 0, 0},{86, 8, 5, 10,1, 1, 1, 2,0}}, {{ 1, 0},{ 0, 0, 4, 4,4,4, 4, 4,0}}, {{ 2, 0},{0, 0,4, 4,4,4, 4, 4,0}}, {{ 3, 0},{0,0, 4, 4,4,4,4, 40,0}},
{{-2,-3},{ 0, 0,37, 3,3,3,3, 30,0}}, {{-1,-3},{ 0, 0,37, 3,3,3, 3, 30,0}}, {{ 0,-3},{ 0, 0, 4, 4,4, 4, 4, 40,0}}, {{-4,-1},{0,37,3, 3,3,3,3, 0,0}}, {{-3,-1},{0,37,3, 3,3, 3, 3, 2,0}}, {{-2,-1},{ 0, 7,13, 1,1,1,21, 32,0}}, {{-1,-1},{86, 8, 6, 10,1,1, 1, 2,0}}, {{ 0,-1},{ 0, 0, 4, 4,4, 4, 4, 4,0}}, {{ 1,-1},{ 0, 0, 4, 4,4,4, 4, 4,0}},
{{-3,-2},{0,37,3, 3,3, 3, 3, 30,0}}, {{-2,-2},{ 0,37, 3, 3,3,3, 3, 2,0}}, {{-1,-2},{ 0,87, 7, 19,1,1,21, 32,0}}, {{ 0,-2},{ 0, 0, 4, 4,4, 4, 4, 4,0}},
{{-2,-3},{ 0, 0,37, 3,3,3, 3, 30,0}}, {{-1,-3},{ 0, 0,37, 3,3,3, 3, 30,0}}, {{ 0,-3},{ 0, 0, 4, 4,4, 4, 4, 40,0}},
}, },
-- Diagonal slope up (northwest reference). -- Diagonal slope up (northwest reference).
[31] = { {{-1, 4},{0, 0, 0, 4,4,4, 4, 4, 4}}, {{ 0, 4},{0, 0, 0, 37,3,3,3, 3, 3}}, {{ 1, 4},{0, 0,37, 3,3,3,3, 3, 3}}, -- Review water tunnel (-2,-3), (-1,-3), (0,-3), (3,0), (3,1), (3,2) -- without arch, same as slope down, overdoing seal.
{{-1, 3},{0, 0, 0, 4,4,4, 4, 4, 4}}, {{ 0, 3},{0, 0,87, 7,1,1,1, 21,32}}, {{ 1, 3},{0, 0,37, 3,3,3,3, 3, 3}}, {{ 2, 3},{0,0,37, 3,3,3,3, 3,30}}, -- Review water tunnel (-3,0), (0,3) -- not solid seal, but water's not going to go up.
{{-2, 2},{0, 0, 0, 4,4,4,4, 4, 4}}, {{-1, 2},{0, 0, 0, 4,4,4, 4, 4, 4}}, {{ 0, 2},{0,86, 8, 6,1,1,1, 1, 2}}, {{ 1, 2},{0, 0, 7, 13,1,1,1, 21,32}}, {{ 2, 2},{0,0,37, 3,3,3,3, 3, 3}}, {{ 3, 2},{0,0,37, 3,3,3,3, 3,30}}, [31] = { {{-1, 4},{0, 0, 0, 4,4,4, 4, 4,40}}, {{ 0, 4},{0, 0, 0, 37,3,3,3, 3,30}}, {{ 1, 4},{0, 0,37, 3,3,3,3, 3,30}},
{{-4, 1},{0,0,0, 4,4,4,4, 4,4}}, {{-3, 1},{0,0, 0, 4,4,4,4, 4, 4}}, {{-2, 1},{0, 0, 0, 4,4,4,4, 4, 4}}, {{-1, 1},{0,86, 8, 5,1,1, 1, 77, 2}}, {{ 0, 1},{0,86, 6, 12,1,1,1, 1, 2}}, {{ 1, 1},{0,86, 6, 14,1,1,1, 1, 2}}, {{ 2, 1},{0,0, 7, 1,1,1,21, 32, 4}}, {{ 3, 1},{0,0,37, 3,3,3,3, 3,30}}, {{-1, 3},{0, 0, 0, 4,4,4, 4, 4, 4}}, {{ 0, 3},{0, 0,87, 7,1,1,1, 21,32}}, {{ 1, 3},{0, 0,37, 3,3,3,3, 3, 3}}, {{ 2, 3},{0,0,37, 3,3,3,3, 3,30}},
{{-4, 0},{0,0,0, 37,3,3,3, 3,3}}, {{-3, 0},{0,0,87, 7,1,1,1, 21,32}}, {{-2, 0},{0,86, 8, 6,1,1,1, 1, 2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,1,1, 21,32}}, {{-2, 0},{0,86, 8, 6,1,1,1, 1, 2}}, {{-1, 0},{0,86, 6, 12,1,1, 1, 1, 2}}, {{ 0, 0},{0,86, 5, 11,1,1,1, 1, 2}}, {{ 1, 0},{0, 0, 4, 4,4,4,4, 4, 4}}, {{ 2, 0},{0,0, 4, 4,4,4,4, 4, 4}}, {{ 3, 0},{0,0, 4, 4,4,4,4, 4,0}},
{{-2,-3},{0, 0,37, 3,3,3,3, 3,30}}, {{-1,-3},{0, 0,37, 3,3,3, 3, 3,30}}, {{ 0,-3},{0, 0, 4, 4,4,4,4, 4,40}}, {{-4,-1},{0,0,3, 37,3,3,3, 3,30}}, {{-3,-1},{0,0,37, 3,3,3,3, 3, 3}}, {{-2,-1},{0, 0, 7, 13,1,1,1, 21,32}}, {{-1,-1},{0,86, 6, 14,1,1, 1, 1, 2}}, {{ 0,-1},{0, 0, 4, 4,4,4,4, 4, 4}}, {{ 1,-1},{0, 0, 4, 4,4,4,4, 4, 4}},
{{-3,-2},{0,0,37, 3,3,3,3, 3,30}}, {{-2,-2},{0, 0,37, 3,3,3,3, 3, 3}}, {{-1,-2},{0, 0, 7, 1,1,1,21, 32, 4}}, {{ 0,-2},{0, 0, 4, 4,4,4,4, 4, 4}},
{{-2,-3},{0, 0,37, 3,3,3,3, 3, 0}}, {{-1,-3},{0, 0,37, 3,3,3, 3, 3, 0}}, {{ 0,-3},{0, 0, 4, 4,4,4,4, 4, 0}},
}, },
} }
@ -783,7 +789,7 @@ local dig_tunnel = function(cdir, user, pointed_thing)
} }
-- Pass horizontal and vertical directions to region functions. -- Pass horizontal and vertical directions to region functions.
-- Horizontal needed for angledstairs nodes, vertical should help combine functions. -- Horizontal needed for angledstairs nodes, vertical helped combine functions.
local dir = {} local dir = {}
if cdir >= 24 then if cdir >= 24 then
dir.horiz = (cdir - 24) * 2 dir.horiz = (cdir - 24) * 2
@ -800,7 +806,6 @@ local dig_tunnel = function(cdir, user, pointed_thing)
local flip = dig_lookup[cdir][2] local flip = dig_lookup[cdir][2]
local rotation = dig_lookup[cdir][3] local rotation = dig_lookup[cdir][3]
run_list(dig_list, flip, rotation, dir, user, pointed_thing) run_list(dig_list, flip, rotation, dir, user, pointed_thing)
-- region1(lighting_search_radius, user, pointed_thing)
end end
end end