mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-04 13:12:17 +08:00
ready for next release of UXAssist
This commit is contained in:
@@ -41,6 +41,9 @@ public static class UIFunctions
|
||||
I18N.Add("Show distance", "Show distance", "显示距离");
|
||||
I18N.Add("Show planet count", "Show planet count", "显示行星数");
|
||||
I18N.Add("Show all information", "Show all information", "显示全部信息");
|
||||
I18N.Add("No recent milkyway upload results", "No recent milkyway upload results", "没有最近的银河系发电数据上传结果");
|
||||
I18N.Add("Success", "Success", "成功");
|
||||
I18N.Add("Failure: ", "Failure: ", "失败: ");
|
||||
I18N.Add("Show top players", "Show top players", "显示玩家排行榜");
|
||||
I18N.Add("Hide top players", "Hide top players", "隐藏玩家排行榜");
|
||||
I18N.OnInitialized += RecreateConfigWindow;
|
||||
@@ -756,7 +759,6 @@ public static class UIFunctions
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void ExportClusterUploadResults(BinaryWriter w)
|
||||
{
|
||||
lock (_clusterUploadResultsLock)
|
||||
@@ -788,6 +790,34 @@ public static class UIFunctions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ClearClusterUploadResults()
|
||||
{
|
||||
lock (_clusterUploadResultsLock)
|
||||
{
|
||||
_clusterUploadResultsCount = 0;
|
||||
_clusterUploadResultsHead = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowRecentMilkywayUploadResults()
|
||||
{
|
||||
lock (_clusterUploadResultsLock)
|
||||
{
|
||||
if (_clusterUploadResultsCount == 0)
|
||||
{
|
||||
UIMessageBox.Show("UXAssist".Translate(), "No recent milkyway upload results".Translate(), "确定".Translate(), UIMessageBox.INFO, null);
|
||||
return;
|
||||
}
|
||||
StringBuilder sb = new();
|
||||
for (var i = Math.Min(_clusterUploadResultsCount, 10) - 1; i >= 0; 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");
|
||||
}
|
||||
UIMessageBox.Show("UXAssist".Translate(), sb.ToString(), "确定".Translate(), UIMessageBox.INFO, null);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region MilkyWayTopTenPlayers
|
||||
|
||||
@@ -47,6 +47,7 @@ public static class UIConfigWindow
|
||||
I18N.Add("Normal", "Normal", "正常");
|
||||
I18N.Add("Below Normal", "Below Normal", "低于正常");
|
||||
I18N.Add("Idle", "Idle", "空闲");
|
||||
I18N.Add("Show recent milkyway upload results", "Show recent milkyway upload results", "显示最近的银河系发电数据上传结果");
|
||||
I18N.Add("Unlimited interactive range", "Unlimited interactive range", "无限交互距离");
|
||||
I18N.Add("Night Light", "Sunlight at night", "夜间日光灯");
|
||||
I18N.Add("Angle X:", "Angle X:", "入射角度X:");
|
||||
@@ -322,6 +323,8 @@ public static class UIConfigWindow
|
||||
wnd.AddInputField(x + 2f, y, 200f, tab1, GamePatch.DefaultProfileName, 15, "input-profile-save-folder");
|
||||
y += 18f;
|
||||
}
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab1, "Show recent milkyway upload results", 16, "button-show-recent-milkyway-upload-results", () => UIFunctions.ShowRecentMilkywayUploadResults());
|
||||
if (!BulletTimeWrapper.HasBulletTime)
|
||||
{
|
||||
y += 36f;
|
||||
|
||||
@@ -51,6 +51,10 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
||||
{
|
||||
UIFunctions.ImportClusterUploadResults(r);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIFunctions.ClearClusterUploadResults();
|
||||
}
|
||||
}
|
||||
|
||||
public void IntoOtherSave()
|
||||
|
||||
Reference in New Issue
Block a user