From c83cc9bf3992dcbd62e343175fbc0198683d0300 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 29 Apr 2020 01:03:51 +0100 Subject: [PATCH] maze bugfix: correct stalling when 0 is picked (Lua starts things at 1 - ewwwww......) --- worldeditadditions/maze.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldeditadditions/maze.lua b/worldeditadditions/maze.lua index 2d23da6..b51dd47 100644 --- a/worldeditadditions/maze.lua +++ b/worldeditadditions/maze.lua @@ -58,7 +58,7 @@ function generate_maze(seed, width, height) if #directions > 0 then -- we still have somewhere that we can go --print("This node is not a dead end yet.") - local curdirnum = math.random(0, #directions) + local curdirnum = math.random(1, #directions) local curdir = string.sub(directions, curdirnum, curdirnum) if curdir == "u" then world[cy - 1][cx] = " "