Digsoft: A Fancy Resumable Quarry Program

Started by Flexico, Mar 17, 2021, 01:44 PM

Previous topic - Next topic

Flexico

I see there's already a program like this on the forum, but I've put a lot of time into making these programs feature-filled and as reliable as possible given Computercraft's aversion to chunks unloading and servers restarting.

Included programs:

> flex.lua -- API, needed by all other programs
  -- In flex_options.cfg, the frequency is for turtle broadcast, and the color is for when receive.lua

> receive.lua -- Optional, for use on a computer with a Wireless/Ender Modem to receive broadcasts from Mining Turtles with Modems

> dig.lua -- API for keeping track of motion / resuming after a restart
  -- Run once to generate "dig_options.cfg"

> quarry.lua <length> [width] [depth] ["skip" <depth>] ["dump"] ["nether"] ["nolava"]
  -- Fuel in slot 1
  -- Place a chest behind it for collecting mined materials, and optionally a chest above for holding surplus fuel
  -- Avoids mining blocks like spawners (customizable in "dig_options.cfg")
  -- Keeps a stack of blocks for blocking off lava on the borders of the quarry, unless you include the keyword "nolava"
  -- Including "nether" makes the turtle keep 4 stacks of blocks instead of one
  -- Including "dump" will drop off junk blocks instead of placing them into the chest; which blocks get dumped can be customized in the "dig_options.cfg" file
  -- Including "skip" sends the turtle down <depth> blocks before quarrying outward

> stairs.lua [length] [width] [depth]
  -- Digs staircase around a quarry (place it just to the left of the quarrying turtle with the same dimensions), then if a chest and crafting table are included, it crafts stairs from the cobblestone it's collected and places stairs all the way back up

pastebin get 03yRmzVv flex.lua
pastebin get eFJsmAqS receive.lua
pastebin get dQJFnnAF dig.lua
pastebin get JPmDYdYm quarry.lua
pastebin get Ndgnay68 stairs.lua
[Links updated 2021 July 22]

Let me know of any bugs or suggestions you may have! <[email protected]>

dzervas

Amazing script!

First of all, I got ChatGPT to make a receive.lua version for pocket computers and it works on first try!

pastebin get a6WRfybs receive_pocket.lua

In the off chance that you're taking requests, it would be amazing to have remote-control and inventory view (maybe with UI?):
- Run on a pocket computer
- Show  current fuel
- Show all the inventory blocks
- Show estimated times of unloading/runtime/whatever
- Have the ability to force unload (that resumes instantly)

Flexico

Thanks for the feedback! I'm already working on a program for sending the turtles commands from a pocket computer, and I'll be sure to update here when it's done!

Belhun

Just tried it and so far it Works Really Well still.

TheSlime_

Hello, just tried to software the digging part works but how would you go about connecting the turtle wit an ender modem to send logs to a computer at base?