From f5326c987cf560b35b55f14ae20f5831e675c8cd Mon Sep 17 00:00:00 2001 From: ReTeYeZ Date: Sat, 14 Jun 2014 18:38:32 +0200 Subject: [PATCH 1/3] Small fix to the error output --- .../resources/assets/opencomputers/loot/MazeGen/maze.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua index 93154ed88..876a59d71 100644 --- a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua +++ b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua @@ -27,13 +27,13 @@ autoRefuel = input[5] or "false" if mazeWidth < 2 or mazeLength < 2 or cellHeight < 1 or cellDiameter < 1 or autoRefuel ~= "true" and autoRefuel ~= "false" then print("Error!(Note: Width and Length have to be > 1)") - print("Usage: MazeGen(int:MazeWidth int:MazeLength int:CellHeight int:CellDiameter bool:AutoRefuel)") - return + print("Usage: maze int:MazeWidth int:MazeLength int:CellHeight int:CellDiameter bool:AutoRefuel") + return end if component.isAvailable("generator") == false and autoRefuel == "true" then print("Error! Missing Generator Upgrade") - return + return end term.clear() term.setCursor(1, 1) @@ -54,7 +54,7 @@ function refuel() for i = 1, 16 do robot.select(i) - if component.generator.insert(16) then break end + if component.generator.insert(16) then break end end end From f7d96cb67bd891ab669cd8089ddb843ebe058c79 Mon Sep 17 00:00:00 2001 From: ReTeYeZ Date: Sat, 14 Jun 2014 19:23:17 +0200 Subject: [PATCH 2/3] Added small info Accessable by maze help --- .../opencomputers/loot/MazeGen/maze.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua index 876a59d71..f7e31d82a 100644 --- a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua +++ b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua @@ -23,10 +23,25 @@ cellHeight = tonumber(input[3]) or 1 cellDiameter = tonumber(input[4]) or 1 autoRefuel = input[5] or "false" - +if #input == 1 and input[1] == "help" then + print("The maze will always start at the bottom left") + print("corner. The first two parameters are maze width") + print("and maze length. The third, forth and fifth") + print("parameters, which are optional, are cell") + print("height, cell diameter and auto refuel.") + print("Keep in mind that increasing the cell diameter") + print("will increase the actual maze size in Minecraft") + print("blocks. For example:") + print("maze 10 10 1 3") + print("This will create a maze with 10x10 cells each") + print("cell with a diameter of 3 and height of 1 so") + print("it will have a size of 30x30 blocks.") + print("Auto refuel is by default set to false.") + return +end if mazeWidth < 2 or mazeLength < 2 or cellHeight < 1 or cellDiameter < 1 or autoRefuel ~= "true" and autoRefuel ~= "false" then - print("Error!(Note: Width and Length have to be > 1)") + print("Error!(Note: Type maze help for more info)") print("Usage: maze int:MazeWidth int:MazeLength int:CellHeight int:CellDiameter bool:AutoRefuel") return end From 21d396012e2430d16ebafa187b07d631fcaa6853 Mon Sep 17 00:00:00 2001 From: ReTeYeZ Date: Sun, 15 Jun 2014 15:27:39 +0200 Subject: [PATCH 3/3] Small tweaks to the error output --- .../opencomputers/loot/MazeGen/maze.lua | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua index f7e31d82a..158b141e4 100644 --- a/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua +++ b/src/main/resources/assets/opencomputers/loot/MazeGen/maze.lua @@ -23,26 +23,9 @@ cellHeight = tonumber(input[3]) or 1 cellDiameter = tonumber(input[4]) or 1 autoRefuel = input[5] or "false" -if #input == 1 and input[1] == "help" then - print("The maze will always start at the bottom left") - print("corner. The first two parameters are maze width") - print("and maze length. The third, forth and fifth") - print("parameters, which are optional, are cell") - print("height, cell diameter and auto refuel.") - print("Keep in mind that increasing the cell diameter") - print("will increase the actual maze size in Minecraft") - print("blocks. For example:") - print("maze 10 10 1 3") - print("This will create a maze with 10x10 cells each") - print("cell with a diameter of 3 and height of 1 so") - print("it will have a size of 30x30 blocks.") - print("Auto refuel is by default set to false.") - return -end if mazeWidth < 2 or mazeLength < 2 or cellHeight < 1 or cellDiameter < 1 or autoRefuel ~= "true" and autoRefuel ~= "false" then - print("Error!(Note: Type maze help for more info)") - print("Usage: maze int:MazeWidth int:MazeLength int:CellHeight int:CellDiameter bool:AutoRefuel") + print("Usage: maze ") return end