refactor: centralize localization keys and remove runtime Chinese literals

This commit is contained in:
2026-06-23 21:19:42 +08:00
parent 34c99701ca
commit 036243fd4a
32 changed files with 873 additions and 403 deletions
+5
View File
@@ -18,6 +18,8 @@ public class CheatEnabler : BaseUnityPlugin
private void Awake()
{
I18N.Init();
GamePatch.DevShortcutsEnabled = Config.Bind("General", "DevShortcuts", false, "Enable DevMode shortcuts");
GamePatch.AbnormalDisablerEnabled = Config.Bind("General", "DisableAbnormalChecks", false,
"disable all abnormal checks");
@@ -97,9 +99,12 @@ public class CheatEnabler : BaseUnityPlugin
"Mecha and Drones/Fleets invincible");
CombatPatch.BuildingsInvincibleEnabled = Config.Bind("Battle", "BuildingsInvincible", false,
"Buildings invincible");
Localization.Register();
UIConfigWindow.Init();
ModFeatureRegistry.Discover(Assembly.GetExecutingAssembly());
ModFeatureRegistry.InitAll();
I18N.Apply();
}
private void Start()
@@ -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);
@@ -1,9 +1,10 @@
using System;
using System;
using HarmonyLib;
using UnityEngine;
using UXAssist.Common;
using UXAssist.Common.GameConstants;
using UXAssist.Common.ModFeatures;
using CheatEnabler;
namespace CheatEnabler.Functions.DysonSphere;
@@ -16,7 +17,7 @@ public static class FrameRemovalFunctions
if (resolved == null) return;
var (dysonSphere, star) = resolved.Value;
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("This will remove all frames on \"{0}\". Are you sure?".Translate(), star.displayName), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, () =>
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("This will remove all frames on \"{0}\". Are you sure?".Translate(), star.displayName), Localization.Cancel.Translate(), Localization.Ok.Translate(), UIMessageBox.QUESTION, null, () =>
{
var totalFrameSpInfo = AccessTools.Field(typeof(DysonSphereLayer), "totalFrameSP");
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -8,6 +8,7 @@ using UnityEngine;
using UXAssist.Common;
using UXAssist.Common.GameConstants;
using UXAssist.Common.ModFeatures;
using CheatEnabler;
namespace CheatEnabler.Functions.DysonSphere;
@@ -87,7 +88,7 @@ public static class IllegalShellFunctions
}
if (nodePos.Count == 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;
}
var currentShellCount = layer.shellCount;
@@ -277,7 +278,7 @@ public static class IllegalShellFunctions
}
catch (InvalidOperationException)
{
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("No precalculated triangle found for radius {0}.".Translate(), radius), "确定".Translate(), UIMessageBox.ERROR, null);
UIMessageBox.Show("CheatEnabler".Translate(), string.Format(Localization.NoPrecalculatedShellFoundForRadius0.Translate(), radius), Localization.Ok.Translate(), UIMessageBox.ERROR, null);
return;
}
layer = dysonSphere.AddLayerOnId(i, radius, Quaternion.Euler(0f, 0f, 0f), Mathf.Sqrt(dysonSphere.gravity / radius) / radius * DysonSphereConstants.RadiansToDegrees);
@@ -1,9 +1,10 @@
using System;
using System;
using System.Linq;
using HarmonyLib;
using UnityEngine;
using UXAssist.Common;
using UXAssist.Common.ModFeatures;
using CheatEnabler;
namespace CheatEnabler.Functions.DysonSphere;
@@ -16,7 +17,7 @@ public static class ShellCompletionFunctions
if (resolved == null) return;
var (dysonSphere, star) = resolved.Value;
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("This will complete all Dyson Sphere shells on \"{0}\". Are you sure?".Translate(), star.displayName), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, () =>
UIMessageBox.Show("CheatEnabler".Translate(), string.Format("This will complete all Dyson Sphere shells on \"{0}\". Are you sure?".Translate(), star.displayName), Localization.Cancel.Translate(), Localization.Ok.Translate(), UIMessageBox.QUESTION, null, () =>
{
var totalNodeSpInfo = AccessTools.Field(typeof(DysonSphereLayer), "totalNodeSP");
var totalFrameSpInfo = AccessTools.Field(typeof(DysonSphereLayer), "totalFrameSP");
@@ -1,4 +1,4 @@
using BepInEx.Configuration;
using BepInEx.Configuration;
using CheatEnabler.Functions.DysonSphere;
using UXAssist.Common;
using UXAssist.Common.ModFeatures;
@@ -13,13 +13,7 @@ public static class DysonSphereFunctions
public static void Init()
{
I18N.Add("You are not in any system.", "You are not in any system.", "你不在任何星系中");
I18N.Add("There is no Dyson Sphere shell on \"{0}\".", "There is no Dyson Sphere shell on \"{0}\".", "“{0}”上没有可建造的戴森壳");
I18N.Add("There is no Dyson Sphere data on \"{0}\".", "There is no Dyson Sphere data on \"{0}\".", "“{0}”上没有戴森球数据");
I18N.Add("This will complete all Dyson Sphere shells on \"{0}\" instantly. Are you sure?", "This will complete all Dyson Sphere shells on \"{0}\" instantly. Are you sure?", "这将立即完成“{0}”上的所有戴森壳。你确定吗?");
I18N.Add("This will remove all frames on \"{0}\". Are you sure?", "This will remove all frames on \"{0}\". Are you sure?", "这将移除“{0}”上的所有框架。你确定吗?");
I18N.Add("No precalculated shell found for radius {0}.", "No precalculated shell found for radius {0}.", "没有找到适合半径 {0} 的预计算壳面");
}
}
public static void CompleteShellsInstantly() => ShellCompletionFunctions.CompleteShellsInstantly();
public static void RemoveAllFrames() => FrameRemovalFunctions.RemoveAllFrames();
+1 -22
View File
@@ -11,28 +11,7 @@ public static class PlayerFunctions
{
public static void Init()
{
I18N.Add("ClearAllMetadataConsumptionDetails",
"""
Metadata consumption records of all gamesaves are about to be cleared.
You will gain following metadata back:
""",
"""
""");
I18N.Add("ClearCurrentMetadataConsumptionDetails",
"""
Metadata consumption records of current gamesave are about to be cleared.
You will gain following metadata back:
""",
"""
""");
I18N.Add("NoMetadataConsumptionRecord",
"No metadata consumption records found.",
"未找到元数据消耗记录。");
}
}
public static void TeleportToOuterSpace()
{
+279
View File
@@ -0,0 +1,279 @@
using UXAssist.Common;
namespace CheatEnabler;
public static class Localization
{
public const string YouAreNotInAnySystem = "You are not in any system.";
public const string ThereIsNoDysonSphereShellOn0 = "There is no Dyson Sphere shell on \"{0}\".";
public const string ThereIsNoDysonSphereDataOn0 = "There is no Dyson Sphere data on \"{0}\".";
public const string ThisWillCompleteAllDysonSphereShellsOn0InstantlyAreYouSure = "This will complete all Dyson Sphere shells on \"{0}\" instantly. Are you sure?";
public const string ThisWillRemoveAllFramesOn0AreYouSure = "This will remove all frames on \"{0}\". Are you sure?";
public const string NoPrecalculatedShellFoundForRadius0 = "No precalculated shell found for radius {0}.";
public const string ClearAllMetadataConsumptionDetails = "ClearAllMetadataConsumptionDetails";
public const string ClearCurrentMetadataConsumptionDetails = "ClearCurrentMetadataConsumptionDetails";
public const string NoMetadataConsumptionRecord = "NoMetadataConsumptionRecord";
public const string KEYToggleNoCondition = "KEYToggleNoCondition";
public const string KEYToggleNoCollision = "KEYToggleNoCollision";
public const string NoConditionOn = "NoConditionOn";
public const string NoConditionOff = "NoConditionOff";
public const string NoCollisionOn = "NoCollisionOn";
public const string NoCollisionOff = "NoCollisionOff";
public const string BuildWithoutConditionIsEnabled = "Build without condition is enabled!";
public const string NoCollisionIsEnabled = "No collision is enabled!";
public const string Factory = "Factory";
public const string Planet = "Planet";
public const string MechaCombat = "Mecha/Combat";
public const string Cancel = "Cancel";
public const string OK = "OK";
public const string BuryAllVeins = "Bury all veins";
public const string RestoreBuriedVeins = "Restore buried veins";
public const string ReformEntirePlanet = "Reform entire planet";
public const string RevertPlanetTerrain = "Revert planet terrain";
public const string EnableDevShortcuts = "Enable Dev Shortcuts";
public const string DisableAbnormalChecks = "Disable Abnormal Checks";
public const string Hotkey = "Hotkey";
public const string UnlockTechWithKeyModifiers = "Unlock Tech with Key-Modifiers";
public const string DevShortcuts = "Dev Shortcuts";
public const string DevShortcutsTips = "Dev Shortcuts Tips";
public const string UnlockTechWithKeyModifiersTips = "Unlock Tech with Key-Modifiers Tips";
public const string RemoveAllMetadataConsumptionRecords = "Remove all metadata consumption records";
public const string RemoveMetadataConsumptionRecordInCurrentGame = "Remove metadata consumption record in current game";
public const string ClearMetadataFlagWhichBansAchievements = "Clear metadata flag which bans achievements";
public const string AssignGamesaveToCurrentAccount = "Assign gamesave to current account";
public const string FinishBuildImmediately = "Finish build immediately";
public const string ArchitectMode = "Architect mode";
public const string BuildWithoutCondition = "Build without condition";
public const string NoCollision = "No collision";
public const string BeltSignalGenerator = "Belt signal generator";
public const string CountProliferatorsUsedForRawsIntermediatesAndFinishedProducts = "Count proliferators used for raws/intermediates and finished products";
public const string CountProliferatorsUsedForRawsIntermediatesAndFinishedProductsTips = "Count proliferators used for raws/intermediates and finished products tips";
public const string BeltSignalAltFormat = "Belt signal alt format";
public const string BeltSignalAltFormatTips = "Belt signal alt format tips";
public const string CountGenerationsAsProductionInStatistics = "Count generations as production in statistics";
public const string CountRemovalsAsConsumptionInStatistics = "Count removals as consumption in statistics";
public const string CountAllRawsAndIntermediatesInStatistics = "Count all raws and intermediates in statistics";
public const string RemovePowerSpaceLimit = "Remove power space limit";
public const string BoostWindPower = "Boost wind power";
public const string BoostSolarPower = "Boost solar power";
public const string BoostFuelPower = "Boost fuel power";
public const string BoostFuelPower2 = "Boost fuel power 2";
public const string WindTurbinesDoGlobalPowerCoverage = "Wind Turbines do global power coverage";
public const string BoostGeothermalPower = "Boost geothermal power";
public const string RetrievePlaceItemsFromToRemotePlanetsOnLogisticsControlPanel = "Retrieve/Place items from/to remote planets on logistics control panel";
public const string InfiniteNaturalResources = "Infinite Natural Resources";
public const string FastMining = "Fast Mining";
public const string PumpAnywhere = "Pump Anywhere";
public const string SkipBulletPeriod = "Skip bullet period";
public const string FireAllBulletsAtOnce = "Fire all bullets at once";
public const string SkipAbsorptionPeriod = "Skip absorption period";
public const string QuickAbsorb = "Quick absorb";
public const string EjectAnyway = "Eject anyway";
public const string OverclockEjectors = "Overclock Ejectors";
public const string OverclockSilos = "Overclock Silos";
public const string UnlockDysonSphereMaxOrbitRadius = "Unlock Dyson Sphere max orbit radius";
public const string CompleteDysonSphereShellsInstantly = "Complete Dyson Sphere shells instantly";
public const string RemoveAllFramesOnDysonSphere = "Remove all frames on Dyson Sphere";
public const string GenerateIllegalDysonShell = "Generate illegal dyson shell";
public const string GenerateIllegalDysonShell2 = "Generate illegal dyson shell 2";
public const string KeepMaxProductionShellsAndRemoveOthers = "Keep max production shells and remove others";
public const string DuplicateShellsFromThatWithHighestProduction = "Duplicate shells from that with highest production";
public const string GenerateIllegalDysonShellQuickly = "Generate illegal dyson shell quickly";
public const string ShellsCount = "Shells count";
public const string WARNINGThisOperationCanBeVerySlowContinue = "WARNING: This operation can be very slow, continue?";
public const string WARNINGThisOperationIsDANGEROUSContinue = "WARNING: This operation is DANGEROUS, continue?";
public const string TerraformWithoutEnoughSoilPiles = "Terraform without enough soil piles";
public const string InstantHandCraft = "Instant hand-craft";
public const string InstantTeleportLikeThatInSandboxMode = "Instant teleport (like that in Sandbox mode)";
public const string MechaAndDronesFleetsInvicible = "Mecha and Drones/Fleets invicible";
public const string BuildingsInvicible = "Buildings invicible";
public const string EnableWarpWithoutSpaceWarpers = "Enable warp without space warpers";
public const string TeleportToOuterSpace = "Teleport to outer space";
public const string TeleportToSelectedAstronomical = "Teleport to selected astronomical";
public const string Ok = "OK";
public static void Register()
{
I18N.Add(YouAreNotInAnySystem, "You are not in any system.", "你不在任何星系中");
I18N.Add(ThereIsNoDysonSphereShellOn0, "There is no Dyson Sphere shell on \"{0}\".", "“{0}”上没有可建造的戴森壳");
I18N.Add(ThereIsNoDysonSphereDataOn0, "There is no Dyson Sphere data on \"{0}\".", "“{0}”上没有戴森球数据");
I18N.Add(ThisWillCompleteAllDysonSphereShellsOn0InstantlyAreYouSure, "This will complete all Dyson Sphere shells on \"{0}\" instantly. Are you sure?", "这将立即完成“{0}”上的所有戴森壳。你确定吗?");
I18N.Add(ThisWillRemoveAllFramesOn0AreYouSure, "This will remove all frames on \"{0}\". Are you sure?", "这将移除“{0}”上的所有框架。你确定吗?");
I18N.Add(NoPrecalculatedShellFoundForRadius0, "No precalculated shell found for radius {0}.", "没有找到适合半径 {0} 的预计算壳面");
I18N.Add(ClearAllMetadataConsumptionDetails, """
Metadata consumption records of all gamesaves are about to be cleared.
You will gain following metadata back:
""", """
""");
I18N.Add(ClearCurrentMetadataConsumptionDetails, """
Metadata consumption records of current gamesave are about to be cleared.
You will gain following metadata back:
""", """
""");
I18N.Add(NoMetadataConsumptionRecord, "No metadata consumption records found.", "未找到元数据消耗记录。");
I18N.Add(KEYToggleNoCondition, "[CE] Toggle No Condition Build", "[CE] 切换无条件建造");
I18N.Add(KEYToggleNoCollision, "[CE] Toggle No Collision", "[CE] 切换无碰撞");
I18N.Add(NoConditionOn, "No condition build is enabled!", "无条件建造已开启");
I18N.Add(NoConditionOff, "No condition build is disabled!", "无条件建造已关闭");
I18N.Add(NoCollisionOn, "No collision is enabled!", "无碰撞已开启");
I18N.Add(NoCollisionOff, "No collision is disabled!", "无碰撞已关闭");
I18N.Add(BuildWithoutConditionIsEnabled, "!!Build without condition is enabled!!", "!!无条件建造已开启!!");
I18N.Add(NoCollisionIsEnabled, "!!No collision is enabled!!", "!!无碰撞已开启!!");
I18N.Add(Factory, "Factory", "工厂");
I18N.Add(Planet, "Planet", "行星");
I18N.Add(MechaCombat, "Mecha/Combat", "机甲/战斗");
I18N.Add(Cancel, "Cancel", "取消");
I18N.Add(OK, "OK", "确定");
I18N.Add(BuryAllVeins, "Bury all veins", "掩埋所有矿脉");
I18N.Add(RestoreBuriedVeins, "Restore buried veins", "还原所有矿脉");
I18N.Add(ReformEntirePlanet, "Reform entire planet", "铺满星球地基");
I18N.Add(RevertPlanetTerrain, "Revert planet terrain", "还原星球地形");
I18N.Add(EnableDevShortcuts, "Enable Dev Shortcuts", "开发模式快捷键");
I18N.Add(DisableAbnormalChecks, "Disable Abnormal Checks", "关闭数据异常检查");
I18N.Add(Hotkey, "Hotkey", "快捷键");
I18N.Add(UnlockTechWithKeyModifiers, "Unlock Tech with Key-Modifiers", "使用组合键点击解锁科技");
I18N.Add(DevShortcuts, "Dev Shortcuts", "开发模式快捷键");
I18N.Add(DevShortcutsTips, """
Caution: Some function may trigger abnormal check!
Numpad 1: Gets all items and extends bag.
Numpad 2: Boosts walk speed, gathering speed and mecha energy restoration.
Numpad 3: Fills planet with foundations and bury all veins.
Numpad 4: +1 construction drone.
Numpad 5: Upgrades drone engine tech to full.
Numpad 6: Unlocks researching tech.
Numpad 7: Unlocks Drive Engine 1.
Numpad 8: Unlocks Drive Engine 2 and maximize energy.
Numpad 9: Unlocks ability to warp.
Numpad 0: No costs for Logistic Storages' output.
LCtrl + T: Unlocks all techs (not upgrades).
LCtrl + Q: Adds 10000 to every metadata.
LCtrl + W: Enters Sandbox Mode.
LCtrl + Shift + W: Leaves Sandbox Mode.
Numpad *: Proliferates items on hand.
Numpad /: Removes proliferations from items on hand.
PageDown: Remembers Pose of game camera.
PageUp: Locks game camera using remembered Pose.
""", """
!
1
2
3
4 +1
5
6
7I
8II
9
0
Ctrl + T
Ctrl + Q10000
Ctrl + W
Ctrl + Shift + W
*
/
PageDownPose
PageUpPose锁定摄像机
""");
I18N.Add(UnlockTechWithKeyModifiersTips, """
Click tech on tree while holding:
Shift: Tech level + 1
Ctrl: Tech level + 10
Ctrl + Shift: Tech level + 100
Alt: Tech level to MAX
Note: all direct prerequisites will be unlocked as well.
""", """
Shift+1
Ctrl+10
Ctrl+Shift+100
Alt
""");
I18N.Add(RemoveAllMetadataConsumptionRecords, "Remove all metadata consumption records", "移除所有元数据消耗记录");
I18N.Add(RemoveMetadataConsumptionRecordInCurrentGame, "Remove metadata consumption record in current game", "移除当前存档的元数据消耗记录");
I18N.Add(ClearMetadataFlagWhichBansAchievements, "Clear metadata flag which bans achievements in current game", "解除当前存档因使用元数据导致的成就限制");
I18N.Add(AssignGamesaveToCurrentAccount, "Assign gamesave to current account", "将游戏存档绑定给当前账号");
I18N.Add(FinishBuildImmediately, "Finish build immediately", "建造秒完成");
I18N.Add(ArchitectMode, "Architect mode", "建筑师模式");
I18N.Add(BuildWithoutCondition, "Build without condition check", "无条件建造");
I18N.Add(NoCollision, "No collision", "无碰撞");
I18N.Add(BeltSignalGenerator, "Belt signal generator", "传送带信号物品生成");
I18N.Add(CountProliferatorsUsedForRawsIntermediatesAndFinishedProducts, "Use proliferators for raws/intermediates and finished products", "原料、中间产物以及成品使用增产剂");
I18N.Add(CountProliferatorsUsedForRawsIntermediatesAndFinishedProductsTips, """
Following items use extra products: Titanium Alloy, Prism, Frame Material, Proliferator Mk.II, Proliferator Mk.III, Magnetic Coil, Electric Motor, Electromagnetic Turbine, Super-magnetic Ring, Circuit Board, Thruster, Reinforced Thruster, Plasma Exciter, Particle Broadband, Graviton Lens, Quantum Chip, Annihilation Constraint Sphere, Deuteron Fuel Rod, Space Warper, Dyson Sphere Component, Small Carrier Rocket, Electromagnetic Matrix, Structure Matrix, Information Matrix, Gravity Matrix, Universe Matrix
Following items does not use proliferators: Casimir Crystal, Energy Matrix
Other items use speed up production.
""", """
使: , , , Mk.II, Mk.III, 线, , , , , , , , , , , , , , , , , , , ,
使: 西,
使
""");
I18N.Add(BeltSignalAltFormat, "Belt signal alt format", "传送带信号替换格式");
I18N.Add(BeltSignalAltFormatTips, """
Belt signal number format alternative format:
AAAABC by default
BCAAAA as alternative
AAAA=generation speed in minutes, B=proliferate points, C=stack count
""", """
AAAABC
BCAAAA
AAAA=B=C=
""");
I18N.Add(CountGenerationsAsProductionInStatistics, "Count generations as production in statistics", "统计信息里将生成计算为产物");
I18N.Add(CountRemovalsAsConsumptionInStatistics, "Count removals as consumption in statistics", "统计信息里将移除计算为消耗");
I18N.Add(CountAllRawsAndIntermediatesInStatistics, "Count all raw materials in statistics", "统计信息里计算所有原料和中间产物");
I18N.Add(RemovePowerSpaceLimit, "Remove space limit for winds and geothermals", "移除风力发电和地热发电的间距限制");
I18N.Add(BoostWindPower, "Boost wind power(x100,000)", "提升风力发电(x100,000)");
I18N.Add(BoostSolarPower, "Boost solar power(x100,000)", "提升太阳能发电(x100,000)");
I18N.Add(BoostFuelPower, "Boost fuel power(x50,000)", "提升燃料发电(x50,000)");
I18N.Add(BoostFuelPower2, "(x20,000 for deuteron, x10,000 for antimatter)", "(氘核燃料棒x20,000,反物质燃料棒x10,000)");
I18N.Add(WindTurbinesDoGlobalPowerCoverage, "Wind Turbines do global power coverage", "风力涡轮机供电覆盖全球");
I18N.Add(BoostGeothermalPower, "Boost geothermal power(x50,000)", "提升地热发电(x50,000)");
I18N.Add(RetrievePlaceItemsFromToRemotePlanetsOnLogisticsControlPanel, "Retrieve/Place items from/to remote planets on logistics control panel", "在物流总控面板上可以从非本地行星取放物品");
I18N.Add(InfiniteNaturalResources, "Infinite natural resources", "自然资源采集不消耗");
I18N.Add(FastMining, "Fast mining", "高速采集");
I18N.Add(PumpAnywhere, "Pump anywhere", "平地抽水");
I18N.Add(SkipBulletPeriod, "Skip bullet period", "跳过子弹阶段");
I18N.Add(FireAllBulletsAtOnce, "Fire all bullets at once", "一次弹射所有太阳帆");
I18N.Add(SkipAbsorptionPeriod, "Skip absorption period", "跳过吸收阶段");
I18N.Add(QuickAbsorb, "Quick absorb", "快速吸收");
I18N.Add(EjectAnyway, "Eject anyway", "全球弹射");
I18N.Add(OverclockEjectors, "Overclock Ejectors (10x)", "高速弹射器(10倍射速)");
I18N.Add(OverclockSilos, "Overclock Silos (10x)", "高速发射井(10倍射速)");
I18N.Add(UnlockDysonSphereMaxOrbitRadius, "Unlock Dyson Sphere max orbit radius", "解锁戴森球最大轨道半径");
I18N.Add(CompleteDysonSphereShellsInstantly, "Complete Dyson Sphere shells instantly", "立即完成戴森壳建造");
I18N.Add(RemoveAllFramesOnDysonSphere, "Remove all frames on Dyson Sphere", "移除戴森球上的所有框架");
I18N.Add(GenerateIllegalDysonShell, "Generate an illegal dyson shell (!!1st shell layer will be replaced!!)", "生成单层仙术戴森壳(!!会先删除第一层戴森壳!!)");
I18N.Add(GenerateIllegalDysonShell2, "Generate illegal dyson shells for all layers without nodes and shells", "为所有没有节点和壳的层级生成仙术戴森壳");
I18N.Add(KeepMaxProductionShellsAndRemoveOthers, "Keep max production shells and remove others", "保留发电量最高的戴森壳并移除其他戴森壳");
I18N.Add(DuplicateShellsFromThatWithHighestProduction, "Duplicate shells from that with highest production", "从发电量最高的壳复制戴森壳");
I18N.Add(GenerateIllegalDysonShellQuickly, "Generate illegal dyson shell quickly", "快速生成仙术戴森壳");
I18N.Add(ShellsCount, "Shells count", "壳面数量");
I18N.Add(WARNINGThisOperationCanBeVerySlowContinue, "WARNING: This operation can be very slow, continue?", "警告:此操作可能非常慢,继续吗?");
I18N.Add(WARNINGThisOperationIsDANGEROUSContinue, "WARNING: This operation is DANGEROUS, continue?", "警告:此操作非常危险,继续吗?");
I18N.Add(TerraformWithoutEnoughSoilPiles, "Terraform without enough soil piles", "沙土不够时依然可以整改地形");
I18N.Add(InstantHandCraft, "Instant hand-craft", "快速手动制造");
I18N.Add(InstantTeleportLikeThatInSandboxMode, "Instant teleport (like that in Sandbox mode)", "快速传送(和沙盒模式一样)");
I18N.Add(MechaAndDronesFleetsInvicible, "Mecha and Drones/Fleets invicible", "机甲和战斗无人机无敌");
I18N.Add(BuildingsInvicible, "Buildings invincible", "建筑无敌");
I18N.Add(EnableWarpWithoutSpaceWarpers, "Enable warp without space warpers", "无需空间翘曲器即可曲速飞行");
I18N.Add(TeleportToOuterSpace, "Teleport to outer space", "传送到外太空");
I18N.Add(TeleportToSelectedAstronomical, "Teleport to selected astronomical", "传送到选中的天体");
I18N.Add(Ok, "OK", "确定");
}
}
+2 -11
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
@@ -55,16 +55,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
canOverride = true
}
);
I18N.Add("KEYToggleNoCondition", "[CE] Toggle No Condition Build", "[CE] 切换无条件建造");
I18N.Add("KEYToggleNoCollision", "[CE] Toggle No Collision", "[CE] 切换无碰撞");
I18N.Add("NoConditionOn", "No condition build is enabled!", "无条件建造已开启");
I18N.Add("NoConditionOff", "No condition build is disabled!", "无条件建造已关闭");
I18N.Add("NoCollisionOn", "No collision is enabled!", "无碰撞已开启");
I18N.Add("NoCollisionOff", "No collision is disabled!", "无碰撞已关闭");
I18N.Add("Build without condition is enabled!", "!!Build without condition is enabled!!", "!!无条件建造已开启!!");
I18N.Add("No collision is enabled!", "!!No collision is enabled!!", "!!无碰撞已开启!!");
ImmediateEnabled.SettingChanged += (_, _) => ImmediateBuild.Enable(ImmediateEnabled.Value);
ImmediateEnabled.SettingChanged += (_, _) => ImmediateBuild.Enable(ImmediateEnabled.Value);
ArchitectModeEnabled.SettingChanged += (_, _) => ArchitectMode.Enable(ArchitectModeEnabled.Value);
NoConditionEnabled.SettingChanged += (_, _) => NoConditionBuild.Enable(NoConditionEnabled.Value);
NoCollisionEnabled.SettingChanged += (_, _) => NoCollisionValueChanged();
-78
View File
@@ -17,84 +17,6 @@ public static class UIConfigWindow
public static void Init()
{
I18N.Add("Factory", "Factory", "工厂");
I18N.Add("Planet", "Planet", "行星");
I18N.Add("Mecha/Combat", "Mecha/Combat", "机甲/战斗");
I18N.Add("Cancel", "Cancel", "取消");
I18N.Add("OK", "OK", "确定");
I18N.Add("Bury all veins", "Bury all veins", "掩埋所有矿脉");
I18N.Add("Restore buried veins", "Restore buried veins", "还原所有矿脉");
I18N.Add("Reform entire planet", "Reform entire planet", "铺满星球地基");
I18N.Add("Revert planet terrain", "Revert planet terrain", "还原星球地形");
I18N.Add("Enable Dev Shortcuts", "Enable Dev Shortcuts", "开发模式快捷键");
I18N.Add("Disable Abnormal Checks", "Disable Abnormal Checks", "关闭数据异常检查");
I18N.Add("Hotkey", "Hotkey", "快捷键");
I18N.Add("Unlock Tech with Key-Modifiers", "Unlock Tech with Key-Modifiers", "使用组合键点击解锁科技");
I18N.Add("Dev Shortcuts", "Dev Shortcuts", "开发模式快捷键");
I18N.Add("Dev Shortcuts Tips",
"Caution: Some function may trigger abnormal check!\nNumpad 1: Gets all items and extends bag.\nNumpad 2: Boosts walk speed, gathering speed and mecha energy restoration.\nNumpad 3: Fills planet with foundations and bury all veins.\nNumpad 4: +1 construction drone.\nNumpad 5: Upgrades drone engine tech to full.\nNumpad 6: Unlocks researching tech.\nNumpad 7: Unlocks Drive Engine 1.\nNumpad 8: Unlocks Drive Engine 2 and maximize energy.\nNumpad 9: Unlocks ability to warp.\nNumpad 0: No costs for Logistic Storages' output.\nLCtrl + T: Unlocks all techs (not upgrades).\nLCtrl + Q: Adds 10000 to every metadata.\nLCtrl + W: Enters Sandbox Mode.\nLCtrl + Shift + W: Leaves Sandbox Mode.\nNumpad *: Proliferates items on hand.\nNumpad /: Removes proliferations from items on hand.\nPageDown: Remembers Pose of game camera.\nPageUp: Locks game camera using remembered Pose.",
"警告:某些功能可能触发异常检查!\n小键盘1:获得所有物品并扩展背包\n小键盘2:加快行走速度及采集速度,加快能量恢复速度\n小键盘3:将地基铺设整个星球并掩埋所有矿物\n小键盘4:建设机器人 +1\n小键盘5:建设机器人满级\n小键盘6:解锁当前科技\n小键盘7:解锁驱动技术I\n小键盘8:解锁驱动技术II 最大化能量\n小键盘9:机甲曲速解锁\n小键盘0:物流站通过传送带出物品无消耗\n左Ctrl + T:解锁所有非升级科技\n左Ctrl + Q:增加各项元数据10000点\n左Ctrl + W:进入沙盒模式\n左Ctrl + Shift + W:离开沙盒模式\n小键盘乘号 *:给手上物品喷涂增产剂\n小键盘除号 /:清除手上物品的增产剂\nPageDown:记录摄像机当前的Pose\nPageUp:用记录的Pose锁定摄像机");
I18N.Add("Unlock Tech with Key-Modifiers Tips",
"Click tech on tree while holding:\n Shift: Tech level + 1\n Ctrl: Tech level + 10\n Ctrl + Shift: Tech level + 100\n Alt: Tech level to MAX\n\nNote: all direct prerequisites will be unlocked as well.",
"按住以下组合键点击科技树:\n Shift:科技等级+1\n Ctrl:科技等级+10\n Ctrl+Shift:科技等级+100\n Alt:科技等级升到最大\n\n注意:所有直接前置科技也会被解锁");
I18N.Add("Remove all metadata consumption records", "Remove all metadata consumption records", "移除所有元数据消耗记录");
I18N.Add("Remove metadata consumption record in current game", "Remove metadata consumption record in current game", "移除当前存档的元数据消耗记录");
I18N.Add("Clear metadata flag which bans achievements", "Clear metadata flag which bans achievements in current game", "解除当前存档因使用元数据导致的成就限制");
I18N.Add("Assign gamesave to current account", "Assign gamesave to current account", "将游戏存档绑定给当前账号");
I18N.Add("Finish build immediately", "Finish build immediately", "建造秒完成");
I18N.Add("Architect mode", "Architect mode", "建筑师模式");
I18N.Add("Build without condition", "Build without condition check", "无条件建造");
I18N.Add("No collision", "No collision", "无碰撞");
I18N.Add("Belt signal generator", "Belt signal generator", "传送带信号物品生成");
I18N.Add("Count proliferators used for raws/intermediates and finished products", "Use proliferators for raws/intermediates and finished products", "原料、中间产物以及成品使用增产剂");
I18N.Add("Count proliferators used for raws/intermediates and finished products tips",
"Following items use extra products: Titanium Alloy, Prism, Frame Material, Proliferator Mk.II, Proliferator Mk.III, Magnetic Coil, Electric Motor, Electromagnetic Turbine, Super-magnetic Ring, Circuit Board, Thruster, Reinforced Thruster, Plasma Exciter, Particle Broadband, Graviton Lens, Quantum Chip, Annihilation Constraint Sphere, Deuteron Fuel Rod, Space Warper, Dyson Sphere Component, Small Carrier Rocket, Electromagnetic Matrix, Structure Matrix, Information Matrix, Gravity Matrix, Universe Matrix\nFollowing items does not use proliferators: Casimir Crystal, Energy Matrix\nOther items use speed up production.",
"以下物品使用额外产出: 钛合金, 棱镜, 框架材料, 增产剂 Mk.II, 增产剂 Mk.III, 磁线圈, 电动机, 电磁涡轮, 超级磁场环, 电路板, 推进器, 加力推进器, 电浆激发器, 粒子宽带, 引力透镜, 量子芯片, 湮灭约束球, 氘核燃料棒, 空间翘曲器, 戴森球组件, 小型运载火箭, 电磁矩阵, 结构矩阵, 信息矩阵, 引力矩阵, 宇宙矩阵\n以下物品不使用增产剂: 卡西米尔晶体, 能量矩阵\n其他物品使用加速生产");
I18N.Add("Belt signal alt format", "Belt signal alt format", "传送带信号替换格式");
I18N.Add("Belt signal alt format tips",
"Belt signal number format alternative format:\n AAAABC by default\n BCAAAA as alternative\nAAAA=generation speed in minutes, B=proliferate points, C=stack count",
"传送带信号物品生成数量格式:\n 默认为AAAABC\n 勾选替换为BCAAAA\nAAAA=生成速度,B=增产点数,C=堆叠数量");
I18N.Add("Count generations as production in statistics", "Count generations as production in statistics", "统计信息里将生成计算为产物");
I18N.Add("Count removals as consumption in statistics", "Count removals as consumption in statistics", "统计信息里将移除计算为消耗");
I18N.Add("Count all raws and intermediates in statistics", "Count all raw materials in statistics", "统计信息里计算所有原料和中间产物");
I18N.Add("Remove power space limit", "Remove space limit for winds and geothermals", "移除风力发电和地热发电的间距限制");
I18N.Add("Boost wind power", "Boost wind power(x100,000)", "提升风力发电(x100,000)");
I18N.Add("Boost solar power", "Boost solar power(x100,000)", "提升太阳能发电(x100,000)");
I18N.Add("Boost fuel power", "Boost fuel power(x50,000)", "提升燃料发电(x50,000)");
I18N.Add("Boost fuel power 2", "(x20,000 for deuteron, x10,000 for antimatter)", "(氘核燃料棒x20,000,反物质燃料棒x10,000)");
I18N.Add("Wind Turbines do global power coverage", "Wind Turbines do global power coverage", "风力涡轮机供电覆盖全球");
I18N.Add("Boost geothermal power", "Boost geothermal power(x50,000)", "提升地热发电(x50,000)");
I18N.Add("Retrieve/Place items from/to remote planets on logistics control panel", "Retrieve/Place items from/to remote planets on logistics control panel", "在物流总控面板上可以从非本地行星取放物品");
I18N.Add("Infinite Natural Resources", "Infinite natural resources", "自然资源采集不消耗");
I18N.Add("Fast Mining", "Fast mining", "高速采集");
I18N.Add("Pump Anywhere", "Pump anywhere", "平地抽水");
I18N.Add("Skip bullet period", "Skip bullet period", "跳过子弹阶段");
I18N.Add("Fire all bullets at once", "Fire all bullets at once", "一次弹射所有太阳帆");
I18N.Add("Skip absorption period", "Skip absorption period", "跳过吸收阶段");
I18N.Add("Quick absorb", "Quick absorb", "快速吸收");
I18N.Add("Eject anyway", "Eject anyway", "全球弹射");
I18N.Add("Overclock Ejectors", "Overclock Ejectors (10x)", "高速弹射器(10倍射速)");
I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)");
I18N.Add("Unlock Dyson Sphere max orbit radius", "Unlock Dyson Sphere max orbit radius", "解锁戴森球最大轨道半径");
I18N.Add("Complete Dyson Sphere shells instantly", "Complete Dyson Sphere shells instantly", "立即完成戴森壳建造");
I18N.Add("Remove all frames on Dyson Sphere", "Remove all frames on Dyson Sphere", "移除戴森球上的所有框架");
I18N.Add("Generate illegal dyson shell", "Generate an illegal dyson shell (!!1st shell layer will be replaced!!)", "生成单层仙术戴森壳(!!会先删除第一层戴森壳!!)");
I18N.Add("Generate illegal dyson shell 2", "Generate illegal dyson shells for all layers without nodes and shells", "为所有没有节点和壳的层级生成仙术戴森壳");
I18N.Add("Keep max production shells and remove others", "Keep max production shells and remove others", "保留发电量最高的戴森壳并移除其他戴森壳");
I18N.Add("Duplicate shells from that with highest production", "Duplicate shells from that with highest production", "从发电量最高的壳复制戴森壳");
I18N.Add("Generate illegal dyson shell quickly", "Generate illegal dyson shell quickly", "快速生成仙术戴森壳");
I18N.Add("Shells count", "Shells count", "壳面数量");
I18N.Add("WARNING: This operation can be very slow, continue?", "WARNING: This operation can be very slow, continue?", "警告:此操作可能非常慢,继续吗?");
I18N.Add("WARNING: This operation is DANGEROUS, continue?", "WARNING: This operation is DANGEROUS, continue?", "警告:此操作非常危险,继续吗?");
I18N.Add("Terraform without enough soil piles", "Terraform without enough soil piles", "沙土不够时依然可以整改地形");
I18N.Add("Instant hand-craft", "Instant hand-craft", "快速手动制造");
I18N.Add("Instant teleport (like that in Sandbox mode)", "Instant teleport (like that in Sandbox mode)", "快速传送(和沙盒模式一样)");
I18N.Add("Mecha and Drones/Fleets invicible", "Mecha and Drones/Fleets invicible", "机甲和战斗无人机无敌");
I18N.Add("Buildings invicible", "Buildings invincible", "建筑无敌");
I18N.Add("Enable warp without space warpers", "Enable warp without space warpers", "无需空间翘曲器即可曲速飞行");
I18N.Add("Teleport to outer space", "Teleport to outer space", "传送到外太空");
I18N.Add("Teleport to selected astronomical", "Teleport to selected astronomical", "传送到选中的天体");
I18N.Apply();
MyConfigWindow.OnUICreated += CreateUI;
MyConfigWindow.OnUpdateUI += UpdateUI;
}