Polish RA, make it usable.
This commit is contained in:
parent
262c0b5408
commit
6825a05778
14 changed files with 771 additions and 289 deletions
24
src/main.lua
24
src/main.lua
|
|
@ -2,28 +2,38 @@
|
|||
---@field port number
|
||||
---@field password string
|
||||
|
||||
---@class ConectionRemote : InnerRemote
|
||||
---@field remote string
|
||||
|
||||
---@class Remote
|
||||
---@field ender_storage string
|
||||
---@field modem string
|
||||
---@field remotes table<string, InnerRemote>
|
||||
---@field remotes table<string, InnerRemote>|nil
|
||||
---@field connection InnerRemote|nil
|
||||
|
||||
---@class Chatbox
|
||||
---@field players table<string, string>
|
||||
---@field prefix string|nil
|
||||
|
||||
---@class Config
|
||||
---@field inventories string[]
|
||||
---@field inventories string[]|nil
|
||||
---@field import string[]|nil
|
||||
---@field chatbox Chatbox|nil
|
||||
---@field remote Remote
|
||||
---@field remote Remote|nil
|
||||
|
||||
local inv = require("modules.inv")
|
||||
local config = require("../config") ---@type Config
|
||||
|
||||
local inv;
|
||||
|
||||
if config.inventories == nil and config.remote.connection then
|
||||
inv = require("modules.inv_ra")
|
||||
else
|
||||
inv = require("modules.inv")
|
||||
end
|
||||
local ui = require("modules.ui")
|
||||
local chatbox = require("modules.chatbox")
|
||||
local ra = require("modules.ra")
|
||||
|
||||
local config = require("../config") ---@type Config
|
||||
|
||||
local function importMechanism()
|
||||
if config.import == nil then
|
||||
|
|
@ -55,4 +65,6 @@ local function importMechanism()
|
|||
end
|
||||
|
||||
inv.sync()
|
||||
parallel.waitForAll(inv.getAIL().run, chatbox.run, ra.run, ui.run, importMechanism, inv.detectPlayerInsert)
|
||||
parallel.waitForAll(inv.run(), chatbox.run, ra.run,
|
||||
ui.run,
|
||||
importMechanism, inv.detectPlayerInsert)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue