View difference between Paste ID: 3kwAZXAd and H1w4vh0f
SHOW: | | - or go back to the newest paste.
1
os.loadAPI("turtleChest.lua")
2
os.loadAPI("setNorth.lua")
3
os.loadAPI("turtleToCords.lua")
4
os.loadAPI("userInput.lua")
5
6-
function userPrompt(length, width)
6+
function insertAll()
7-
	total = length * width
7+
	if not turtleChest.insertAllUp() then
8-
	print(total .. " Buckets Needed")
8+
		if not turtleChest.insertAllDown() then
9-
	userInput.getUserInput("Press Anything to Continue")
9+
			return false
10
		end
11
	end
12-
-- Get the dimensions
12+
	return true
13-
function input(newWidth, newLength, newDepth)
13+
14-
    width = newWidth
14+
15-
    length = newLength
15+
function getAll()
16-
    depth = newDepth
16+
	if turtleChest.takeAllUp() then
17
		if 
18
	elseif turtleChest.takeAllDown() then
19-
function bucketCheck(x, z, sdirection, bucket)
19+
			return true
20-
	bucket = bucket + 1
20+
21-
	if bucket == 16 then
21+
	return false
22-
		toRefuel(x, z, sdirection)
22+
23-
		bucket = 0
23+
24
function putCheck(direction, count)
25-
	return bucket
25+
	tcount = turtleChest.countCheck()
26
	cdiff = tcount - count
27
	if cdiff == 0 then
28-
function toRefuel(x, z, sdirection)
28+
		return true
29-
	cdirection = setNorth.getDirection()
29+
	elseif cdiff > 0 then
30-
	cx, cy, cz = gps.locate()
30+
		if direction == "up"
31-
	turtleToCords.twoDMove(x, z, cx, cz)
31+
32-
	--face chests
32+
	return false
33-
	setNorth.lookNorth()
33+
34-
	sdirection = setNorth.oppDirection(sdirection)
34+