Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spatison committed Sep 3, 2024
1 parent 31387af commit 6cc4683
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ public async Task CancelTilePry()
{
await SetTile(Floor);
await Interact(Pry, awaitDoAfters: false);

// WD EDIT START
if (!ActiveDoAfters.Any())
{
await AssertTile(Plating);
return;
}
// WD EDIT END

await CancelDoAfters();
await AssertTile(Floor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,14 @@ protected async Task AwaitDoAfters(bool shouldSucceed = true, int maxExpected =
/// Cancel any currently active DoAfters. Default arguments are such that it also checks that there is at least one
/// active DoAfter to cancel.
/// </summary>
protected async Task CancelDoAfters(int minExpected = 0, int maxExpected = 1)
protected async Task CancelDoAfters(int minExpected = 1, int maxExpected = 1)
{
Assert.That(ActiveDoAfters.Count(), Is.GreaterThanOrEqualTo(minExpected));
Assert.That(ActiveDoAfters.Count(), Is.LessThanOrEqualTo(maxExpected));

if (!ActiveDoAfters.Any())
return;

// Cancel all the do-afters
var doAfters = ActiveDoAfters.ToList();
await Server.WaitPost(() =>
Expand Down

0 comments on commit 6cc4683

Please sign in to comment.