initial BFS movement
This commit is contained in:
parent
25257e1517
commit
490fb8bdba
7 changed files with 258 additions and 101 deletions
|
|
@ -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...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue