From 5dba87dc7f5f54d85505d8a84e52548147381102 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Tue, 25 Mar 2025 21:10:08 +0800 Subject: [PATCH] CheatEnabler v2.3.28 --- CheatEnabler/CHANGELOG.md | 6 ++++++ CheatEnabler/CheatEnabler.cs | 2 ++ CheatEnabler/CheatEnabler.csproj | 2 +- CheatEnabler/Patches/PlayerPatch.cs | 14 ++++++++++++++ CheatEnabler/README.md | 2 ++ CheatEnabler/UIConfigWindow.cs | 3 +++ CheatEnabler/package/manifest.json | 2 +- 7 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CheatEnabler/CHANGELOG.md b/CheatEnabler/CHANGELOG.md index ea94328..ada009d 100644 --- a/CheatEnabler/CHANGELOG.md +++ b/CheatEnabler/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changlog +* 2.3.28 + + New feature: `Instant hand-craft`. + + Fix some panels' display while `Infinite Natural Resources` is enabled. * 2.3.27 + `Skip bullet period` & `Eject anyway`: Fix compatibility with `Dyson Sphere Program v0.10.32.25496`. * 2.3.26 @@ -143,6 +146,9 @@ ## 更新日志 +* 2.3.28 + + 新功能:`快速手动制造` + + 修复了启用`自然资源采集不消耗`时部分面板的显示问题 * 2.3.27 + `跳过子弹阶段`和`全球弹射`:修复了与`戴森球计划 v0.10.32.25496`的兼容性 * 2.3.26 diff --git a/CheatEnabler/CheatEnabler.cs b/CheatEnabler/CheatEnabler.cs index 6e0c7da..f6c2ce4 100644 --- a/CheatEnabler/CheatEnabler.cs +++ b/CheatEnabler/CheatEnabler.cs @@ -63,6 +63,8 @@ public class CheatEnabler : BaseUnityPlugin "Can pump water anywhere (while water type is not None)"); PlanetPatch.TerraformAnywayEnabled = Config.Bind("Planet", "TerraformAnyway", false, "Can do terraform without enough soil piless"); + PlayerPatch.InstantHandCraftEnabled = Config.Bind("Player", "InstantHandCraft", false, + "Enable instant hand-craft"); PlayerPatch.InstantTeleportEnabled = Config.Bind("Player", "InstantTeleport", false, "Enable instant teleport (like that in Sandbox mode)"); PlayerPatch.WarpWithoutSpaceWarpersEnabled = Config.Bind("Player", "WarpWithoutWarper", false, diff --git a/CheatEnabler/CheatEnabler.csproj b/CheatEnabler/CheatEnabler.csproj index 9f08495..68e1e50 100644 --- a/CheatEnabler/CheatEnabler.csproj +++ b/CheatEnabler/CheatEnabler.csproj @@ -5,7 +5,7 @@ net472 org.soardev.cheatenabler DSP MOD - CheatEnabler - 2.3.27 + 2.3.28 true latest CheatEnabler diff --git a/CheatEnabler/Patches/PlayerPatch.cs b/CheatEnabler/Patches/PlayerPatch.cs index b97ed7e..3890b84 100644 --- a/CheatEnabler/Patches/PlayerPatch.cs +++ b/CheatEnabler/Patches/PlayerPatch.cs @@ -8,27 +8,41 @@ namespace CheatEnabler.Patches; public static class PlayerPatch { + public static ConfigEntry InstantHandCraftEnabled; public static ConfigEntry InstantTeleportEnabled; public static ConfigEntry WarpWithoutSpaceWarpersEnabled; public static void Init() { + InstantHandCraftEnabled.SettingChanged += (_, _) => InstantHandCraft.Enable(InstantHandCraftEnabled.Value); InstantTeleportEnabled.SettingChanged += (_, _) => InstantTeleport.Enable(InstantTeleportEnabled.Value); WarpWithoutSpaceWarpersEnabled.SettingChanged += (_, _) => WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value); } public static void Start() { + InstantHandCraft.Enable(InstantHandCraftEnabled.Value); InstantTeleport.Enable(InstantTeleportEnabled.Value); WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value); } public static void Uninit() { + InstantHandCraft.Enable(false); InstantTeleport.Enable(false); WarpWithoutSpaceWarpers.Enable(false); } + private class InstantHandCraft: PatchImpl + { + [HarmonyPostfix] + [HarmonyPatch(typeof(ForgeTask), MethodType.Constructor, typeof(int), typeof(int))] + private static void ForgeTask_Ctor_Postfix(ForgeTask __instance) + { + __instance.tickSpend = 0; + } + } + private class InstantTeleport: PatchImpl { [HarmonyTranspiler] diff --git a/CheatEnabler/README.md b/CheatEnabler/README.md index 6c5945c..8fd3013 100644 --- a/CheatEnabler/README.md +++ b/CheatEnabler/README.md @@ -34,6 +34,7 @@ + Wind Turbines do global power coverage + Boost power generations for kinds of power generators + Planet: + + Instant hand-craft + Infinite Natural Resources + Fast Mining + Pump Anywhere @@ -94,6 +95,7 @@ + 风力涡轮机供电覆盖全球 + 提升各种发电设备发电量 + 行星: + + 快速手动制造 + 自然资源采集不消耗 + 高速采集 + 平地抽水 diff --git a/CheatEnabler/UIConfigWindow.cs b/CheatEnabler/UIConfigWindow.cs index b07062d..8596241 100644 --- a/CheatEnabler/UIConfigWindow.cs +++ b/CheatEnabler/UIConfigWindow.cs @@ -65,6 +65,7 @@ public static class UIConfigWindow I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)"); I18N.Add("Complete Dyson Sphere shells instantly", "Complete Dyson Sphere shells instantly", "立即完成戴森壳建造"); 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", "建筑无敌"); @@ -171,6 +172,8 @@ public static class UIConfigWindow y += 36f; wnd.AddCheckBox(x, y, tab3, PlanetPatch.TerraformAnywayEnabled, "Terraform without enough soil piles"); y += 36f; + wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantHandCraftEnabled, "Instant hand-craft"); + y += 36f; wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantTeleportEnabled, "Instant teleport (like that in Sandbox mode)"); x = 400f; y = 10f; diff --git a/CheatEnabler/package/manifest.json b/CheatEnabler/package/manifest.json index 72e0f3d..5ea00de 100644 --- a/CheatEnabler/package/manifest.json +++ b/CheatEnabler/package/manifest.json @@ -1,6 +1,6 @@ { "name": "CheatEnabler", - "version_number": "2.3.27", + "version_number": "2.3.28", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler", "description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测", "dependencies": [