Add mining turtle for infinite cobblestone generators
New miningTurtle.lua: sits on top of a cobble gen, continuously digs down, and pushes items into networked chests via wired modem. Features: - Configurable mine interval, dump threshold, fuel slot - Auto-dumps inventory when slots fill or timer expires - Auto-refuels from designated fuel slot - Remote reboot via SYSTEM_CHANNEL - Stats display (mined, dumped, uptime, fuel) - Persistent config in usr/config/inventory-manager/.miner_config Also adds: - startup/miner.lua: auto-update + launch script for standalone use - .package: new 'Mining Turtle' role (option 4) in setup wizard - autorun/startup.lua: detects .miner_config and launches miningTurtle
This commit is contained in:
20
.package
20
.package
@@ -28,9 +28,10 @@
|
||||
print(" 1) Inventory Manager (main controller)")
|
||||
print(" 2) Inventory Client (display-only)")
|
||||
print(" 3) Web Bridge (HTTP forwarder)")
|
||||
print(" 4) Skip setup")
|
||||
print(" 4) Mining Turtle (cobble miner)")
|
||||
print(" 5) Skip setup")
|
||||
print("")
|
||||
write("Choice (1/2/3/4): ")
|
||||
write("Choice (1/2/3/4/5): ")
|
||||
local choice = read()
|
||||
|
||||
if choice == "1" then
|
||||
@@ -92,6 +93,21 @@
|
||||
f.close()
|
||||
print("Saved web bridge config.")
|
||||
|
||||
elseif choice == "4" then
|
||||
print("")
|
||||
print("-- Mining Turtle Configuration --")
|
||||
local mineInterval = ask("Mine interval in seconds", "0.5")
|
||||
local dumpThreshold = ask("Dump when N slots full", "14")
|
||||
|
||||
local cfg = {
|
||||
mineInterval = tonumber(mineInterval) or 0.5,
|
||||
dumpThreshold = tonumber(dumpThreshold) or 14,
|
||||
}
|
||||
local f = fs.open(fs.combine(cfgDir, ".miner_config"), "w")
|
||||
f.write(textutils.serialiseJSON(cfg))
|
||||
f.close()
|
||||
print("Saved miner config.")
|
||||
|
||||
else
|
||||
print("Skipped — edit config files manually later.")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user