1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-03-22 11:53:25 +08:00

UXAssist: fix recent upload result

This commit is contained in:
2026-03-12 00:30:03 +08:00
parent c823e72c67
commit f7fc9aaab0
2 changed files with 13 additions and 1 deletions

View File

@@ -1053,6 +1053,16 @@ public static class DysonSphereFunctions
var nodeCount = nodePos.Count; var nodeCount = nodePos.Count;
DysonNode[] nodes = [.. shell.nodes]; DysonNode[] nodes = [.. shell.nodes];
DysonFrame[] frames = [.. shell.frames]; DysonFrame[] frames = [.. shell.frames];
if (frames.Length == 0)
{
isEuler = new List<bool>(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]; var cpMax = new long[nodeCount];
for (var i = 0; i < nodeCount; i++) for (var i = 0; i < nodeCount; i++)
{ {

View File

@@ -892,7 +892,9 @@ public static class UIFunctions
return; return;
} }
StringBuilder sb = new(); 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]; 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"); 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");