diff --git a/src/Autopelago/Game.cs b/src/Autopelago/Game.cs index 6c24f13..60ac754 100644 --- a/src/Autopelago/Game.cs +++ b/src/Autopelago/Game.cs @@ -116,6 +116,15 @@ private set } } + public FrozenDictionary SpoilerData + { + get + { + EnsureStarted(); + return _spoilerData!; + } + } + public int FoodFactor { get; private set; } public int LuckFactor { get; private set; } diff --git a/src/Autopelago/ViewModels/GameStateViewModel.cs b/src/Autopelago/ViewModels/GameStateViewModel.cs index 8072bf3..f4caa5a 100644 --- a/src/Autopelago/ViewModels/GameStateViewModel.cs +++ b/src/Autopelago/ViewModels/GameStateViewModel.cs @@ -104,6 +104,10 @@ where tt.Model is RatCountRequirement .Select(g => g.StartledCounter); HasConfidence = provider.CurrentGameState .Select(g => g.HasConfidence); + MovingToSmart = provider.CurrentGameState + .Select(g => g.TargetLocationReason == TargetLocationReason.PriorityPriority && g.SpoilerData[g.TargetLocation] == ArchipelagoItemFlags.LogicalAdvancement); + MovingToConspiratorial = provider.CurrentGameState + .Select(g => g.TargetLocationReason == TargetLocationReason.PriorityPriority && g.SpoilerData[g.TargetLocation] == ArchipelagoItemFlags.Trap); CurrentLocation = provider.CurrentGameState .Select(v => v.CurrentLocation); @@ -275,6 +279,10 @@ public void Dispose() public IObservable HasConfidence { get; } + public IObservable MovingToSmart { get; } + + public IObservable MovingToConspiratorial { get; } + public required ReactiveCommand BackToMainMenuCommand { get; init; } public ReactiveCommand PlayPauseCommand { get; } diff --git a/src/Autopelago/ViewModels/SettingsSelectionViewModel.cs b/src/Autopelago/ViewModels/SettingsSelectionViewModel.cs index 1d08fb1..9a7afc8 100644 --- a/src/Autopelago/ViewModels/SettingsSelectionViewModel.cs +++ b/src/Autopelago/ViewModels/SettingsSelectionViewModel.cs @@ -1,7 +1,6 @@ using System.Globalization; using System.Reactive; using System.Reactive.Disposables; -using System.Reactive.Linq; using System.Text.RegularExpressions; using ReactiveUI; @@ -23,8 +22,7 @@ public SettingsSelectionViewModel() portValue - decimal.Round(portValue) == 0 && !string.IsNullOrWhiteSpace(slot) && minStepSeconds > 0 && - maxStepSeconds >= minStepSeconds) - .DistinctUntilChanged(); + maxStepSeconds >= minStepSeconds); ConnectCommand = ReactiveCommand.Create(() => SettingsModel, canConnect); _subscriptions.Add(this diff --git a/src/Autopelago/Views/GameStateView.axaml b/src/Autopelago/Views/GameStateView.axaml index 0b64181..1e2fdd9 100644 --- a/src/Autopelago/Views/GameStateView.axaml +++ b/src/Autopelago/Views/GameStateView.axaml @@ -377,6 +377,20 @@ Canvas.Left="{Binding CurrentPoint^.X, Mode=OneWay}" Canvas.Top="{Binding CurrentPoint^.Y, Mode=OneWay}" RenderTransform="translate(2px, -3px)" /> + +