From 98bf0ef386e4326fb4166a0915c1448f4ef8cb13 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 31 Dec 2021 14:02:53 +0000 Subject: [PATCH] //maze: Fix seed when generating multiple mazes in the same second --- CHANGELOG.md | 1 + worldeditadditions_commands/commands/maze.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e370276..7538b09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Note to self: See the bottom of this file for the release template text. - `//maze`, `//maze3d`: - Fix generated maze not reaching the very edge of the defined region - Fix crash if no arguments are specified + - Fix automatic seed when generating many mazes in the same second (e.g. with `//for`, `//many`) - `//convolve`: Fix those super tall pillars appearing randomly diff --git a/worldeditadditions_commands/commands/maze.lua b/worldeditadditions_commands/commands/maze.lua index 88c5b7b..3003c1a 100644 --- a/worldeditadditions_commands/commands/maze.lua +++ b/worldeditadditions_commands/commands/maze.lua @@ -12,7 +12,7 @@ local function parse_params_maze(params_text, is_3d) local parts = worldeditadditions.split_shell(params_text) local replace_node = parts[1] - local seed = os.time() + local seed = os.time() * math.random() local path_length = 2 local path_width = 1 local path_depth = 1