Commit Graph

21 Commits

Author SHA1 Message Date
MayaTheShy
ea29136f25 feat: delegate recipe helper functions to shared lib/ui.lua for improved code organization 2026-03-25 22:42:39 -04:00
MayaTheShy
f10108bd48 feat: remove unused catalogue from state cache and update message handling for dropper data 2026-03-25 22:36:45 -04:00
MayaTheShy
bdc9b3f291 feat: sync full smelting state to master for persistence 2026-03-22 22:31:31 -04:00
MayaTheShy
173a0a9f95 Persist config files across Opus package updates
The Opus package manager deletes the entire package directory on
update (fs.delete(packageDir)) before re-downloading files. This
wiped all config files (.manager_config, .client_config, etc.) that
were stored inside packages/inventory-manager/.

Fix: add _configPath() helper to every program that resolves config
file paths to usr/config/inventory-manager/ when running under Opus,
which lives outside the package directory and survives updates.
Falls back to the local _path() for standalone (non-Opus) use.

Updated files:
- inventoryManager.lua, manager/config.lua, inventoryClient.lua,
  inventoryWebBridge.lua, dropperController.lua, craftingTurtle.lua
- .package install script: saves configs to usr/config/inventory-manager/
- autorun/startup.lua: checks both persistent and package dirs
- startup/client.lua: uses persistent dir for .client_setup/.dropper_config
- web/server/Dockerfile: switch health check to wget (from prior fix)
2026-03-22 20:51:31 -04:00
MayaTheShy
432a9feff9 Implemented the usage of the standarised ui library. 2026-03-22 20:23:06 -04:00
MayaTheShy
69e24e7d79 fix: update comments for clarity and organization in inventoryClient.lua 2026-03-22 20:10:41 -04:00
MayaTheShy
e67fded321 fix: client crash from barrel task early return in waitForAny
Same bug as the manager: CLIENT_BARREL_NAME == '' caused return
inside parallel.waitForAny, killing all tasks instantly.
Replace with infinite sleep when barrel is unconfigured.
2026-03-22 19:51:51 -04:00
MayaTheShy
bb139b4afd fix: override dofile to preserve Opus env (require was nil in sub-modules)
CC:Tweaked dofile loads files with _G as environment, but Opus
injects require into the program's sandbox _ENV. All dofile'd
modules (especially display.lua) could not see require.

Also add dropperController to apps.db.
2026-03-22 18:40:03 -04:00
MayaTheShy
3095fc7387 Refactor configuration loading to use dynamic base directory path 2026-03-22 16:07:25 -04:00
MayaTheShy
187b0276d1 Improve cache update logic to handle nil values in main function 2026-03-22 02:52:22 -04:00
MayaTheShy
e7e605ea00 Add command ID generation for message idempotency in sendToMaster 2026-03-22 02:37:46 -04:00
MayaTheShy
6fa7ae5e8f Refactor shared UI helpers to load earlier in inventoryClient 2026-03-22 02:35:12 -04:00
MayaTheShy
0f9b7fcf68 Refactor logging in inventoryClient to use structured logging for improved clarity and consistency 2026-03-22 02:06:02 -04:00
MayaTheShy
11c38dbabb Refactor monitor setup and drawing functions to utilize shared UI module 2026-03-22 01:58:13 -04:00
MayaTheShy
caf0ec85a1 Enhance configuration loading: implement file existence check and JSON parsing for dynamic channel settings 2026-03-22 01:38:47 -04:00
MayaTheShy
4fcec03a59 Add client dropper discovery and announcement functionality 2026-03-21 20:36:49 -04:00
MayaTheShy
e8b2732692 Update client barrel auto-sort to trigger only when items are present 2026-03-16 18:33:16 -04:00
MayaTheShy
d9bb529c21 Add client barrel auto-sort functionality to inventoryClient 2026-03-16 00:25:09 -04:00
MayaTheShy
fa6c682fd2 Add support for custom dropper/barrel names in inventoryClient 2026-03-16 00:17:47 -04:00
MayaTheShy
50d38b86a2 Add crafting functionality to inventoryClient for display of available recipes and crafting status 2026-03-16 00:12:39 -04:00
MayaTheShy
32ae5611e7 Add inventoryClient.lua for display-only dashboard interface
- Implemented a client-side dashboard that connects to the master inventoryManager via wired modem.
- The dashboard displays inventory status without performing any automation tasks.
- Added configuration for communication channels and monitor setup.
- Created UI elements for displaying item lists, status messages, and touch interactions.
- Included functionality for handling touch events and sending commands to the master.
- Integrated smelter dashboard with similar display capabilities.
2026-03-15 23:55:18 -04:00