- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Skalistan
-
Content Count
2 -
Joined
-
Last visited
Posts posted by Skalistan
-
-
FullChest sorting storage system
This program uses a robot to sort items into simple storage system. I am using iron chests mod here. There is an input chest (golden), storage chests (iron), and an overflow chest (diamond). The robot is placed behind the input chest facing the chest and I recommend placing a charger next to it. Red blocks are always required, orange and yellow blocks are required depending on storage size (in this one, orange blocks are needed). I usually place them all to be sure. The storage chests must always be on the right from the input chest.
Each storage chest must have no empty slot! If you want a chest to contain certain items, put one of these items into a slot like this:
The robot then goes around in zig-zag pattern and tries to put each item into each chest. All chests have no empty slots, therefore only wanted items can be put into each chest - for all other items the chest is full.
If the robot is waiting on the start, it checks the input chest for new items every 10 seconds. If an item is found it will start sorting in 1 minute (except for the first check - then it si immidiet).
Program
also in attachments
robot = require("robot") os = require("os") computer = require("computer") totalSlots = robot.inventorySize() function dropAll(slots) for i = 1, slots, 1 do robot.select(i) robot.drop() end robot.select(1) end function suckAll() count = 0 while robot.suck() do count = count + 1 end return count end -- direction false - left -- direction true - right function next(direction) if not direction then robot.turnLeft() else robot.turnRight() end b = robot.forward() if not direction then robot.turnRight() else robot.turnLeft() end return b end while true do first = true while robot.suck() == false do print("check") first = false os.sleep(10) end robot.drop() print("Sorting is starting...") if not first then print("in 60 seconds...") os.sleep(60) end print("now!") usedSlots = suckAll() if usedSlots > totalSlots then usedSlots = totalSlots end direction = false robot.turnLeft() robot.forward() robot.forward() robot.turnRight() while true do dropAll(usedSlots) while next(direction) do dropAll(usedSlots) end print("end of row") if not robot.up() then -- last row print("end of sorting") robot.turnRight() while robot.forward() do end robot.turnLeft() dropAll(usedSlots) while robot.down() do end dropAll(totalSlots) -- just to be sure break end direction = not direction end end
Fast infine quarry
in Programs
Posted
This is program for robot quarry. It uses a special pattern thanks to which it is up to 40% faster than the default dig.lua. The digging pattern also stretches into infinity, so if you equip the robot with a chunk loader upgrade you never have to worry about it again. The robot also remembers its position, so it the quarry can be easily resumed.
Source code and detailed explanation can be found on Gitlab: https://gitlab.com/vitSkalicky/oc-column-quarry
Usage
Robot requirements
Minimal
*use a computer to install OpenOS on the disk before assembling the robot, or add a disk drive to the robot (like in the screenshot).
**If you use Hover upgrade tier 1, you must start mining at y < 64, otherwise the robot will get stuck in the air. If you use tier 2 you can mine at any height.
Also note that the minimal requirements robot does not have a Chunk loader upgrade, therefore you have to load the chunks externally (by using ChickenChunks chunk loader for example)
Recommended
*see Minimal requirements
Setup
Schema:
* R - Robot facing the top of schema
* C - Charger
* I - Items chest: the robot will put all mined blocks and resources here
* P - Pickaxes: robot will take fresh primary mining tools from here and will put used (almost broken) ones to a chest *on top of it*
* A - Additional tools: robot will take one tool from each chest in row. Almost broken ones will be put to a chest above. It will use these to try breaking blocks it cannot break with pickaxe (or the primary tool you supply it with). More on that later.
* The robot mines area to the top right of the schema
You can use any tool instead of pickaxe (such as a mining drill from IC2) and any inventory for items, not only chest. For example: the robot takes a charged mining drill from a batbox and it puts the discharged one into a hopper above the batbox, which pushes the discharged drill into the batbox for recharging.
The robot cannot mine cobwebs using a pickaxe (and other blocks from mods such as Magic bees hives). That's what additional tools are for. If a robot fails to mine a block using pickaxe, it will try to mine it using all the available additional tools.
The robot takes one additional tool from each chest to the right of the "pickaxe" chest. You can put as many chest you want - the robot counts how many chests there are.
Screenshot:
Mid-game setup on Direwolf 1.12.2
End-game setup on Direwolf20 1.12.2
Program options
Usage
Arguments
Options
Resumes the quarry progress on the last mined column. Useful for example if the robot got stuck and you had to break it. Just place the robot at the starting point, use this option and it will continue where it was.
Where *n* is the side of the already mined area. The robot will continue mining **roughly** at the end of the entered area. Useful if replacing a lost robot. If you want to replace a robot you did not lose, it is better copy the state file (see *State saving*)
The robot will change its primary tool (pickaxe) every time it visits the start point, not only when it is almost broken. **Recommended when using a repairable tool** like in the example setups.
State saving
The robot saves its progress every time it finished mining a column into file named `column_quarry_state`. If you want to replace the robot, just copy the contents of this file onto the new robot and start the quarry on the new robot with the `--continue` option. I will continue, where the old robot finished.
Download and source code
Source code of this program along with more detailed description on how it works can be found here: https://gitlab.com/vitSkalicky/oc-column-quarry
PS: I'm reposting this, because the forum got reset reveral times after the first time I posted this here.