work on memory
This commit is contained in:
parent
2f652aa1b7
commit
6e9d89b045
28 changed files with 3590 additions and 111 deletions
|
|
@ -7,6 +7,7 @@ using Automata.Core;
|
|||
using Automata.Game;
|
||||
using Automata.GameLog;
|
||||
using Automata.Inventory;
|
||||
using Automata.Items;
|
||||
using Automata.Screen;
|
||||
using Automata.Screen.Ocr;
|
||||
using Automata.Trade;
|
||||
|
|
@ -27,6 +28,13 @@ public partial class App : Application
|
|||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
// Initialize Sidekick parser (fire-and-forget, non-blocking)
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try { await SidekickBootstrapper.InitializeAsync(); }
|
||||
catch (Exception ex) { Serilog.Log.Warning(ex, "Sidekick init failed"); }
|
||||
});
|
||||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
// Config
|
||||
|
|
@ -52,6 +60,7 @@ public partial class App : Application
|
|||
services.AddSingleton<TradeExecutor>();
|
||||
services.AddSingleton<TradeQueue>();
|
||||
services.AddSingleton<BotOrchestrator>();
|
||||
services.AddSingleton<ModPoolService>();
|
||||
|
||||
// ViewModels
|
||||
services.AddSingleton<MainWindowViewModel>();
|
||||
|
|
@ -60,11 +69,24 @@ public partial class App : Application
|
|||
services.AddSingleton<MappingViewModel>();
|
||||
services.AddSingleton<AtlasViewModel>();
|
||||
services.AddSingleton<CraftingViewModel>();
|
||||
services.AddSingleton<MemoryViewModel>();
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
||||
var store = provider.GetRequiredService<ConfigStore>();
|
||||
var bot = provider.GetRequiredService<BotOrchestrator>();
|
||||
var modPool = provider.GetRequiredService<ModPoolService>();
|
||||
|
||||
// Fire-and-forget: load RePoE data, then populate CraftingVM base items
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
await modPool.LoadAsync();
|
||||
Avalonia.Threading.Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
var craftVm = provider.GetRequiredService<CraftingViewModel>();
|
||||
craftVm.LoadBaseItems();
|
||||
});
|
||||
});
|
||||
|
||||
var mainVm = provider.GetRequiredService<MainWindowViewModel>();
|
||||
mainVm.DebugVm = provider.GetRequiredService<DebugViewModel>();
|
||||
|
|
@ -72,6 +94,7 @@ public partial class App : Application
|
|||
mainVm.MappingVm = provider.GetRequiredService<MappingViewModel>();
|
||||
mainVm.AtlasVm = provider.GetRequiredService<AtlasViewModel>();
|
||||
mainVm.CraftingVm = provider.GetRequiredService<CraftingViewModel>();
|
||||
mainVm.MemoryVm = provider.GetRequiredService<MemoryViewModel>();
|
||||
|
||||
var window = new MainWindow { DataContext = mainVm };
|
||||
window.SetConfigStore(store);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue