Compare commits
No commits in common. "b316ced86248d65fec62abcd7c64be34b94e5bc4" and "c95af9b7a69c6f741bd65ba50870f60b1fcdd944" have entirely different histories.
b316ced862
...
c95af9b7a6
42
.vscode/settings.json
vendored
42
.vscode/settings.json
vendored
@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"Lua.diagnostics.severity": {
|
|
||||||
"redefined-local": "Warning"
|
|
||||||
},
|
|
||||||
"Lua.diagnostics.globals": [
|
|
||||||
"printError",
|
|
||||||
"sleep",
|
|
||||||
"read",
|
|
||||||
"write",
|
|
||||||
"print",
|
|
||||||
"colony",
|
|
||||||
"colours",
|
|
||||||
"colors",
|
|
||||||
"commands",
|
|
||||||
"disk",
|
|
||||||
"fs",
|
|
||||||
"gps",
|
|
||||||
"help",
|
|
||||||
"http",
|
|
||||||
"paintutils",
|
|
||||||
"parallel",
|
|
||||||
"peripheral",
|
|
||||||
"rednet",
|
|
||||||
"redstone",
|
|
||||||
"keys",
|
|
||||||
"settings",
|
|
||||||
"shell",
|
|
||||||
"multishell",
|
|
||||||
"term",
|
|
||||||
"textutils",
|
|
||||||
"turtle",
|
|
||||||
"pocket",
|
|
||||||
"vector",
|
|
||||||
"bit32",
|
|
||||||
"window",
|
|
||||||
"_CC_DEFAULT_SETTINGS",
|
|
||||||
"_HOST",
|
|
||||||
"_VERSION",
|
|
||||||
"_"
|
|
||||||
],
|
|
||||||
"Lua.runtime.version": "Lua 5.1",
|
|
||||||
}
|
|
||||||
68
digroom.lua
68
digroom.lua
@ -1,68 +0,0 @@
|
|||||||
-- local coordinates!
|
|
||||||
local tArgs = { ... }
|
|
||||||
local x = tArgs[1]
|
|
||||||
local y = tArgs[2]
|
|
||||||
local z = tArgs[3]
|
|
||||||
local fuel = 16
|
|
||||||
local up = true
|
|
||||||
local fw = false
|
|
||||||
|
|
||||||
local function digUp()
|
|
||||||
for i = 2, z do
|
|
||||||
while not turtle.up() do
|
|
||||||
turtle.digUp()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function digDown()
|
|
||||||
for i = 2, z do
|
|
||||||
while not turtle.down() do
|
|
||||||
turtle.digDown()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function digVertical()
|
|
||||||
if up then
|
|
||||||
digUp()
|
|
||||||
else
|
|
||||||
digDown()
|
|
||||||
end
|
|
||||||
up = not up
|
|
||||||
end
|
|
||||||
|
|
||||||
local function digFw()
|
|
||||||
while not turtle.forward() do
|
|
||||||
turtle.dig()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function turn()
|
|
||||||
if fw then
|
|
||||||
turtle.turnRight()
|
|
||||||
else
|
|
||||||
turtle.turnLeft()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function refuel()
|
|
||||||
if turtle.getFuelLevel() <= 4 * z then
|
|
||||||
if not turtle.refuel() then
|
|
||||||
print("No fuel!")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for i = 1, x do
|
|
||||||
digFw()
|
|
||||||
turn()
|
|
||||||
fw = not fw
|
|
||||||
for j = 2, y do
|
|
||||||
digVertical()
|
|
||||||
digFw()
|
|
||||||
refuel()
|
|
||||||
end
|
|
||||||
digVertical()
|
|
||||||
turn()
|
|
||||||
end
|
|
||||||
11
monitor.lua
11
monitor.lua
@ -1,11 +0,0 @@
|
|||||||
require("printTable")
|
|
||||||
local monitors = { peripheral.find("monitor") }
|
|
||||||
for key, monitor in pairs(monitors) do
|
|
||||||
monitor.setTextScale(0.5)
|
|
||||||
monitor.clear()
|
|
||||||
monitor.setCursorPos(1, 1)
|
|
||||||
--monitor.write("Hello World!")
|
|
||||||
end
|
|
||||||
local wo = colony.getWorkOrders()
|
|
||||||
local pr = textutils.serialise(wo)
|
|
||||||
printTable(wo, 0)
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
local function _printTable(table, s, tabs)
|
|
||||||
for key, value in pairs(table) do
|
|
||||||
if type(value) == "table" then
|
|
||||||
_printTable(table, "", tabs + 1)
|
|
||||||
else
|
|
||||||
print(string.rep(' ', tabs), key, value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return s
|
|
||||||
end
|
|
||||||
|
|
||||||
function printTable(table)
|
|
||||||
return _printTable(table, "", 0)
|
|
||||||
end
|
|
||||||
Loading…
x
Reference in New Issue
Block a user