This is a fully modular software for an open computers mining robot
- Digs a tunnel with an height of two blocks
- Places torches
- Places chests
- Puts all found ores in the chests
- Disposes insignificant items (e.g. cobblestone)
- Builds a bridge when necessary
- Stable behavior in case of mobs, falling blocks like grave etc.
- Different mining patterns available
- UI
- Startup routine
- Create detailed documentation of the modules here in the readme
- Interference between the placement of torches and stone when building bridges
The code is fully functional and modular. The functions and variables are located in different modules. Non of the modules are executed on itself, they only provide functions to the main module which defines the starting point of the program. These are the currently available modules:
Imports all the necessary components which are used in the subsequent modules. Always import this first
Handles all the inventory management. Is imported as "invHelper"
The movement module is responsible for stable and highly error tolerant movement and digging
This module contains all the functions for the "zigzag" mining pattern
This module contains all the functions for the "plain" mining pattern (which is basically no pattern at all)
This module contains the functions for the "square" mining pattern.
It mines a whole of the specified square size.
This is where the software starts. The modules are imported and subsequently executed here
The interface is called at system start.
- asks whether the robot should start mining
- choose a mining pattern
- specify the size of the mining area
In order to use the Interface to start the robot one needs to specify the correct path to the starting module (e.g. /mypath/MAIN.lua) inside the interface script.
How to enable the automatic interface start by system start:
- start the robot and type "install" in the root directory
- you will be asked what you want to install, choose openOS
- name your interface file (or the file you want to autostart) "autorun.lua"
- specify the path to your autorun.lua file under /home/.shrc
Reference:
MightyPirates/OpenComputers#2171 (comment)