Update 'Turtle/wheatDaemon.lua'
This commit is contained in:
parent
33e38c9fad
commit
4ad48d4131
@ -6,8 +6,6 @@ rednet.open("right")
|
|||||||
rednet.send(hostPC, "started", "spruceCut")
|
rednet.send(hostPC, "started", "spruceCut")
|
||||||
local wheat = Wheat:new()
|
local wheat = Wheat:new()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function answer(message, id)
|
function answer(message, id)
|
||||||
sleep(0.1)
|
sleep(0.1)
|
||||||
rednet.send(id, message, "received")
|
rednet.send(id, message, "received")
|
||||||
@ -27,7 +25,7 @@ function answer(message, id)
|
|||||||
elseif(message == "getFuelLevel") then
|
elseif(message == "getFuelLevel") then
|
||||||
rednet.send(id, tostring(wheat:getFuelLevel()), "confirm")
|
rednet.send(id, tostring(wheat:getFuelLevel()), "confirm")
|
||||||
elseif(message == "refuel") then
|
elseif(message == "refuel") then
|
||||||
--wheat:refuel()
|
wheat:refuel()
|
||||||
rednet.send(id, "refueled", "confirm")
|
rednet.send(id, "refueled", "confirm")
|
||||||
end
|
end
|
||||||
rednet.send(id, "could not resolve message", "error")
|
rednet.send(id, "could not resolve message", "error")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user