Digsoft: A Fancy Resumable Quarry Program

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

Previous topic - Next topic


Mar 17, 2021, 01:44 pm Last Edit: Jul 22, 2021, 11:55 pm by 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]>