Add all of the RA stuff
This commit is contained in:
parent
dc56dab4f9
commit
a4fd1dbcbf
9 changed files with 962 additions and 4 deletions
52
readme.md
52
readme.md
|
|
@ -15,6 +15,48 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
## Features
|
||||
- Lua matching for inventories that are passed into AIL
|
||||
- Import all items from certain inventories (like ender storages for all of your farms)
|
||||
- Chatbox support for withdrawing and depositing items
|
||||
- Remote access via enderstorages
|
||||
|
||||
## RA
|
||||
SiSS has a remote access system that allows you to access your items via modem.
|
||||
To use it, first set up your config.lua correctly. After that you need to implement the tiny_ra_library into your program.
|
||||
You can download it by using `wget https://git.sad.ovh/sophie/storage-solution/raw/branch/main/tiny_ra_library.lua`.
|
||||
|
||||
Example program:
|
||||
```lua
|
||||
local ra = require("tiny_ra_library")
|
||||
local modem = peripheral.find("modem")
|
||||
|
||||
-- modem, port, password
|
||||
ra.init(modem, 42420, "test123")
|
||||
|
||||
print("withdraws 64 of dirt")
|
||||
ra.withdraw("minecraft:dirt")
|
||||
sleep(2)
|
||||
|
||||
print("deposits 64 of dirt")
|
||||
ra.depositByItemName("minecraft:dirt")
|
||||
sleep(2)
|
||||
|
||||
print("withdraws 12 dirt")
|
||||
ra.withdraw("minecraft:dirt", 12)
|
||||
sleep(2)
|
||||
|
||||
print("deposits the first slot")
|
||||
ra.depositBySlots({1})
|
||||
sleep(2)
|
||||
|
||||
print("withdraws 32 dirt")
|
||||
ra.withdraw("minecraft:dirt", 32)
|
||||
sleep(2)
|
||||
|
||||
print("deposits 16 items from the first slot")
|
||||
ra.depositBySlots({1}, 16)
|
||||
```
|
||||
## How to use
|
||||
1. First, in your /config.lua file, add the following:
|
||||
```lua
|
||||
|
|
@ -27,6 +69,16 @@ return {
|
|||
},
|
||||
["chatbox"] = { -- Not required, just don't set!
|
||||
["hartbreix"] = "manipulator_42" -- Chatbox support
|
||||
},
|
||||
["remote"] = { -- Access your items via modem, not required, just don't set!
|
||||
["ender_storage"] = "ender_storage_493", -- Enderstorage that will be changed (set this to owner-only and computer-chanagable!)
|
||||
["modem"] = "modem_1277", -- Modem to recieve messages
|
||||
["remotes"] = { -- Remote access
|
||||
["red/green/green"] = {
|
||||
["port"] = 42420,
|
||||
["password"] = "test123" -- Required!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue