feat: add mining turtle and auto-updating startup scripts to enhance inventory management
This commit is contained in:
34
README.md
34
README.md
@@ -47,7 +47,9 @@ A Minecraft inventory management system built on [CC:Tweaked](https://tweaked.cc
|
|||||||
| `craftingTurtle.lua` | **Crafting Worker** | Runs on a Crafting Turtle. When the master places ingredients in its grid, it auto-crafts and reports results. Must be connected to the master via wired network. |
|
| `craftingTurtle.lua` | **Crafting Worker** | Runs on a Crafting Turtle. When the master places ingredients in its grid, it auto-crafts and reports results. Must be connected to the master via wired network. |
|
||||||
| `dropperController.lua` | **Dropper Driver** | Pulses redstone to fire items out of a dropper block until empty. Runs on a computer adjacent to the dropper. |
|
| `dropperController.lua` | **Dropper Driver** | Pulses redstone to fire items out of a dropper block until empty. Runs on a computer adjacent to the dropper. |
|
||||||
| `inventoryWebBridge.lua` | **Web Bridge** | Bridges the in-game modem network to the external web server over HTTP/WebSocket. Forwards state from the master and relays commands from the web dashboard back into the game. |
|
| `inventoryWebBridge.lua` | **Web Bridge** | Bridges the in-game modem network to the external web server over HTTP/WebSocket. Forwards state from the master and relays commands from the web dashboard back into the game. |
|
||||||
|
| `miningTurtle.lua` | **Mining Turtle** | Runs on a mining turtle connected to the wired network. Continuously mines downward, auto-dumps inventory to networked storage, auto-refuels from storage, and triggers master scans after dumping. |
|
||||||
| `listDevicesByType.lua` | **Diagnostic Utility** | Lists all peripherals on the wired network grouped by type. Useful for discovering connected chests, furnaces, etc. |
|
| `listDevicesByType.lua` | **Diagnostic Utility** | Lists all peripherals on the wired network grouped by type. Useful for discovering connected chests, furnaces, etc. |
|
||||||
|
| `autorun/startup.lua` | **Opus Autorun** | Auto-detects the computer's role from config files and launches the appropriate program. For use with [Opus OS](https://github.com/kepler155c/opus). |
|
||||||
|
|
||||||
### Web Stack (Docker)
|
### Web Stack (Docker)
|
||||||
|
|
||||||
@@ -99,7 +101,15 @@ On a computer adjacent to a dropper block:
|
|||||||
wget https://git.spatulaa.com/MayaTheShy/Inventory-Manager-CC/raw/branch/main/dropperController.lua startup.lua
|
wget https://git.spatulaa.com/MayaTheShy/Inventory-Manager-CC/raw/branch/main/dropperController.lua startup.lua
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Install the Web Bridge (Optional)
|
### 5. Install a Mining Turtle (Optional)
|
||||||
|
|
||||||
|
On a **Mining Turtle** connected to the wired network:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://git.spatulaa.com/MayaTheShy/Inventory-Manager-CC/raw/branch/main/miningTurtle.lua startup.lua
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Install the Web Bridge (Optional)
|
||||||
|
|
||||||
On any CC:Tweaked computer with a wired modem and HTTP access:
|
On any CC:Tweaked computer with a wired modem and HTTP access:
|
||||||
|
|
||||||
@@ -109,7 +119,7 @@ wget https://git.spatulaa.com/MayaTheShy/Inventory-Manager-CC/raw/branch/main/in
|
|||||||
|
|
||||||
Configure the web server URL by editing `.webbridge_config` on the computer, or it will default to `http://localhost`.
|
Configure the web server URL by editing `.webbridge_config` on the computer, or it will default to `http://localhost`.
|
||||||
|
|
||||||
### 6. Start the Web Dashboard (Optional)
|
### 7. Start the Web Dashboard (Optional)
|
||||||
|
|
||||||
On the host machine, navigate to the `web/` directory and run:
|
On the host machine, navigate to the `web/` directory and run:
|
||||||
|
|
||||||
@@ -125,8 +135,28 @@ The dashboard will be available at `http://localhost` on port 80.
|
|||||||
|---------|---------|
|
|---------|---------|
|
||||||
| 4200 | Master → Clients/Bridge (state broadcast) |
|
| 4200 | Master → Clients/Bridge (state broadcast) |
|
||||||
| 4201 | Clients/Bridge → Master (orders & commands) |
|
| 4201 | Clients/Bridge → Master (orders & commands) |
|
||||||
|
| 4202 | Master → Client (order/craft result replies) |
|
||||||
| 4203 | Master → Crafting Turtle (craft requests) |
|
| 4203 | Master → Crafting Turtle (craft requests) |
|
||||||
| 4204 | Crafting Turtle → Master (craft results) |
|
| 4204 | Crafting Turtle → Master (craft results) |
|
||||||
|
| 4205 | System channel (remote reboot all computers) |
|
||||||
|
|
||||||
|
## Auto-Updating Startup Scripts
|
||||||
|
|
||||||
|
The `startup/` directory contains self-updating startup scripts that download the latest code from the git repository before launching. These are an alternative to the manual `wget` install:
|
||||||
|
|
||||||
|
| Script | Role |
|
||||||
|
|--------|------|
|
||||||
|
| `startup/manager.lua` | Master controller with auto-update for all manager modules |
|
||||||
|
| `startup/client.lua` | Client with auto-update, first-run setup wizard, and optional dropper |
|
||||||
|
| `startup/turtle.lua` | Crafting turtle with auto-update |
|
||||||
|
| `startup/bridge.lua` | Web bridge with auto-update |
|
||||||
|
| `startup/miner.lua` | Mining turtle with auto-update |
|
||||||
|
|
||||||
|
To use one, download the appropriate startup script as `startup.lua` on the target computer. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://git.spatulaa.com/MayaTheShy/Inventory-Manager-CC/raw/branch/main/startup/manager.lua startup.lua
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user