mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
refactor: remove single-owner helpers and redundant plumbing
Return feature-only helpers to their owners, remove inactive scaffolding and duplicate state, and reuse existing calculation and UI work without changing public contracts or gameplay. Record repository-wide coverage, justified retentions, independent reviews and validation, including baseline dashboard fixture failures. Assisted-by: Cindy (https://cindy.app)
This commit is contained in:
1 parent
325536fc79
commit
ba2648a3e3
60 files changed
+1094
-994
No files matched your search
@@ -17,7 +17,7 @@ internal static class TechClickHandler
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TechLog.Warn($"click handling failed: {e}");
|
||||
CheatEnabler.Logger.LogWarning($"[TechTweaks] click handling failed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ internal static class TechClickHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TechKeyCombo.TryDecode(out int steps))
|
||||
if (!TryDecodeModifiers(out int steps))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -54,4 +54,32 @@ internal static class TechClickHandler
|
||||
TechUnlock.Run(history, techProto, steps);
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryDecodeModifiers(out int steps)
|
||||
{
|
||||
steps = 0;
|
||||
|
||||
if (VFInput.shift)
|
||||
{
|
||||
if (VFInput.alt) return false;
|
||||
steps = VFInput.control ? 100 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (VFInput.control)
|
||||
{
|
||||
if (VFInput.alt) return false;
|
||||
steps = 10;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (VFInput.alt)
|
||||
{
|
||||
// Alt applies or reverts every level available to this click.
|
||||
steps = int.MaxValue;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user