fix: sieve timer

Signed-off-by: Superkooka <aymeric.gueracague@gmail.com>
This commit is contained in:
Aymeric GUERACAGUE 2025-06-23 08:10:55 +02:00
parent b69f6b1b16
commit 4eddea9b44
Signed by: Superkooka
GPG Key ID: F78F2B172E894865
2 changed files with 90 additions and 8 deletions

79
crop.lua Normal file
View File

@ -0,0 +1,79 @@
local robot = require("robot")
local robot_component_api = require("component").robot
local sides = require("sides")
local inventory = require("component").inventory_controller
local rs = require("component").redstone
local magnet = require("component").tractor_beam
local planted_seed = [[1,1,1], [1,1,1]]
robot.forward()
robot.turnLeft()
robot.forward()
robot.turnLeft()
robot.select(2)
robot.suck() -- Attrape la première graine
robot.turnRight()
robot.forward()
robot.turnLeft()
robot.select(3)
robot.suck() -- Attrape la seconde graine
robot.turnRight()
robot.forward()
robot.turnLeft()
robot.select(1)
robot.suck() -- Attrape un stack de crops
robot.turnRight()
robot.forward()
robot.turnRight()
robot.forward()
robot.turnLeft()
robot.select(2)
robot.drop() -- Pose la première graine dans le seed analyser
os.sleep(6)
robot.suck() -- Récuperer la graine dans le seed analyser
robot.select(3)
robot.drop() -- Pose la seconde graine dans le seed analyser
os.sleep(6)
robot.suck() -- Récuperer la graine dans le seed analyser
robot.turnRight()
robot.forward()
robot.turnRight()
robot.forward()
robot.turnRight()
robot.select(1)
inventory.equip() -- Attrape les crops
robot_component_api.use(sides.front)
inventory.equip()
robot.select(2) -- Attrape la première seed
inventory.equip()
robot_component_api.use(sides.front)
inventory.equip()
robot.turnLeft()
robot.forward()
robot.forward()
robot.turnRight()
robot.select(1)
inventory.equip()
robot_component_api.use(sides.front)
inventory.equip()
robot.select(3)
inventory.equip()
robot_component_api.use(sides.front)
inventory.equip()
robot.turnRight()
robot.forward()
robot.turnLeft()
os.sleep(2)
robot.select(1)
inventory.equip()
rs.setOutput(sides.bottom, 14)
os.sleep(1)
robot_component_api.use(sides.front, true)
rs.setOutput(sides.bottom, 0)
os.sleep(2)
robot.swing(sides.front)
while not magnet.suck(1) == false do
print("Shlouuupe")
end

View File

@ -24,15 +24,18 @@ while true do
hammer_buffer.transferItem(sides.south, sides.north, 8, compressed_sand_slot, 6) hammer_buffer.transferItem(sides.south, sides.north, 8, compressed_sand_slot, 6)
print("Send items to sieve") print("Send items to sieve")
sieve_buffer.transferItem(sides.north, sides.south, 64, compressed_gravel_slot, 1) sieve_buffer.transferItem(sides.north, sides.south, 32, compressed_gravel_slot, 1)
sieve_buffer.transferItem(sides.north, sides.south, 64, gravel_slot, 2) sieve_buffer.transferItem(sides.north, sides.south, 32, gravel_slot, 2)
sieve_buffer.transferItem(sides.north, sides.south, 64, compressed_sand_slot, 3) sieve_buffer.transferItem(sides.north, sides.south, 32, compressed_sand_slot, 3)
sieve_buffer.transferItem(sides.north, sides.south, 64, sand_slot, 4) sieve_buffer.transferItem(sides.north, sides.south, 32, sand_slot, 4)
sieve_buffer.transferItem(sides.north, sides.south, 64, compressed_dust_slot, 5) sieve_buffer.transferItem(sides.north, sides.south, 32, compressed_dust_slot, 5)
sieve_buffer.transferItem(sides.north, sides.south, 64, dust_slot, 6) sieve_buffer.transferItem(sides.north, sides.south, 32, dust_slot, 6)
print("Wait 62 seconds for hammer and sieve to process") -- hammer (3 * 64 * 5) + (3 * 8) = 984tick ≈ 50s
os.sleep(62) -- sieve (3 * 32 * 5) + (32 * 3 * 5) = 960tick ≈ 48s
print("Wait 52 seconds for hammer and sieve to process")
os.sleep(52)
end end
-- v2 -> configurable input quantity + stat on web page -- v2 -> configurable input quantity + stat on web page