Update server + client
This commit is contained in:
parent
04dde0682b
commit
e35e8d8d24
@ -110,6 +110,16 @@ function selectCobble()
|
||||
end
|
||||
end
|
||||
|
||||
function selectFuel()
|
||||
for i = 1,16 do
|
||||
turtle.select(i)
|
||||
item = turtle.getItemDetail()
|
||||
if item and (item["name"] == "minecraft:coal" or item["name"] == "minecraft:charcoal") then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function digShaft()
|
||||
turtle.digDown()
|
||||
selectCobble()
|
||||
@ -264,6 +274,7 @@ function doRefuel()
|
||||
turtle.select(1)
|
||||
while turtle.getFuelLevel() < 1500 do
|
||||
turtle.suck(1)
|
||||
selectFuel()
|
||||
turtle.refuel(1)
|
||||
end
|
||||
end
|
||||
@ -297,8 +308,10 @@ function waitForJob()
|
||||
end
|
||||
|
||||
function emptyToBarrel()
|
||||
sleep(0.4)
|
||||
for i = 1,16 do
|
||||
turtle.select(i)
|
||||
sleep(0.1)
|
||||
turtle.dropDown()
|
||||
end
|
||||
end
|
||||
|
@ -1,6 +1,15 @@
|
||||
rednet.open("back")
|
||||
|
||||
curjob = 29
|
||||
curjob = 69
|
||||
while true do
|
||||
print("From what index do you want to resume jobs?")
|
||||
x = read()
|
||||
if x then
|
||||
curjob = tonumber(x)
|
||||
break
|
||||
end
|
||||
print("That's not a number.")
|
||||
end
|
||||
|
||||
function getNextJob()
|
||||
curjob = curjob + 1
|
||||
@ -13,9 +22,11 @@ while true do
|
||||
sleep(0.6)
|
||||
else
|
||||
if message == "gibjob" then
|
||||
job = getNextJob()
|
||||
rednet.broadcast(tostring(job), "newjob")
|
||||
print("Found request for job. Offering "..tostring(job))
|
||||
if rs.getInput("right") then
|
||||
job = getNextJob()
|
||||
rednet.broadcast(tostring(job), "newjob")
|
||||
print("Found job request. Offering "..tostring(job))
|
||||
end
|
||||
else
|
||||
-- numberic job is complete
|
||||
completejob = tonumber(message)
|
||||
|
Loading…
Reference in New Issue
Block a user