diff --git a/AATool/AATool.csproj b/AATool/AATool.csproj
index 0c4c567d..37172e4f 100644
--- a/AATool/AATool.csproj
+++ b/AATool/AATool.csproj
@@ -158,6 +158,7 @@
+
@@ -527,6 +528,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -1184,6 +1188,12 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -1676,6 +1686,12 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -2477,6 +2493,12 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -2555,6 +2577,18 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -2699,12 +2733,18 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -2789,6 +2829,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -2861,6 +2904,12 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -9401,7 +9450,9 @@
Designer
-
+
+
+
diff --git a/AATool/Data/Categories/AllPortals.cs b/AATool/Data/Categories/AllPortals.cs
index e9907911..2ec3e952 100644
--- a/AATool/Data/Categories/AllPortals.cs
+++ b/AATool/Data/Categories/AllPortals.cs
@@ -1,81 +1,16 @@
using System;
using System.Collections.Generic;
using AATool.Data.Objectives;
+using AATool.Data.Speedrunning;
using Microsoft.Xna.Framework;
namespace AATool.Data.Categories
{
- class StrongholdRing
- {
- const int Thickness = 1536;
-
- public int StrongholdCount { get; }
- public int FilledPortals { get; }
- public int StartDistance { get; }
- public int EndDistance { get; }
-
- public int OptimalBlindDistance => this.StartDistance + (Thickness / 2);
-
- public Point ReferenceStronghold { get; private set; }
- public Point[] BlindEstimates { get; private set; }
- public float AngleBetween { get; private set; }
- public float AngleOffset { get; private set; }
-
- public StrongholdRing(int strongholdCount, int startDistance)
- {
- this.BlindEstimates = new Point[strongholdCount - 1];
- this.StrongholdCount = strongholdCount;
- this.StartDistance = startDistance;
- this.EndDistance = startDistance + Thickness;
- this.AngleBetween = MathHelper.TwoPi / this.StrongholdCount;
- }
-
- public void SetReferenceStronghold(Point coords)
- {
- this.AngleOffset = Angle(Point.Zero, coords);
- this.CalculateOptimalBlindCoordinates();
- }
-
- private void CalculateOptimalBlindCoordinates()
- {
- double nextAngle = this.AngleOffset + this.AngleBetween;
- for (int i = 0; i < this.BlindEstimates.Length; i++)
- {
- nextAngle += this.AngleBetween;
- this.BlindEstimates[i] = this.EstimatedBlindCoordinates(nextAngle);
- }
- }
-
- public void ClearProgress()
- {
-
- }
-
- private static float Angle(Point start, Point end)
- {
- return (float)Math.Atan2(end.Y - start.Y, end.X - start.X);
- }
-
- private static double Distance(Point start, Point end)
- {
- double deltaX = Math.Pow(end.X - start.X, 2);
- double deltaY = Math.Pow(end.Y - start.Y, 2);
- return (float)Math.Sqrt(deltaY + deltaX);
- }
-
- private Point EstimatedBlindCoordinates(double angle)
- {
- int x = (int)Math.Round(this.OptimalBlindDistance * Math.Cos(angle));
- int y = (int)Math.Round(this.OptimalBlindDistance * Math.Sin(angle));
- return new Point(x, y);
- }
- }
-
internal class AllPortals : Category
{
const int TotalStrongholds = 128;
- static readonly List Rings = new()
+ public static readonly List Rings = new()
{
new StrongholdRing(3, 1280),
new StrongholdRing(6, 4352),
@@ -87,6 +22,12 @@ internal class AllPortals : Category
new StrongholdRing(9, 22783),
};
+ static readonly List TestValues = new()
+ {
+ new Point(1700, 1200),
+ new Point(11770, 6700),
+ };
+
public static readonly List SupportedVersions = new () {
"1.16",
};
@@ -108,6 +49,15 @@ public AllPortals()
public override void LoadObjectives()
{
+ foreach (Point testValue in TestValues)
+ this.FillPortal(testValue);
+ }
+
+ public void FillPortal(Point coordinates)
+ {
+ StrongholdRing ring = this.ClosestRing(coordinates);
+ ring.FillPortal(coordinates);
+ this.UpdateTotals();
}
public void ClearProgress()
@@ -121,7 +71,31 @@ private void UpdateTotals()
{
this.filledPortals = 0;
foreach (StrongholdRing ring in Rings)
- this.filledPortals += ring.FilledPortals;
+ this.filledPortals += ring.FilledPortalCount;
+ }
+
+ private StrongholdRing ClosestRing(Point coordinates)
+ {
+ double distanceFromOrigin = DistanceBetween(Point.Zero, coordinates);
+ double smallestDifference = double.MaxValue;
+ StrongholdRing closest = Rings[0];
+ for (int i = 0; i < Rings.Count; i++)
+ {
+ double ringDifference = Math.Abs(distanceFromOrigin - Rings[i].OptimalBlindDistance);
+ if (ringDifference < smallestDifference)
+ {
+ smallestDifference = ringDifference;
+ closest = Rings[i];
+ }
+ }
+ return closest;
+ }
+
+ private static double DistanceBetween(Point start, Point end)
+ {
+ double deltaX = Math.Pow(end.X - start.X, 2);
+ double deltaY = Math.Pow(end.Y - start.Y, 2);
+ return (float)Math.Sqrt(deltaY + deltaX);
}
}
}
diff --git a/AATool/Data/Credits.cs b/AATool/Data/Credits.cs
index 26b3320b..604eb007 100644
--- a/AATool/Data/Credits.cs
+++ b/AATool/Data/Credits.cs
@@ -43,6 +43,10 @@ public static class Credits
public const string Illumina = "46405168-e9ce-40a0-99a4-0b989a912c77";
public const string IlluminaName = "illumina";
+ //first to complete 100 hardcore runs in a row without dying
+ public const string Feinberg = "9a8e24df-4c85-49d6-96a6-951da84fa5c4";
+ public const string FeinbergName = "feinberg";
+
private static bool Initialized = false;
private static Dictionary ByName = new Dictionary();
diff --git a/AATool/Data/Objectives/Complex/Bees.cs b/AATool/Data/Objectives/Complex/Bees.cs
index ec6dc424..7e015db8 100644
--- a/AATool/Data/Objectives/Complex/Bees.cs
+++ b/AATool/Data/Objectives/Complex/Bees.cs
@@ -18,6 +18,8 @@ class Bees : ComplexObjective
private const string BalancedDiet = "minecraft:husbandry/balanced_diet";
private const string TwoByTwo = "minecraft:husbandry/bred_all_animals";
private const string StickySituation = "minecraft:adventure/honey_block_slide";
+ private const string WaxOn = "minecraft:husbandry/wax_on";
+ private const string WaxOff = "minecraft:husbandry/wax_off";
private const string HoneyBottle = "honey_bottle";
private const string Bee = "minecraft:bee";
@@ -36,6 +38,8 @@ class Bees : ComplexObjective
private bool totalBeelocation;
private bool beeOurGuest;
private bool stickySituation;
+ private bool waxOn;
+ private bool waxOff;
private bool drinkHoney;
private bool breedBees;
@@ -98,6 +102,9 @@ public Bees() : base()
private bool CopperAndCandlesAdded => Version.TryParse(Tracker.Category.CurrentVersion,
out Version current) && current >= CavesAndCliffsPartOne;
+ private bool WaxAdvancementsAdded => Version.TryParse(Tracker.Category.CurrentVersion,
+ out Version current) && current >= CavesAndCliffsPartOne;
+
protected override void UpdateAdvancedState(ProgressState progress)
{
this.estimatedCount = progress.TimesPickedUp(BlockId)
@@ -122,6 +129,8 @@ protected override void UpdateAdvancedState(ProgressState progress)
this.totalBeelocation = progress.AdvancementCompleted(TotalBeelocation);
this.beeOurGuest = progress.AdvancementCompleted(BeeOurGuest);
this.stickySituation = progress.AdvancementCompleted(StickySituation);
+ this.waxOn = progress.AdvancementCompleted(WaxOn);
+ this.waxOff = progress.AdvancementCompleted(WaxOff);
this.balancedDiet = progress.AdvancementCompleted(BalancedDiet);
this.twoByTwo = progress.AdvancementCompleted(TwoByTwo);
@@ -163,6 +172,10 @@ private void BuildRemainingObjectiveList()
this.remainingObjectives.Add("Needs\0To\nDrink\0Honey");
if (!this.breedBees && !this.twoByTwo)
this.remainingObjectives.Add("Needs\0To\nBreed\0Bees");
+ if (WaxAdvancementsAdded && !this.waxOn)
+ this.remainingObjectives.Add("Still\0Needs\nWax\0On");
+ if (WaxAdvancementsAdded && !this.waxOff)
+ this.remainingObjectives.Add("Still\0Needs\nWax\0Off");
}
}
@@ -196,6 +209,8 @@ protected override void ClearAdvancedState()
this.totalBeelocation = false;
this.beeOurGuest = false;
this.stickySituation = false;
+ this.waxOn = false;
+ this.waxOff = false;
this.drinkHoney = false;
this.balancedDiet = false;
diff --git a/AATool/Data/Speedrunning/StrongholdRing.cs b/AATool/Data/Speedrunning/StrongholdRing.cs
new file mode 100644
index 00000000..f80d3436
--- /dev/null
+++ b/AATool/Data/Speedrunning/StrongholdRing.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+
+namespace AATool.Data.Speedrunning
+{
+ class StrongholdRing
+ {
+ const int Thickness = 1536;
+
+ public int TotalStrongholdCount { get; }
+ public int FilledPortalCount { get; }
+ public int StartDistance { get; }
+ public int EndDistance { get; }
+
+ public int OptimalBlindDistance => this.StartDistance + (Thickness / 2);
+
+ public Point ReferenceStronghold { get; private set; }
+ public Point[] BlindEstimates { get; private set; }
+ public List FilledPortals { get; private set; }
+ public float AngleBetweenStrongholds { get; private set; }
+ public float AngleOffset { get; private set; }
+ public int Diameter => this.EndDistance * 2;
+
+ public StrongholdRing(int strongholdCount, int startDistance)
+ {
+ this.FilledPortals = new List();
+ this.BlindEstimates = new Point[strongholdCount - 1];
+ this.TotalStrongholdCount = strongholdCount;
+ this.StartDistance = startDistance;
+ this.EndDistance = startDistance + Thickness;
+ this.AngleBetweenStrongholds = MathHelper.TwoPi / this.TotalStrongholdCount;
+ }
+
+ public void FillPortal(Point coords)
+ {
+ if (this.FilledPortals.Count >= this.TotalStrongholdCount)
+ return;
+
+ if (!this.FilledPortals.Any())
+ this.SetReferenceStronghold(coords);
+
+ this.FilledPortals.Add(coords);
+ }
+
+ public void SetReferenceStronghold(Point coords)
+ {
+ this.AngleOffset = Angle(Point.Zero, coords);
+ this.CalculateOptimalBlindCoordinates();
+ }
+
+ private void CalculateOptimalBlindCoordinates()
+ {
+ double nextAngle = this.AngleOffset + this.AngleBetweenStrongholds;
+ for (int i = 0; i < this.BlindEstimates.Length; i++)
+ {
+ nextAngle += this.AngleBetweenStrongholds;
+ this.BlindEstimates[i] = this.EstimatedBlindCoordinates(nextAngle);
+ }
+ }
+
+ public void ClearProgress()
+ {
+
+ }
+
+ private static float Angle(Point start, Point end)
+ {
+ return (float)Math.Atan2(end.Y - start.Y, end.X - start.X);
+ }
+
+ private Point EstimatedBlindCoordinates(double angle)
+ {
+ int x = (int)Math.Round(this.OptimalBlindDistance * Math.Cos(angle));
+ int y = (int)Math.Round(this.OptimalBlindDistance * Math.Sin(angle));
+ return new Point(x, y);
+ }
+ }
+}
diff --git a/AATool/Properties/AssemblyInfo.cs b/AATool/Properties/AssemblyInfo.cs
index c6b25688..8fd8a8f7 100644
--- a/AATool/Properties/AssemblyInfo.cs
+++ b/AATool/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.6.0.2")]
-[assembly: AssemblyFileVersion("1.6.0.2")]
+[assembly: AssemblyVersion("1.6.1.0")]
+[assembly: AssemblyFileVersion("1.6.1.0")]
[assembly: NeutralResourcesLanguage("en")]
diff --git a/AATool/Saves/MinecraftServer.cs b/AATool/Saves/MinecraftServer.cs
index a7ce835e..1b9e7f19 100644
--- a/AATool/Saves/MinecraftServer.cs
+++ b/AATool/Saves/MinecraftServer.cs
@@ -306,7 +306,7 @@ private static bool TryGetWorldSaveTime(SftpClient sftp, out DateTime lastWorldS
SetState(SyncState.LastAutoSave);
string remote = Path.Combine(Config.Sftp.ServerRoot, WorldName, "level.dat");
lastWorldSave = default;
-
+
try
{
lastWorldSave = sftp.GetLastWriteTimeUtc(remote);
diff --git a/AATool/UI/Badges/Badge.cs b/AATool/UI/Badges/Badge.cs
index 5047a6c5..f0052d6e 100644
--- a/AATool/UI/Badges/Badge.cs
+++ b/AATool/UI/Badges/Badge.cs
@@ -52,7 +52,7 @@ public static bool TryGet(Uuid uuid, string name, bool onLeaderboard, string cat
//legendary badges
- if (badge is null && !onLeaderboard && !supporterOverride)
+ if (!onLeaderboard && !supporterOverride)
TryGiveLegendaryBadge(uuid, name, ref badge);
//unique badges
@@ -92,8 +92,9 @@ private static void TryGiveLegendaryBadge(Uuid uuid, string name, ref Badge badg
string player = uuid != Uuid.Empty ? uuid.String : name;
badge = player switch {
Credits.Elysaku or Credits.ElysakuName => new HalfHeartHardcoreBadge(),
- Credits.Couriway or Credits.CouriwayName => new ThousandSeedsBadge(Credits.CouriwayName),
- Credits.MoleyG or Credits.MoleyGName => new ThousandSeedsBadge(Credits.MoleyGName),
+ Credits.Couriway or Credits.CouriwayName => new NoResetsBadge(Credits.CouriwayName, 2),
+ Credits.MoleyG or Credits.MoleyGName => new NoResetsBadge(Credits.MoleyGName, 1),
+ Credits.Feinberg or Credits.FeinbergName => new HundredHardcoreBadge(),
_ => null
};
}
diff --git a/AATool/UI/Badges/HundredHardcoreBadge.cs b/AATool/UI/Badges/HundredHardcoreBadge.cs
index 3a36e669..f1861436 100644
--- a/AATool/UI/Badges/HundredHardcoreBadge.cs
+++ b/AATool/UI/Badges/HundredHardcoreBadge.cs
@@ -24,7 +24,7 @@ public HundredHardcoreBadge() : base()
this.Glow.SetTexture("badge_large_gold_glow");
this.Glow.SkipToBrightness(0.75f);
- this.Description.SetText("Complete 100 deathless\nHC no-reset Any% in a row");
+ this.Description.SetText("Completed 100 deathless\nHC no-reset Any% in a row");
}
}
}
\ No newline at end of file
diff --git a/AATool/UI/Badges/HundredThousandBadge.cs b/AATool/UI/Badges/HundredThousandBadge.cs
index ccd69c57..16f5cb62 100644
--- a/AATool/UI/Badges/HundredThousandBadge.cs
+++ b/AATool/UI/Badges/HundredThousandBadge.cs
@@ -6,7 +6,7 @@
namespace AATool.UI.Badges
{
- class HundredThousandBadge : ThousandSeedsBadge
+ class HundredThousandBadge : NoResetsBadge
{
private const string ThousandSeedsBack = "badge_1k_couriway";
private const string ThousandSeedsText = "badge_1k_text";
@@ -19,7 +19,7 @@ class HundredThousandBadge : ThousandSeedsBadge
private static long LastFrameUpdated = -1;
private static bool VariantsInitialized = false;
- public HundredThousandBadge(string player) : base (player)
+ public HundredThousandBadge(string player) : base (player, 1)
{
if (!VariantsInitialized)
{
diff --git a/AATool/UI/Badges/ThousandSeedsBadge.cs b/AATool/UI/Badges/ThousandSeedsBadge.cs
index 9b40222c..010ddd7b 100644
--- a/AATool/UI/Badges/ThousandSeedsBadge.cs
+++ b/AATool/UI/Badges/ThousandSeedsBadge.cs
@@ -3,14 +3,17 @@
namespace AATool.UI.Badges
{
- class ThousandSeedsBadge : Badge
+ class NoResetsBadge : Badge
{
- public override string GetListName => "1,000 Seeds";
+ private int thousand;
- public ThousandSeedsBadge(string player) : base()
+ public override string GetListName => $"{this.thousand},000 Seeds";
+
+ public NoResetsBadge(string player, int thousand) : base()
{
+ this.thousand = thousand;
this.BackTexture = $"badge_1k_{player}";
- this.TextTexture = "badge_1k_text";
+ this.TextTexture = $"badge_{this.thousand}k_text";
if (player is Credits.CouriwayName)
{
@@ -29,7 +32,7 @@ public ThousandSeedsBadge(string player) : base()
this.FlexHeight = new (15);
this.Margin = new Margin (-10, -0, -7, 0);
- this.Description.SetText("Completed Any% on 1,000\nseeds without resetting");
+ this.Description.SetText($"Completed Any% on {thousand},000\nseeds without resetting");
this.Description.SetTextColor(Color.White);
this.Glow.SetTexture("badge_large_gold_glow");
diff --git a/AATool/UI/Controls/UICoordinateGrid.cs b/AATool/UI/Controls/UICoordinateGrid.cs
index d76614ae..2bbd11a0 100644
--- a/AATool/UI/Controls/UICoordinateGrid.cs
+++ b/AATool/UI/Controls/UICoordinateGrid.cs
@@ -22,12 +22,12 @@ class UICoordinateGrid : UIControl
private Color backColor;
private Color lineColor;
- private float blocksPerSquare = 512;
- private float viewScale = 64;
- private float coordScale = 1;
+ protected float BlocksPerSquare = 512;
+ protected float ViewScale = 64;
+ protected float CoordScale = 1;
- private Vector2 offset = Vector2.Zero;
- private Vector2 targetOffset = Vector2.Zero;
+ protected Vector2 Offset = Vector2.Zero;
+ protected Vector2 targetOffset = Vector2.Zero;
public UICoordinateGrid()
{
@@ -44,7 +44,7 @@ protected override void UpdateThis(Time time)
this.UpdateOffset(time);
float targetScale = this.IsNether ? NetherScale : 1;
- this.coordScale = MathHelper.Lerp(this.coordScale, targetScale, 16 * (float)time.Delta);
+ this.CoordScale = MathHelper.Lerp(this.CoordScale, targetScale, 16 * (float)time.Delta);
Color targetBackColor = this.IsNether ? NetherBackColor : OverworldBackColor;
int r = (int)MathHelper.Lerp(this.backColor.R, targetBackColor.R, 4 * (float)time.Delta);
@@ -71,9 +71,9 @@ private void UpdateOffset(Time time)
this.targetOffset += new Vector2(0, 10);
float lerpAmount = 15 * (float)time.Delta;
- float x = MathHelper.Lerp(this.offset.X, this.targetOffset.X, lerpAmount);
- float y = MathHelper.Lerp(this.offset.Y, this.targetOffset.Y, lerpAmount);
- this.offset = new Vector2(x, y);
+ float x = MathHelper.Lerp(this.Offset.X, this.targetOffset.X, lerpAmount);
+ float y = MathHelper.Lerp(this.Offset.Y, this.targetOffset.Y, lerpAmount);
+ this.Offset = new Vector2(x, y);
}
public void Recenter()
@@ -98,21 +98,9 @@ private void DrawGrid(Canvas canvas)
//display.DrawRectangle(new Rectangle(ContentRectangle.X - 24, ContentRectangle.Y - 24, ContentRectangle.Width + 48, ContentRectangle.Height + 48), backColor);
canvas.DrawRectangle(this.Inner, this.backColor, this.lineColor, 1, Layer.Fore);
- /*
- foreach (var marker in Markers)
- {
- var offset = ToScreenSpace(marker.X, marker.Z);
-
- //vertical
- display.DrawRectangle(new Rectangle(offset.X, bounds.Top, 1, 512), lineColor);
- //horizontal
- display.DrawRectangle(new Rectangle(bounds.Left, offset.Y, 512, 1), lineColor);
- }
- */
-
- float cellSize = Math.Abs(this.blocksPerSquare / this.viewScale / this.coordScale);
- int wrappedX = (int)Math.Round(this.offset.X % cellSize);
- int wrappedY = (int)Math.Round(this.offset.Y % cellSize);
+ float cellSize = Math.Abs(this.BlocksPerSquare / this.ViewScale / this.CoordScale);
+ int wrappedX = (int)Math.Round(this.Offset.X % cellSize);
+ int wrappedY = (int)Math.Round(this.Offset.Y % cellSize);
var wrappedOffset = new Point(wrappedX, wrappedY);
//vertical
@@ -133,8 +121,8 @@ private void DrawGrid(Canvas canvas)
}
//origin lines
- canvas.DrawRectangle(new Rectangle(Inner.Center.X - (int)Math.Round(offset.X), Inner.Top, 1, Height), Color.Black * 0.25f, null, 0, Layer.Fore);
- canvas.DrawRectangle(new Rectangle(Inner.Left, Inner.Center.Y - (int)Math.Round(offset.Y), Width, 1), Color.Black * 0.25f, null, 0, Layer.Fore);
+ canvas.DrawRectangle(new Rectangle(Inner.Center.X - (int)Math.Round(Offset.X), Inner.Top, 1, Height), Color.Black * 0.25f, null, 0, Layer.Fore);
+ canvas.DrawRectangle(new Rectangle(Inner.Left, Inner.Center.Y - (int)Math.Round(Offset.Y), Width, 1), Color.Black * 0.25f, null, 0, Layer.Fore);
}
private void DrawEdges(Canvas canvas)
diff --git a/AATool/UI/Controls/UIRecordGraph.cs b/AATool/UI/Controls/UIRecordGraph.cs
index 6b8745d5..ed27b3d2 100644
--- a/AATool/UI/Controls/UIRecordGraph.cs
+++ b/AATool/UI/Controls/UIRecordGraph.cs
@@ -13,16 +13,16 @@ namespace AATool.UI.Controls
{
class UIRecordGraph : UIPanel
{
- private readonly Dictionary records;
-
public string Category { get; private set; }
public string Version { get; private set; }
private bool upToDate;
- public bool LiveHistoryAvailable => SpreadsheetRequest.DownloadedPages.Contains((Paths.Web.AASheet, Paths.Web.PrimaryAAHistory));
+ public bool LiveHistoryAvailable => SpreadsheetRequest.DownloadedPages.Contains(
+ (Paths.Web.AASheet, Paths.Web.PrimaryAAHistory));
+
+ readonly List records = new();
- /*
public override void InitializeRecursive(UIScreen screen)
{
base.InitializeRecursive(screen);
@@ -33,7 +33,7 @@ public override void InitializeRecursive(UIScreen screen)
if (!this.LiveHistoryAvailable)
{
- //new SpreadsheetRequest(Paths.Web.AASheet, Paths.Web.PrimaryAAHistory).EnqueueOnce();
+ new SpreadsheetRequest("history", Paths.Web.AASheet, Paths.Web.PrimaryAAHistory).EnqueueOnce();
//new SpreadsheetRequest(Paths.Web.NicknameSheet).EnqueueOnce();
}
}
@@ -56,21 +56,71 @@ private void Clear()
private void Populate(LeaderboardSheet history)
{
//WIP
- string records = string.Empty;
- bool valid = true;
- int row = 1;
+ string test = string.Empty;
TimeSpan wr = TimeSpan.MaxValue;
- while (valid)
+ int row = 1;
+ while (row <= history.Rows.Length)
{
- //valid = Run.TryParse(history, row, out Run run);
- if (valid && run.InGameTime < wr)
+ if (Run.TryParse(history, row, "1.16", out Run run))
{
wr = run.InGameTime;
- records += $"{run.Runner} - {wr.ToString()}\n";
+ this.records.Add(run);
+ test += $"{run.Runner} - {wr}\n";
}
row++;
}
}
- */
+
+ private void RefreshLayout()
+ {
+
+ }
+
+ public override void DrawThis(Canvas canvas)
+ {
+ base.DrawThis(canvas);
+ if (this.records.Count <= 1)
+ return;
+
+ Run firstPlace = this.records.Last();
+ Run lastPlace = this.records.First();
+
+ double newest = TimeSpan.FromTicks(firstPlace.Date.Ticks).TotalSeconds;
+ double oldest = TimeSpan.FromTicks(lastPlace.Date.Ticks).TotalSeconds;
+ double dateRange = oldest - newest;
+
+ double slowest = lastPlace.InGameTime.TotalSeconds;
+ double fastest = firstPlace.InGameTime.TotalSeconds;
+ double timeRange = slowest - fastest;
+
+ int slowestHours = (int)Math.Round(lastPlace.InGameTime.TotalHours, MidpointRounding.AwayFromZero);
+ int fastestHours = (int)Math.Round(firstPlace.InGameTime.TotalHours, MidpointRounding.AwayFromZero);
+
+ for (int i = fastestHours; i < slowestHours; i++)
+ {
+ double y = (slowest - (i * 60 * 60)) / (slowest - fastest);
+ y *= this.Inner.Height;
+ y += this.Inner.Top;
+ var line = new Rectangle(this.Left, (int)y, this.Bounds.Width, 1);
+ canvas.DrawRectangle(line, Color.White * 0.4f, null, 0, Layer.Fore);
+ }
+
+ foreach (Run run in this.records)
+ {
+ double runDateSeconds = TimeSpan.FromTicks(run.Date.Ticks).TotalSeconds;
+ double x = (oldest - runDateSeconds) / (oldest - newest);
+ x *= this.Inner.Width;
+ x += this.Inner.Left;
+
+ double y = (slowest - run.InGameTime.TotalSeconds) / (slowest - fastest);
+ y *= this.Inner.Height;
+ y += this.Inner.Top;
+
+ int halfSize = 8;
+ var avatar = new Rectangle((int)x - halfSize, (int)y - halfSize, halfSize * 2, halfSize * 2);
+
+ canvas.Draw("avatar-" + run.Runner.ToLower(), avatar, Color.White, Layer.Fore);
+ }
+ }
}
}
diff --git a/AATool/UI/Controls/UIStrongholdMap.cs b/AATool/UI/Controls/UIStrongholdMap.cs
index 0fd32d4c..a8311470 100644
--- a/AATool/UI/Controls/UIStrongholdMap.cs
+++ b/AATool/UI/Controls/UIStrongholdMap.cs
@@ -1,8 +1,35 @@
+using System;
+using AATool.Data.Categories;
+using AATool.Data.Speedrunning;
+using AATool.Graphics;
+using FontStashSharp;
+using Microsoft.Xna.Framework;
+
namespace AATool.UI.Controls
{
internal class UIStrongholdMap : UICoordinateGrid
{
+ public override void DrawThis(Canvas canvas)
+ {
+ base.DrawThis(canvas);
+ if (Tracker.Category is not AllPortals category)
+ return;
+
+ foreach (StrongholdRing ring in AllPortals.Rings)
+ this.DrawRing(canvas, ring);
+ }
+
+ private void DrawRing(Canvas canvas, StrongholdRing ring)
+ {
+ float cellSize = Math.Abs(this.BlocksPerSquare / this.ViewScale / this.CoordScale);
+ int wrappedX = (int)Math.Round(this.Offset.X % cellSize);
+ int wrappedY = (int)Math.Round(this.Offset.Y % cellSize);
+ var wrappedOffset = new Point(wrappedX, wrappedY);
+ int size = ring.Diameter;
+ var bounds = new Rectangle(-ring.EndDistance, -ring.EndDistance, size, size);
+ canvas.Draw("stronghold_ring", bounds, Color.White * 0.25f, Layer.Fore);
+ }
}
}
diff --git a/AATool/UI/Screens/UIMainScreen.cs b/AATool/UI/Screens/UIMainScreen.cs
index 025e65cf..c31254aa 100644
--- a/AATool/UI/Screens/UIMainScreen.cs
+++ b/AATool/UI/Screens/UIMainScreen.cs
@@ -141,6 +141,8 @@ public override string GetCurrentView()
string view = Tracker.Category.ViewName;
string version = Tracker.Category.CurrentMajorVersion ?? Tracker.Category.CurrentVersion;
+ //return Path.Combine(Paths.System.ViewsFolder, "other", "primary_version.xml");
+
if (ActiveTab is HelpTab)
return Path.Combine(Paths.System.ViewsFolder, view, version, $"help.xml");
diff --git a/AATool/assets/objectives/1.16/blocks.xml b/AATool/assets/objectives/1.16/blocks.xml
index e8575015..efb0d898 100644
--- a/AATool/assets/objectives/1.16/blocks.xml
+++ b/AATool/assets/objectives/1.16/blocks.xml
@@ -378,9 +378,9 @@
-
+
-
+
diff --git a/AATool/assets/objectives/1.18/blocks.xml b/AATool/assets/objectives/1.18/blocks.xml
index 8a95e037..d7a893f5 100644
--- a/AATool/assets/objectives/1.18/blocks.xml
+++ b/AATool/assets/objectives/1.18/blocks.xml
@@ -474,9 +474,9 @@
-
+
-
+
diff --git a/AATool/assets/objectives/1.20 Snapshot/advancements/adventure.xml b/AATool/assets/objectives/1.20 Snapshot/advancements/adventure.xml
index 9869cdc1..2c19ecda 100644
--- a/AATool/assets/objectives/1.20 Snapshot/advancements/adventure.xml
+++ b/AATool/assets/objectives/1.20 Snapshot/advancements/adventure.xml
@@ -43,8 +43,8 @@
-
+
@@ -59,8 +59,8 @@
-
+
@@ -78,6 +78,7 @@
+
diff --git a/AATool/assets/objectives/1.20 Snapshot/advancements/husbandry.xml b/AATool/assets/objectives/1.20 Snapshot/advancements/husbandry.xml
index bcf0897c..33356be3 100644
--- a/AATool/assets/objectives/1.20 Snapshot/advancements/husbandry.xml
+++ b/AATool/assets/objectives/1.20 Snapshot/advancements/husbandry.xml
@@ -34,6 +34,7 @@
+
diff --git a/AATool/assets/objectives/1.20 Snapshot/blocks.xml b/AATool/assets/objectives/1.20 Snapshot/blocks.xml
index 6d5fca1c..5b89e78e 100644
--- a/AATool/assets/objectives/1.20 Snapshot/blocks.xml
+++ b/AATool/assets/objectives/1.20 Snapshot/blocks.xml
@@ -183,18 +183,14 @@
-
-
-
-
+
+
-
-
-
+
@@ -210,6 +206,7 @@
+
@@ -218,16 +215,16 @@
-
-
+
+
+
-
@@ -242,16 +239,16 @@
+
-
-
-
+
+
@@ -284,6 +281,12 @@
+
+
+
+
+
+
@@ -341,6 +344,7 @@
+
@@ -359,7 +363,6 @@
-
@@ -369,8 +372,10 @@
+
+
@@ -479,28 +484,26 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
@@ -549,9 +552,6 @@
-
-
-
@@ -559,10 +559,10 @@
-
-
+
+
@@ -570,11 +570,13 @@
-
+
+
+
+
-
-
+
@@ -612,18 +614,20 @@
+
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -652,7 +656,6 @@
-
@@ -660,10 +663,11 @@
+
+
-
-
-
+
+
@@ -672,36 +676,39 @@
+
-
+
+
+
-
-
+
+
+
+
-
-
-
-
+
+
+
-
@@ -715,7 +722,7 @@
-
+
@@ -741,10 +748,8 @@
+
-
-
-
@@ -952,6 +957,7 @@
+
diff --git a/AATool/assets/sprites/ab_guide/grass_and_fern$2x2x30.png b/AATool/assets/sprites/ab_guide/grass_and_fern$2x2x30.png
new file mode 100644
index 00000000..0b4b411e
Binary files /dev/null and b/AATool/assets/sprites/ab_guide/grass_and_fern$2x2x30.png differ
diff --git a/AATool/assets/sprites/blocks/cherry/cherry_door^32.png b/AATool/assets/sprites/blocks/cherry/cherry_door^32.png
new file mode 100644
index 00000000..bfb8ba1e
Binary files /dev/null and b/AATool/assets/sprites/blocks/cherry/cherry_door^32.png differ
diff --git a/AATool/assets/sprites/blocks/cherry/cherry_door^48.png b/AATool/assets/sprites/blocks/cherry/cherry_door^48.png
new file mode 100644
index 00000000..96e31cc7
Binary files /dev/null and b/AATool/assets/sprites/blocks/cherry/cherry_door^48.png differ
diff --git a/AATool/assets/sprites/blocks/dirt/suspicious_gravel^32.png b/AATool/assets/sprites/blocks/dirt/suspicious_gravel^32.png
new file mode 100644
index 00000000..f8f2f281
Binary files /dev/null and b/AATool/assets/sprites/blocks/dirt/suspicious_gravel^32.png differ
diff --git a/AATool/assets/sprites/blocks/dirt/suspicious_gravel^48.png b/AATool/assets/sprites/blocks/dirt/suspicious_gravel^48.png
new file mode 100644
index 00000000..76813712
Binary files /dev/null and b/AATool/assets/sprites/blocks/dirt/suspicious_gravel^48.png differ
diff --git a/AATool/assets/sprites/blocks/misc/sniffer_egg^32.png b/AATool/assets/sprites/blocks/misc/sniffer_egg^32.png
new file mode 100644
index 00000000..7e69fe67
Binary files /dev/null and b/AATool/assets/sprites/blocks/misc/sniffer_egg^32.png differ
diff --git a/AATool/assets/sprites/blocks/misc/sniffer_egg^48.png b/AATool/assets/sprites/blocks/misc/sniffer_egg^48.png
new file mode 100644
index 00000000..700fbae1
Binary files /dev/null and b/AATool/assets/sprites/blocks/misc/sniffer_egg^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/beetroots^32.png b/AATool/assets/sprites/blocks/plants/beetroots^32.png
index 4340b2a2..38665ca0 100644
Binary files a/AATool/assets/sprites/blocks/plants/beetroots^32.png and b/AATool/assets/sprites/blocks/plants/beetroots^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/beetroots^48.png b/AATool/assets/sprites/blocks/plants/beetroots^48.png
index 365f44fe..f358f4e3 100644
Binary files a/AATool/assets/sprites/blocks/plants/beetroots^48.png and b/AATool/assets/sprites/blocks/plants/beetroots^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/carrots^32.png b/AATool/assets/sprites/blocks/plants/carrots^32.png
index a93c99ff..0948bbdc 100644
Binary files a/AATool/assets/sprites/blocks/plants/carrots^32.png and b/AATool/assets/sprites/blocks/plants/carrots^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/carrots^48.png b/AATool/assets/sprites/blocks/plants/carrots^48.png
index 6d42fdca..0c1f7940 100644
Binary files a/AATool/assets/sprites/blocks/plants/carrots^48.png and b/AATool/assets/sprites/blocks/plants/carrots^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/pitcher_plant^32.png b/AATool/assets/sprites/blocks/plants/pitcher_plant^32.png
new file mode 100644
index 00000000..224f15d4
Binary files /dev/null and b/AATool/assets/sprites/blocks/plants/pitcher_plant^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/pitcher_plant^48.png b/AATool/assets/sprites/blocks/plants/pitcher_plant^48.png
new file mode 100644
index 00000000..de69182a
Binary files /dev/null and b/AATool/assets/sprites/blocks/plants/pitcher_plant^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/pitcher_pod^32.png b/AATool/assets/sprites/blocks/plants/pitcher_pod^32.png
new file mode 100644
index 00000000..9fdacd0d
Binary files /dev/null and b/AATool/assets/sprites/blocks/plants/pitcher_pod^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/pitcher_pod^48.png b/AATool/assets/sprites/blocks/plants/pitcher_pod^48.png
new file mode 100644
index 00000000..b2058a62
Binary files /dev/null and b/AATool/assets/sprites/blocks/plants/pitcher_pod^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/potatoes^32.png b/AATool/assets/sprites/blocks/plants/potatoes^32.png
index 08b9daec..e3c9c2c6 100644
Binary files a/AATool/assets/sprites/blocks/plants/potatoes^32.png and b/AATool/assets/sprites/blocks/plants/potatoes^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/potatoes^48.png b/AATool/assets/sprites/blocks/plants/potatoes^48.png
index d81f6393..39146c22 100644
Binary files a/AATool/assets/sprites/blocks/plants/potatoes^48.png and b/AATool/assets/sprites/blocks/plants/potatoes^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/torchflower_seeds^32.png b/AATool/assets/sprites/blocks/plants/torchflower_seeds^32.png
index 593ba3e5..08af7bee 100644
Binary files a/AATool/assets/sprites/blocks/plants/torchflower_seeds^32.png and b/AATool/assets/sprites/blocks/plants/torchflower_seeds^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/torchflower_seeds^48.png b/AATool/assets/sprites/blocks/plants/torchflower_seeds^48.png
index d66515cd..4b532288 100644
Binary files a/AATool/assets/sprites/blocks/plants/torchflower_seeds^48.png and b/AATool/assets/sprites/blocks/plants/torchflower_seeds^48.png differ
diff --git a/AATool/assets/sprites/blocks/plants/wheat^32.png b/AATool/assets/sprites/blocks/plants/wheat^32.png
index be37d257..3f58de8d 100644
Binary files a/AATool/assets/sprites/blocks/plants/wheat^32.png and b/AATool/assets/sprites/blocks/plants/wheat^32.png differ
diff --git a/AATool/assets/sprites/blocks/plants/wheat^48.png b/AATool/assets/sprites/blocks/plants/wheat^48.png
index 2aa3b270..0e4f3975 100644
Binary files a/AATool/assets/sprites/blocks/plants/wheat^48.png and b/AATool/assets/sprites/blocks/plants/wheat^48.png differ
diff --git a/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$152x24x1.png b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$152x24x1.png
new file mode 100644
index 00000000..aa708bff
Binary files /dev/null and b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$152x24x1.png differ
diff --git a/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$96x24x1.25.png b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$96x24x1.25.png
new file mode 100644
index 00000000..a601b609
Binary files /dev/null and b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^32$96x24x1.25.png differ
diff --git a/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$152x24x1.png b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$152x24x1.png
new file mode 100644
index 00000000..ea6ae52c
Binary files /dev/null and b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$152x24x1.png differ
diff --git a/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$96x24x1.25.png b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$96x24x1.25.png
new file mode 100644
index 00000000..53205ac1
Binary files /dev/null and b/AATool/assets/sprites/blocks/sculk/calibrated_sculk_sensor^48$96x24x1.25.png differ
diff --git a/AATool/assets/sprites/global/badges/legendary/badge_2k_text.png b/AATool/assets/sprites/global/badges/legendary/badge_2k_text.png
new file mode 100644
index 00000000..517f032e
Binary files /dev/null and b/AATool/assets/sprites/global/badges/legendary/badge_2k_text.png differ
diff --git a/AATool/assets/sprites/global/criteria/animals/sniffer.png b/AATool/assets/sprites/global/criteria/animals/sniffer.png
new file mode 100644
index 00000000..0ef55ebf
Binary files /dev/null and b/AATool/assets/sprites/global/criteria/animals/sniffer.png differ
diff --git a/AATool/assets/sprites/global/criteria/biomes/cherry_grove.png b/AATool/assets/sprites/global/criteria/biomes/cherry_grove.png
new file mode 100644
index 00000000..15c71305
Binary files /dev/null and b/AATool/assets/sprites/global/criteria/biomes/cherry_grove.png differ
diff --git a/AATool/assets/views/all_advancements/1.20 Snapshot/main_vertical.xml b/AATool/assets/views/all_advancements/1.20 Snapshot/main_vertical.xml
index 4f048a3d..cf629fd0 100644
--- a/AATool/assets/views/all_advancements/1.20 Snapshot/main_vertical.xml
+++ b/AATool/assets/views/all_advancements/1.20 Snapshot/main_vertical.xml
@@ -60,15 +60,15 @@
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/AATool/assets/views/all_blocks/1.20 Snapshot/help.xml b/AATool/assets/views/all_blocks/1.20 Snapshot/help.xml
index c1acd83b..66d7c7b8 100644
--- a/AATool/assets/views/all_blocks/1.20 Snapshot/help.xml
+++ b/AATool/assets/views/all_blocks/1.20 Snapshot/help.xml
@@ -3,13 +3,13 @@
-
+
-
+
@@ -57,19 +57,19 @@
-
+
to
-
+
-
+
@@ -77,13 +77,13 @@
-
+
-
+
@@ -97,7 +97,7 @@
-
+
@@ -121,6 +121,9 @@
+
+
+
@@ -205,7 +208,7 @@
-
+
@@ -244,7 +247,7 @@
-
+
@@ -397,114 +400,106 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
-
+
-
+
-
+
@@ -512,12 +507,8 @@
-
-
-
-
-
-
+
+
@@ -552,7 +543,7 @@
-
+
@@ -632,7 +623,7 @@
-
+
diff --git a/AATool/assets/views/all_blocks/1.20 Snapshot/main.xml b/AATool/assets/views/all_blocks/1.20 Snapshot/main.xml
index daf1387e..8e092b5a 100644
--- a/AATool/assets/views/all_blocks/1.20 Snapshot/main.xml
+++ b/AATool/assets/views/all_blocks/1.20 Snapshot/main.xml
@@ -9,7 +9,7 @@
-
+
@@ -82,7 +82,6 @@
-
@@ -97,7 +96,7 @@
+ width="5 * 38" height="1 * 38"/>
+ margin_left="15 * 38" margin_top="6 * 38"
+ width="3 * 38" height="3 * 38"/>
+ margin_left="33 * 38" margin_top="20 * 38"
+ width="3 * 38" height="4 * 38"/>
-
-
-
-
+ margin_left="16 * 38" margin_top="0"
+ width="4 * 38" height="2 * 38"/>
+ width="2 * 38" height="11 * 38"/>
-
+
+ width="14 * 38" height="11 * 38"/>
+ margin_left="31 * 38" margin_top="11 * 38"
+ width="2 * 38" height="2 * 38"
+ direction="toptobottom"/>
+ width="2 * 38" height="2 * 38"
+ direction="toptobottom"/>
+ margin_left="31 * 38" margin_top="13 * 38"
+ width="4 * 38" height="38"/>
+
+
-
-
-
@@ -290,44 +283,34 @@
margin_left="3 * 38" margin_top="10 * 38"
width="5 * 38" height="3 * 38"/>
-
-
-
+
-
-
-
+ width="6 * 38" height="38 * 2"/>
+ margin_left="33 * 38" margin_top="18 * 38"
+ width="3 * 38" height="2 * 38"/>
+ width="6 * 38" height="38"/>
-
+
diff --git a/AATool/assets/views/all_portals/1.16/main.xml b/AATool/assets/views/all_portals/1.16/main.xml
index cad70e67..acd8f284 100644
--- a/AATool/assets/views/all_portals/1.16/main.xml
+++ b/AATool/assets/views/all_portals/1.16/main.xml
@@ -18,9 +18,9 @@
-
-
-
+
+
+
diff --git a/AATool/assets/views/other/multiboard.xml b/AATool/assets/views/other/multiboard.xml
index 1cfe90b7..4f96d081 100644
--- a/AATool/assets/views/other/multiboard.xml
+++ b/AATool/assets/views/other/multiboard.xml
@@ -114,14 +114,12 @@
-
-
-
-
-
+
+
+
-
-
+
+
diff --git a/AATool/assets/views/other/primary_version.xml b/AATool/assets/views/other/primary_version.xml
index 2ffb5ebf..d044f56d 100644
--- a/AATool/assets/views/other/primary_version.xml
+++ b/AATool/assets/views/other/primary_version.xml
@@ -2,36 +2,24 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file