Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Mr. Tools turtle API
- ]]
- local data = {}
- local info = {
- ["version"] = 0.1
- }
- -- load core api
- os.loadAPI("mrtools/api/ToolApi")
- function getVersion()
- return info.version
- end
- function checkFuel(way)
- if turtle.getFuelLevel() == "unlimited" then
- return true
- end
- local fuelLevel = tonumber(turtle.getFuelLevel())
- while fuelLevel < way do
- print("Fuel level to low to work. If you want to refuel, put fuel in slot 16")
- if ToolApi.simpleMenu("Refuel", "Do Nothing") then
- turtle.select(16)
- turtle.refuel()
- fuelLevel = tonumber(turtle.getFuelLevel())
- else
- return false
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement