From 073d62162967e3c2608fcbefb05adb1496bd25c6 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 19 Sep 2022 18:30:43 +0100 Subject: [PATCH] test geometry commands --- worldeditadditions/lib/maze2d.lua | 4 ++-- worldeditadditions_commands/commands/maze.lua | 4 ++-- worldeditadditions_commands/commands/walls.lua | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/worldeditadditions/lib/maze2d.lua b/worldeditadditions/lib/maze2d.lua index f4cb509..fb8133b 100644 --- a/worldeditadditions/lib/maze2d.lua +++ b/worldeditadditions/lib/maze2d.lua @@ -20,7 +20,7 @@ local function printspace(space, w, h) end local function generate_maze(seed, width, height, path_length, path_width) - local start_time = worldeditadditions.get_ms_time() + local start_time = wea_c.get_ms_time() if not path_length then path_length = 2 end if not path_width then path_width = 1 end @@ -113,7 +113,7 @@ local function generate_maze(seed, width, height, path_length, path_width) end end - local end_time = worldeditadditions.get_ms_time() + local end_time = wea_c.get_ms_time() return world, (end_time - start_time) * 1000 end diff --git a/worldeditadditions_commands/commands/maze.lua b/worldeditadditions_commands/commands/maze.lua index 08ffad4..565b554 100644 --- a/worldeditadditions_commands/commands/maze.lua +++ b/worldeditadditions_commands/commands/maze.lua @@ -1,6 +1,6 @@ local wea = worldeditadditions local wea_c = worldeditadditions_core -local Vector3 = wea.Vector3 +local Vector3 = wea_c.Vector3 local function parse_params_maze(params_text, is_3d) if not params_text then params_text = "" end @@ -115,7 +115,7 @@ wea_c.register_command("maze3d", { func = function(name, replace_node, seed, path_length, path_width, path_depth) local start_time = wea_c.get_ms_time() local pos1, pos2 = Vector3.sort(worldedit.pos1[name], worldedit.pos2[name]) - local replaced = wea_c.maze3d( + local replaced = wea.maze3d( pos1, pos2, replace_node, seed, diff --git a/worldeditadditions_commands/commands/walls.lua b/worldeditadditions_commands/commands/walls.lua index 51da705..400da90 100644 --- a/worldeditadditions_commands/commands/walls.lua +++ b/worldeditadditions_commands/commands/walls.lua @@ -1,3 +1,4 @@ +local wea = worldeditadditions local wea_c = worldeditadditions_core local Vector3 = wea_c.Vector3 @@ -48,7 +49,7 @@ worldeditadditions_core.register_command("walls", { local start_time = wea_c.get_ms_time() local pos1, pos2 = Vector3.sort(worldedit.pos1[name], worldedit.pos2[name]) - local success, replaced = wea_c.walls( + local success, replaced = wea.walls( pos1, pos2, target_node, thickness )