mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
refactor: centralize localization keys and remove runtime Chinese literals
This commit is contained in:
1 parent
34c99701ca
commit
036243fd4a
32 files changed
+873
-403
No files matched your search
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.Common.ModFeatures;
|
||||
using CheatEnabler;
|
||||
|
||||
namespace CheatEnabler.Functions.DysonSphere;
|
||||
|
||||
@@ -27,7 +28,7 @@ public static class DysonSphereResolver
|
||||
var star = GameMain.localStar;
|
||||
if (star == null)
|
||||
{
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), "You are not in any system.".Translate(), "确定".Translate(), UIMessageBox.ERROR, null);
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), "You are not in any system.".Translate(), Localization.Ok.Translate(), UIMessageBox.ERROR, null);
|
||||
}
|
||||
return star;
|
||||
}
|
||||
@@ -39,12 +40,12 @@ public static class DysonSphereResolver
|
||||
var sphere = GameMain.data?.dysonSpheres[star.index];
|
||||
if (sphere == null)
|
||||
{
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("There is no Dyson Sphere data on \"{0}\".".Translate(), star.displayName), "确定".Translate(), UIMessageBox.ERROR, null);
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("There is no Dyson Sphere data on \"{0}\".".Translate(), star.displayName), Localization.Ok.Translate(), UIMessageBox.ERROR, null);
|
||||
return null;
|
||||
}
|
||||
if (requireLayer && sphere.layerCount == 0)
|
||||
{
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("There is no Dyson Sphere shell on \"{0}\".".Translate(), star.displayName), "确定".Translate(), UIMessageBox.ERROR, null);
|
||||
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("There is no Dyson Sphere shell on \"{0}\".".Translate(), star.displayName), Localization.Ok.Translate(), UIMessageBox.ERROR, null);
|
||||
return null;
|
||||
}
|
||||
return (sphere, star);
|
||||
|
||||
Reference in new issue
Block a user