mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
fix(cheatenabler): make tech downgrades safe and refresh docs
Validate the full dependency cascade and capacity reductions before applying tech downgrades. Preserve shared recipes, restore native bonus values and station limits, and clamp stored energy to the remaining capacity. Fix warning integration and tech-tree help button ownership, cleanup and localization. Use the shared patch lifecycle and guarded transpilers. Refresh bilingual feature and usage documentation, and consolidate the 2.4.7 changelog around the final user-visible behavior.
This commit is contained in:
1 parent
99bcf7fa5f
commit
5fb8695348
13 files changed
+555
-813
No files matched your search
@@ -20,7 +20,8 @@ internal static class DowngradeMode
|
||||
/// <summary>Per-frame <c>Caps Lock</c> poll; driven by the mod feature registry input hook.</summary>
|
||||
public static void Update()
|
||||
{
|
||||
if (TechTweaksPatch.Enabled == null || !TechTweaksPatch.Enabled.Value)
|
||||
if (TechTweaksPatch.Enabled == null || !TechTweaksPatch.Enabled.Value ||
|
||||
TechTweaksPatch.Impl.GetHarmony() == null || DSPGame.IsMenuDemo || !GameMain.isRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -45,6 +46,8 @@ internal static class DowngradeMode
|
||||
|
||||
public static void Reset()
|
||||
{
|
||||
if (!IsOn) return;
|
||||
IsOn = false;
|
||||
GameMain.data?.warningSystem?.UpdateCriticalWarningText();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user