From f7fc9aaab009b4b8e1bfd746aeee74c3a967071e Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Thu, 12 Mar 2026 00:30:03 +0800 Subject: [PATCH] UXAssist: fix recent upload result --- CheatEnabler/Functions/DysonSphereFunctions.cs | 10 ++++++++++ UXAssist/Functions/UIFunctions.cs | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CheatEnabler/Functions/DysonSphereFunctions.cs b/CheatEnabler/Functions/DysonSphereFunctions.cs index 88797b2..22f08b8 100644 --- a/CheatEnabler/Functions/DysonSphereFunctions.cs +++ b/CheatEnabler/Functions/DysonSphereFunctions.cs @@ -1053,6 +1053,16 @@ public static class DysonSphereFunctions var nodeCount = nodePos.Count; DysonNode[] nodes = [.. shell.nodes]; DysonFrame[] frames = [.. shell.frames]; + if (frames.Length == 0) + { + isEuler = new List(nodeCount); + frames = new DysonFrame[nodeCount]; + for (var i = 0; i < nodeCount; i++) + { + isEuler.Add(false); + frames[i] = layer.QuickAddDysonFrame(0, nodes[i], nodes[(i + 1) % nodeCount], false); + } + } var cpMax = new long[nodeCount]; for (var i = 0; i < nodeCount; i++) { diff --git a/UXAssist/Functions/UIFunctions.cs b/UXAssist/Functions/UIFunctions.cs index b8ed631..9c0eab3 100644 --- a/UXAssist/Functions/UIFunctions.cs +++ b/UXAssist/Functions/UIFunctions.cs @@ -892,7 +892,9 @@ public static class UIFunctions return; } StringBuilder sb = new(); - for (var i = Math.Min(_clusterUploadResultsCount, 10) - 1; i >= 0; i--) + var start = _clusterUploadResultsCount; + var end = start > 10 ? start - 10 : 0; + for (var i = start - 1; i >= end; i--) { var res = _clusterUploadResults[(i + _clusterUploadResultsHead) % ClusterUploadResultKeepCount]; sb.AppendLine($"{res.UploadTime.ToString("yyyy-MM-dd HH:mm:ss")} - {((res.Result is 0 or 20) ? "Success".Translate() : ("Failure: ".Translate() + res.Result.ToString()))} - {res.RequestTime:F2}s");