From 9bb9aeda5c6cde162d345f54642240b2357e837e Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Mon, 17 May 2021 11:18:09 -0700 Subject: [PATCH] Update torus.lua --- worldeditadditions/lib/torus.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/worldeditadditions/lib/torus.lua b/worldeditadditions/lib/torus.lua index c84aedb..5c4b3ac 100644 --- a/worldeditadditions/lib/torus.lua +++ b/worldeditadditions/lib/torus.lua @@ -10,9 +10,8 @@ -- @param hollow=false boolean Whether the generated torus should be hollow or not. function worldeditadditions.torus(position, major_radius, minor_radius, target_node, axes, hollow) local matrix = {x='yz', y='xz', z='xy'} - if type(axes) ~= "string" then axes = "xz" - elseif #axes == 1 and axes.match('[xyz]') then axes = matrix[axes] - else axes = ((axes:match('x') or '')..(axes:match('y') or '')..(axes:match('z') or '')):sub(1,2) end + if type(axes) ~= "string" then axes = "xz" end + if #axes == 1 and axes.match('[xyz]') then axes = matrix[axes] end -- position = { x, y, z } local total_radius = major_radius + minor_radius