From b0250b7c07511baa47f5fdf6550ee903d5e96006 Mon Sep 17 00:00:00 2001 From: LengthenedGradient <109800352+LengthenedGradient@users.noreply.github.com> Date: Sat, 20 Jun 2026 22:40:44 -0400 Subject: [PATCH] Change mm option to cm The maximum size of mm is not enough, cm allows for more and the conversion between cm and mm is just a decimal point shift. --- lua/primitive/core/construct.lua | 8 ++++---- lua/primitive/entities/shapes.lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/primitive/core/construct.lua b/lua/primitive/core/construct.lua index 222bf21..03cf00c 100644 --- a/lua/primitive/core/construct.lua +++ b/lua/primitive/core/construct.lua @@ -270,14 +270,14 @@ do either a function or a coroutine that will build the mesh --]] function addon.construct.get( name, param, threaded, physics ) - if param and param.PrimUNITS == "millimeters" then + if param and param.PrimUNITS == "centimeters" then param = table.Copy( param ) if isvector( param.PrimSIZE ) then - local s = param.PrimSIZE * 0.03937 + local s = param.PrimSIZE * 0.3937 param.PrimSIZE = Vector( math_max( s.x, 1 ), math_max( s.y, 1 ), math_max( s.z, 1 ) ) end - if isnumber( param.PrimDT ) then param.PrimDT = math_max( param.PrimDT * 0.03937, 1 ) end - if isnumber( param.PrimSLANT ) then param.PrimSLANT = param.PrimSLANT * 0.03937 end + if isnumber( param.PrimDT ) then param.PrimDT = math_max( param.PrimDT * 0.3937, 1 ) end + if isnumber( param.PrimSLANT ) then param.PrimSLANT = param.PrimSLANT * 0.3937 end end return addon.construct.generate( construct_types[name], param, threaded, physics ) end diff --git a/lua/primitive/entities/shapes.lua b/lua/primitive/entities/shapes.lua index 02c14ca..c8a155c 100644 --- a/lua/primitive/entities/shapes.lua +++ b/lua/primitive/entities/shapes.lua @@ -3,7 +3,7 @@ do local class = {} local typen = { "cone", "cube", "cube_magic", "cube_hole", "cylinder", "dome", "dome_hollow", "parallelogram", "plane", "pyramid", "sphere", "torus", "tube", "wedge", "wedge_corner" } - local typek, unitk, defaults = {}, { source = "source", millimeters = "millimeters" }, {} + local typek, unitk, defaults = {}, { source = "source", centimeters = "centimeters" }, {} do for k, v in pairs( typen ) do