initial BFS movement

This commit is contained in:
Boki 2026-02-13 16:56:44 -05:00
parent 25257e1517
commit 490fb8bdba
7 changed files with 258 additions and 101 deletions

View file

@ -236,6 +236,32 @@ public class BotOrchestrator : IAsyncDisposable
Log.Information("Bot started");
}
public async Task StartMapping()
{
LogWatcher.Start();
await Game.FocusGame();
Navigation.StateChanged += _ => UpdateExecutorState();
_started = true;
Emit("info", "Starting map exploration...");
State = "Exploring";
_ = Navigation.RunExploreLoop().ContinueWith(t =>
{
if (t.IsFaulted)
{
Log.Error(t.Exception!, "Explore loop failed");
Emit("error", $"Explore loop failed: {t.Exception?.InnerException?.Message}");
}
else
{
Emit("info", "Exploration finished");
}
State = "Idle";
StatusUpdated?.Invoke();
});
}
public async ValueTask DisposeAsync()
{
Log.Information("Shutting down bot...");