Skip to content

Commit

Permalink
Remove an unecessary check for wither skulls
Browse files Browse the repository at this point in the history
  • Loading branch information
DarwinBaker committed Nov 14, 2022
1 parent 8c1ee1d commit cad9c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions AATool/Data/Objectives/Complex/WitherSkulls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ public class WitherSkulls : ComplexObjective

private bool fullBeaconComplete;

private bool roseObtained;
private bool rosePlaced;
private bool beaconCrafted;
private bool beaconPlaced;
private bool witherKilled;
private bool skullsPlaced;

public int Required => Tracker.Category is AllBlocks ? 4 : 3;

Expand All @@ -54,37 +51,31 @@ protected override void UpdateAdvancedState(ProgressState progress)
? progress.AdvancementCompleted(LegacyBeaconator)
: progress.AdvancementCompleted(Beaconator);

this.skullsPlaced = progress.WasUsed(itemId);

//check wither rose status
this.roseObtained = progress.WasPickedUp(WitherRose);
this.rosePlaced = progress.WasUsed(WitherRose);

//check beacon status
this.beaconCrafted = progress.WasCrafted(Beacon);
this.beaconPlaced = progress.WasUsed(Beacon);

//check beacon status
this.witherKilled = progress.CriterionCompleted(MonsterHunter, Wither);

if (Tracker.Category is AllBlocks)
{
this.CompletionOverride = this.EstimatedObtained >= this.Required || this.skullsPlaced
this.CompletionOverride = this.EstimatedObtained >= this.Required
|| this.witherKilled || this.rosePlaced || this.beaconPlaced;
}
else
{
this.CompletionOverride = this.EstimatedObtained >= this.Required || this.skullsPlaced
this.CompletionOverride = this.EstimatedObtained >= this.Required
|| this.fullBeaconComplete || this.witherKilled;
}
}

protected override void ClearAdvancedState()
{
this.EstimatedObtained = 0;
this.roseObtained = false;
this.rosePlaced = false;
this.beaconCrafted = false;
this.beaconPlaced = false;
this.witherKilled = false;
}
Expand Down
4 changes: 2 additions & 2 deletions AATool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.5.1.0")]
[assembly: AssemblyFileVersion("1.5.1.0")]
[assembly: AssemblyVersion("1.5.1.1")]
[assembly: AssemblyFileVersion("1.5.1.1")]
[assembly: NeutralResourcesLanguage("en")]

0 comments on commit cad9c16

Please sign in to comment.