add option to change size
This commit is contained in:
20
src/main.lua
20
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
|
||||
|
||||
Reference in New Issue
Block a user