work on inventory

This commit is contained in:
Boki 2026-02-13 09:52:06 -05:00
parent 50d32abd49
commit 32781b1462
11 changed files with 240 additions and 146 deletions

View file

@ -181,14 +181,17 @@ public class BotOrchestrator : IAsyncDisposable
await ocrWarmup;
Emit("info", "Checking inventory for leftover items...");
await Inventory.ClearToStash();
Emit("info", "Inventory cleared");
// Wire executor events
TradeExecutor.StateChanged += _ => UpdateExecutorState();
TradeQueue.TradeCompleted += () => { _tradesCompleted++; StatusUpdated?.Invoke(); };
TradeQueue.TradeFailed += () => { _tradesFailed++; StatusUpdated?.Invoke(); };
Inventory.Updated += () => StatusUpdated?.Invoke();
_started = true;
Emit("info", "Checking inventory for leftover items...");
await Inventory.ClearToStash();
Emit("info", "Inventory cleared");
// Load links
var allUrls = new HashSet<string>(cliUrls);
@ -207,7 +210,6 @@ public class BotOrchestrator : IAsyncDisposable
// Wire trade monitor events
TradeMonitor.NewListings += OnNewListings;
_started = true;
Emit("info", $"Loaded {allUrls.Count} trade link(s)");
Log.Information("Bot started");
}