Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cmp = require("component")
- local r = require("robot")
- local i = 0
- local t = 0
- ----- Настройка -----
- local auto_suck = true -- пополнять ли с сундука
- local ticks_limit = 100 -- интервал между пополнениями (в тиках)
- ---------------------
- function get_resource_in_chest()
- r.turnLeft()
- r.suck()
- r.turnRight()
- inv.equip()
- print("[Debug] Пополнение из сундука завершено!")
- end
- while (true) do
- r.useUp()
- r.useDown()
- r.use()
- i = i+1
- if auto_suck then
- t = t+1;
- if t > ticks_limit then
- ticks = 0
- get_resource_in_chest()
- end
- end
- print("[Debug] Текущий шаг цикла: "..i)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement