From 74734f935682baa4da822266af54132f9482f2b3 Mon Sep 17 00:00:00 2001 From: Duane Robertson Date: Fri, 8 Apr 2016 21:34:41 -0500 Subject: [PATCH] Simplify if tree. --- mapgen.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mapgen.lua b/mapgen.lua index e80bc66..0683bcd 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -315,15 +315,7 @@ function loud_walking.generate(p_minp, p_maxp, seed) data[ivm] = node("air") lightmap[ivm] = 0 in_cave = false - elseif math.min(dx, csize.x - dx) + math.min(dy, csize.y - dy) + math.min(dz, csize.z - dz) < bevel + 1 then - if biome ~= "underground" and dy < half then - data[ivm] = node("loud_walking:scrith") - lightmap[ivm] = 0 - else - data[ivm] = node(glass[cloud[index] < cloud_i and 1 or 2]) - end - in_cave = false - elseif (dx == 0 or dx == csize.x - 1) or (dz == 0 or dz == csize.z - 1) or (dy == 0 or dy == csize.y - 1) then + elseif (dx == 0 or dx == csize.x - 1) or (dz == 0 or dz == csize.z - 1) or (dy == 0 or dy == csize.y - 1) or math.min(dx, csize.x - dx) + math.min(dy, csize.y - dy) + math.min(dz, csize.z - dz) < bevel + 1 then if math.abs(dy - half - 2) < 2 and (dz == half or dx == half) then data[ivm] = node("air") else