1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 02:53:29 +08:00

CheatEnabler v2.3.28

This commit is contained in:
2025-03-25 21:10:08 +08:00
parent c30758cfab
commit 5dba87dc7f
7 changed files with 29 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
## Changlog ## Changlog
* 2.3.28
+ New feature: `Instant hand-craft`.
+ Fix some panels' display while `Infinite Natural Resources` is enabled.
* 2.3.27 * 2.3.27
+ `Skip bullet period` & `Eject anyway`: Fix compatibility with `Dyson Sphere Program v0.10.32.25496`. + `Skip bullet period` & `Eject anyway`: Fix compatibility with `Dyson Sphere Program v0.10.32.25496`.
* 2.3.26 * 2.3.26
@@ -143,6 +146,9 @@
## 更新日志 ## 更新日志
* 2.3.28
+ 新功能:`快速手动制造`
+ 修复了启用`自然资源采集不消耗`时部分面板的显示问题
* 2.3.27 * 2.3.27
+ `跳过子弹阶段``全球弹射`:修复了与`戴森球计划 v0.10.32.25496`的兼容性 + `跳过子弹阶段``全球弹射`:修复了与`戴森球计划 v0.10.32.25496`的兼容性
* 2.3.26 * 2.3.26

View File

@@ -63,6 +63,8 @@ public class CheatEnabler : BaseUnityPlugin
"Can pump water anywhere (while water type is not None)"); "Can pump water anywhere (while water type is not None)");
PlanetPatch.TerraformAnywayEnabled = Config.Bind("Planet", "TerraformAnyway", false, PlanetPatch.TerraformAnywayEnabled = Config.Bind("Planet", "TerraformAnyway", false,
"Can do terraform without enough soil piless"); "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, PlayerPatch.InstantTeleportEnabled = Config.Bind("Player", "InstantTeleport", false,
"Enable instant teleport (like that in Sandbox mode)"); "Enable instant teleport (like that in Sandbox mode)");
PlayerPatch.WarpWithoutSpaceWarpersEnabled = Config.Bind("Player", "WarpWithoutWarper", false, PlayerPatch.WarpWithoutSpaceWarpersEnabled = Config.Bind("Player", "WarpWithoutWarper", false,

View File

@@ -5,7 +5,7 @@
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid> <BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
<Description>DSP MOD - CheatEnabler</Description> <Description>DSP MOD - CheatEnabler</Description>
<Version>2.3.27</Version> <Version>2.3.28</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<PackageId>CheatEnabler</PackageId> <PackageId>CheatEnabler</PackageId>

View File

@@ -8,27 +8,41 @@ namespace CheatEnabler.Patches;
public static class PlayerPatch public static class PlayerPatch
{ {
public static ConfigEntry<bool> InstantHandCraftEnabled;
public static ConfigEntry<bool> InstantTeleportEnabled; public static ConfigEntry<bool> InstantTeleportEnabled;
public static ConfigEntry<bool> WarpWithoutSpaceWarpersEnabled; public static ConfigEntry<bool> WarpWithoutSpaceWarpersEnabled;
public static void Init() public static void Init()
{ {
InstantHandCraftEnabled.SettingChanged += (_, _) => InstantHandCraft.Enable(InstantHandCraftEnabled.Value);
InstantTeleportEnabled.SettingChanged += (_, _) => InstantTeleport.Enable(InstantTeleportEnabled.Value); InstantTeleportEnabled.SettingChanged += (_, _) => InstantTeleport.Enable(InstantTeleportEnabled.Value);
WarpWithoutSpaceWarpersEnabled.SettingChanged += (_, _) => WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value); WarpWithoutSpaceWarpersEnabled.SettingChanged += (_, _) => WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value);
} }
public static void Start() public static void Start()
{ {
InstantHandCraft.Enable(InstantHandCraftEnabled.Value);
InstantTeleport.Enable(InstantTeleportEnabled.Value); InstantTeleport.Enable(InstantTeleportEnabled.Value);
WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value); WarpWithoutSpaceWarpers.Enable(WarpWithoutSpaceWarpersEnabled.Value);
} }
public static void Uninit() public static void Uninit()
{ {
InstantHandCraft.Enable(false);
InstantTeleport.Enable(false); InstantTeleport.Enable(false);
WarpWithoutSpaceWarpers.Enable(false); WarpWithoutSpaceWarpers.Enable(false);
} }
private class InstantHandCraft: PatchImpl<InstantHandCraft>
{
[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<InstantTeleport> private class InstantTeleport: PatchImpl<InstantTeleport>
{ {
[HarmonyTranspiler] [HarmonyTranspiler]

View File

@@ -34,6 +34,7 @@
+ Wind Turbines do global power coverage + Wind Turbines do global power coverage
+ Boost power generations for kinds of power generators + Boost power generations for kinds of power generators
+ Planet: + Planet:
+ Instant hand-craft
+ Infinite Natural Resources + Infinite Natural Resources
+ Fast Mining + Fast Mining
+ Pump Anywhere + Pump Anywhere
@@ -94,6 +95,7 @@
+ 风力涡轮机供电覆盖全球 + 风力涡轮机供电覆盖全球
+ 提升各种发电设备发电量 + 提升各种发电设备发电量
+ 行星: + 行星:
+ 快速手动制造
+ 自然资源采集不消耗 + 自然资源采集不消耗
+ 高速采集 + 高速采集
+ 平地抽水 + 平地抽水

View File

@@ -65,6 +65,7 @@ public static class UIConfigWindow
I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)"); I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)");
I18N.Add("Complete Dyson Sphere shells instantly", "Complete Dyson Sphere shells instantly", "立即完成戴森壳建造"); 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("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("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("Mecha and Drones/Fleets invicible", "Mecha and Drones/Fleets invicible", "机甲和战斗无人机无敌");
I18N.Add("Buildings invicible", "Buildings invincible", "建筑无敌"); I18N.Add("Buildings invicible", "Buildings invincible", "建筑无敌");
@@ -171,6 +172,8 @@ public static class UIConfigWindow
y += 36f; y += 36f;
wnd.AddCheckBox(x, y, tab3, PlanetPatch.TerraformAnywayEnabled, "Terraform without enough soil piles"); wnd.AddCheckBox(x, y, tab3, PlanetPatch.TerraformAnywayEnabled, "Terraform without enough soil piles");
y += 36f; 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)"); wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantTeleportEnabled, "Instant teleport (like that in Sandbox mode)");
x = 400f; x = 400f;
y = 10f; y = 10f;

View File

@@ -1,6 +1,6 @@
{ {
"name": "CheatEnabler", "name": "CheatEnabler",
"version_number": "2.3.27", "version_number": "2.3.28",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测", "description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
"dependencies": [ "dependencies": [