From 6b01ff3007f4488db5bd0d81a9e4f3abdc1c6f08 Mon Sep 17 00:00:00 2001 From: David G Date: Sun, 15 Jul 2018 17:29:51 -0700 Subject: [PATCH] Tweak digging pattern and add mod.conf --- init.lua | 17 +++++------------ mod.conf | 3 +++ 2 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 mod.conf diff --git a/init.lua b/init.lua index 63a1ddc..be607ae 100644 --- a/init.lua +++ b/init.lua @@ -2,6 +2,10 @@ -- Another tunnel digging mod for minetest. -- by David G (kestral246@gmail.com) +-- Version 0.9.3 +-- Tweak cdir == 2 (nw) digging pattern. +-- Clean up some old debug statements. + -- Version 0.9.2 -- Continue work making tunnelmaker play nice with advtrains track. -- Per Orwell's request, changed method for determining if node is advtrains track. @@ -103,11 +107,6 @@ minetest.register_globalstep(function(dtime) --don't mess with the rest of this if they don't have a tunnelmaker --update to remove legacy get_look_yaw function if gotatunnelmaker then --- local pos = player:getpos() --- local dir = player:get_look_yaw() --- local angle_north = 0 --- local angle_dir = 90 - math.deg(dir) --- local angle_relative = (angle_north - angle_dir) % 360 local dir = player:get_look_horizontal() local angle_relative = math.deg(dir) local tunnelmaker_image = math.floor((angle_relative/22.5) + 0.5)%16 @@ -241,14 +240,12 @@ local check_ceiling = function(x, y, z, user, pointed_thing) replace_ceiling(x, y, z, user, pointed_thing) -- then make sure ceiling isn't water check_for_water(x, y, z, user, pointed_thing) - -- check_for_water_stone(x, y, z, user, pointed_thing) --debug end -- add wall if necessary to protect from water (pink) local aw = function(x, z, user, pointed_thing) for y=0, 5 do check_for_water(x, y, z, user, pointed_thing) - -- check_for_water_stone(x, y, z, user, pointed_thing) --debug end end @@ -256,7 +253,6 @@ end local es = function(x, z, user, pointed_thing) for y=0, 5 do check_for_water(x, y, z, user, pointed_thing) - -- check_for_water_glass(x, y, z, user, pointed_thing) --debug end end @@ -264,7 +260,6 @@ end local et = function(x, z, user, pointed_thing) for y=0, 6 do check_for_water(x, y, z, user, pointed_thing) - -- check_for_water_glass(x, y, z, user, pointed_thing) --debug end end @@ -273,12 +268,10 @@ local ds = function(x, z, user, pointed_thing) local height = 4 check_ceiling(x, height+1, z, user, pointed_thing) check_for_water(x, height+2, z, user, pointed_thing) - -- check_for_water_stone(x, height+2, z, user, pointed_thing) --debug for y=height, 1, -1 do -- dig from high to low dig_single(x, y, z, user, pointed_thing) end check_for_water(x, 0, z, user, pointed_thing) - -- check_for_water_stone(x, 0, z, user, pointed_thing) --debug end -- dig tall tunnel (light yellow) @@ -324,7 +317,7 @@ local dig_tunnel = function(cdir, user, pointed_thing) {ds,-1,-2}, {ds,-2,-1},{dt,-1,-1}, {ds,-3, 0},{dt,-2, 0},{dt,-1, 0},{dt, 0, 0}, - {ds,-1, 1},{dt, 0, 1},{dt, 1, 1},{ds, 2, 1}, + {dt,-1, 1},{dt, 0, 1},{dt, 1, 1},{ds, 2, 1}, {dt, 0, 2},{ds, 1, 2}, {ds, 0, 3}, {add_ref,-1, 1}}, user, pointed_thing) diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..4ebf49a --- /dev/null +++ b/mod.conf @@ -0,0 +1,3 @@ +name = tunnelmaker +description = Easily dig arbitrarily curved tunnels. +depends = default