fix: goo version 0.1.2

This commit is contained in:
Guillaume ARM 2026-05-31 02:43:19 +02:00
parent 13294fb7c5
commit 59c6ccbec6

View File

@ -1,4 +1,4 @@
local _VERSION = '0.1.1';
local _VERSION = '0.1.2';
local args = table.pack(...);
local command = args[1];
@ -70,6 +70,14 @@ if not turtle then
error('goo must be run on a turtle');
end
local function hasPickaxeEquipped()
local left = turtle.getEquippedLeft();
local right = turtle.getEquippedRight();
return (left and string.match(left.name or '', '_pickaxe$') ~= nil)
or (right and string.match(right.name or '', '_pickaxe$') ~= nil);
end
local function turnAround()
turtle.turnRight();
turtle.turnRight();
@ -499,6 +507,10 @@ end
print('goo started. Place the turtle directly below the goo block.');
if not hasPickaxeEquipped() then
error('goo requires a turtle with a pickaxe equipped');
end
ensureStartFuel();
while true do