1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 03:33:29 +08:00
This commit is contained in:
2023-09-10 15:23:35 +08:00
parent ead9f4e105
commit 07a32f7fd0
4 changed files with 579 additions and 24 deletions

View File

@@ -11,10 +11,20 @@ public class UIConfigWindow : UI.MyWindowWithTabs
I18N.Add("General", "General", "常规");
I18N.Add("Enable Dev Shortcuts", "Enable Dev Shortcuts", "启用开发模式快捷键");
I18N.Add("Disable Abnormal Checks", "Disable Abnormal Checks", "关闭数据异常检查");
I18N.Add("Build", "Build", "建造");
I18N.Add("Finish build immediately", "Finish build immediately", "建造秒完成");
I18N.Add("Infinite buildings", "Infinite buildings", "无限建筑");
I18N.Add("Build without condition", "Build without condition", "无条件建造");
I18N.Add("No collision", "No collision", "无碰撞");
I18N.Add("Planet", "Planet", "行星");
I18N.Add("Infinite Natural Resources", "Infinite Natural Resources", "自然资源采集不消耗");
I18N.Add("Fast Mining", "Fast Mining", "高速采集");
I18N.Add("Pump Anywhere", "Pump Anywhere", "平地抽水");
I18N.Add("Dyson Sphere", "Dyson Sphere", "戴森球");
I18N.Add("Skip bullet period", "Skip bullet period", "跳过子弹阶段");
I18N.Add("Skip absorption period", "Skip absorption period", "跳过吸收阶段");
I18N.Add("Quick absorb", "Quick absorb", "快速吸收");
I18N.Add("Eject anyway", "Eject anyway", "全球弹射");
I18N.Add("Birth", "Birth Sys", "母星系");
I18N.Add("Terraform without enought sands", "Terraform without enough sands", "沙土不够时依然可以整改地形");
I18N.Add("Silicon/Titanium on birth planet", "Silicon/Titanium on birth planet", "母星有硅和钛");
@@ -40,7 +50,7 @@ public class UIConfigWindow : UI.MyWindowWithTabs
public override void _OnCreate()
{
_windowTrans = GetComponent<RectTransform>();
_windowTrans.sizeDelta = new Vector2(480f, 331f);
_windowTrans.sizeDelta = new Vector2(580f, 331f);
CreateUI();
}
@@ -55,30 +65,41 @@ public class UIConfigWindow : UI.MyWindowWithTabs
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab1, AbnormalDisabler.Enabled, "Disable Abnormal Checks".Translate());
// Planet Tab
var tab2 = AddTab(136f, 1, _windowTrans, "Planet".Translate());
var tab2 = AddTab(136f, 1, _windowTrans, "Build".Translate());
x = 0f;
y = 10f;
UI.MyCheckBox.CreateCheckBox(x, y, tab2, ResourcePatch.InfiniteEnabled, "Infinite Natural Resources".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab2, BuildPatch.ImmediateEnabled, "Finish build immediately".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab2, ResourcePatch.FastEnabled, "Fast Mining".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab2, BuildPatch.NoCostEnabled, "Infinite buildings".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab2, WaterPumperPatch.Enabled, "Pump Anywhere".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab2, BuildPatch.NoConditionEnabled, "Build without condition".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab2, TerraformPatch.Enabled, "Terraform without enought sands".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab2, BuildPatch.NoCollisionEnabled, "No collision".Translate());
// Planet Tab
var tab3 = AddTab(236f, 2, _windowTrans, "Planet".Translate());
x = 0f;
y = 10f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, ResourcePatch.InfiniteEnabled, "Infinite Natural Resources".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, ResourcePatch.FastEnabled, "Fast Mining".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, WaterPumperPatch.Enabled, "Pump Anywhere".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, TerraformPatch.Enabled, "Terraform without enought sands".Translate());
x = 300f;
y = 10f;
AddButton(x, y, tab2, "矿物掩埋标题", 16, "button-bury-all", () =>
AddButton(x, y, tab3, "矿物掩埋标题", 16, "button-bury-all", () =>
{
PlanetFunctions.BuryAllVeins(true);
});
y += 36f;
AddButton(x, y, tab2, "矿物还原标题", 16, "button-bury-restore-all", () =>
AddButton(x, y, tab3, "矿物还原标题", 16, "button-bury-restore-all", () =>
{
PlanetFunctions.BuryAllVeins(false);
});
y += 36f;
AddButton(x, y, tab2, "铺满地基提示", 16, "button-reform-all", () =>
AddButton(x, y, tab3, "铺满地基提示", 16, "button-reform-all", () =>
{
var player = GameMain.mainPlayer;
if (player == null) return;
@@ -88,46 +109,57 @@ public class UIConfigWindow : UI.MyWindowWithTabs
GameMain.localPlanet.factory.PlanetReformAll(reformTool.brushType, reformTool.brushColor, reformTool.buryVeins);
});
y += 36f;
AddButton(x, y, tab2, "还原地形提示", 16, "button-reform-revert-all", () =>
AddButton(x, y, tab3, "还原地形提示", 16, "button-reform-revert-all", () =>
{
var factory = GameMain.localPlanet?.factory;
if (factory == null) return;
GameMain.localPlanet.factory.PlanetReformRevert();
});
y += 36f;
AddButton(x, y, tab2, "Initialize This Planet", 16, "button-init-planet", () =>
AddButton(x, y, tab3, "Initialize This Planet", 16, "button-init-planet", () =>
{
PlanetFunctions.RecreatePlanet(true);
});
y += 36f;
AddButton(x, y, tab2, "Dismantle All Buildings", 16, "button-dismantle-all", () =>
AddButton(x, y, tab3, "Dismantle All Buildings", 16, "button-dismantle-all", () =>
{
PlanetFunctions.DismantleAll(false);
});
var tab3 = AddTab(236f, 2, _windowTrans, "Birth".Translate());
var tab4 = AddTab(336f, 3, _windowTrans, "Dyson Sphere".Translate());
x = 0f;
y = 10f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.SitiVeinsOnBirthPlanet, "Silicon/Titanium on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab4, DysonSpherePatch.SkipBulletEnabled, "Skip bullet period".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.FireIceOnBirthPlanet, "Fire ice on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab4, DysonSpherePatch.SkipAbsorbEnabled, "Skip absorption period".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.KimberliteOnBirthPlanet, "Kimberlite on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab4, DysonSpherePatch.QuickAbsortEnabled, "Quick absorb".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.FractalOnBirthPlanet, "Fractal silicon on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab4, DysonSpherePatch.EjectAnywayEnabled, "Eject anyway".Translate());
var tab5 = AddTab(436f, 4, _windowTrans, "Birth".Translate());
x = 0f;
y = 10f;
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.SitiVeinsOnBirthPlanet, "Silicon/Titanium on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.OrganicOnBirthPlanet, "Organic crystal on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.FireIceOnBirthPlanet, "Fire ice on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.KimberliteOnBirthPlanet, "Kimberlite on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.FractalOnBirthPlanet, "Fractal silicon on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.OrganicOnBirthPlanet, "Organic crystal on birth planet".Translate());
x = 200f;
y = 10f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.OpticalOnBirthPlanet, "Optical grating crystal on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.OpticalOnBirthPlanet, "Optical grating crystal on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.SpiniformOnBirthPlanet, "Spiniform stalagmite crystal on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.SpiniformOnBirthPlanet, "Spiniform stalagmite crystal on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.UnipolarOnBirthPlanet, "Unipolar magnet on birth planet".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.UnipolarOnBirthPlanet, "Unipolar magnet on birth planet".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.FlatBirthPlanet, "Birth planet is solid flat (no water at all)".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.FlatBirthPlanet, "Birth planet is solid flat (no water at all)".Translate());
y += 36f;
UI.MyCheckBox.CreateCheckBox(x, y, tab3, BirthPlanetPatch.HighLuminosityBirthStar, "Birth star has high luminosity".Translate());
UI.MyCheckBox.CreateCheckBox(x, y, tab5, BirthPlanetPatch.HighLuminosityBirthStar, "Birth star has high luminosity".Translate());
SetCurrentTab(0);
}