From f3800ec22628b48e36c8e79fb9da12d89fba295d Mon Sep 17 00:00:00 2001 From: Justus Wolff Date: Sun, 15 Feb 2026 11:21:01 +0100 Subject: [PATCH] add option to change size --- src/main.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main.lua b/src/main.lua index 506840b..06b102e 100644 --- a/src/main.lua +++ b/src/main.lua @@ -140,7 +140,7 @@ local function newdesign() end write("Enter name: ") local name = read() - if not fs.exists("designs/"..name) then + if not fs.exists("designs/"..name) or name == "" then printError("Design not found!") else local file = fs.open("designs/"..name, "r") @@ -151,6 +151,24 @@ local function newdesign() buf = content["buf"] end end + if action == 4 then -- change X size + reset() + write("Enter new X size: ") + local xsize = tonumber(read()) + dimensions["x"] = xsize + end + if action == 5 then -- change floor amount + reset() + write("Enter new floor amount: ") + local ysize = tonumber(read()) + dimensions["y"] = ysize + end + if action == 6 then -- change Z size + reset() + write("Enter new Z size: ") + local zsize = tonumber(read()) + dimensions["z"] = zsize + end end end end