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
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.Common.ModFeatures;
|
||||
using CheatEnabler;
|
||||
|
||||
namespace CheatEnabler.Functions.DysonSphere;
|
||||
|
||||
[ModFeature("DysonSphereResolver")]
|
||||
public static class DysonSphereResolver
|
||||
{
|
||||
public static (global::DysonSphere sphere, StarData star)? ResolveCurrent()
|
||||
|
||||
@@ -3,13 +3,11 @@ using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.Common.GameConstants;
|
||||
using UXAssist.Common.ModFeatures;
|
||||
using UXAssist.Common.Utils;
|
||||
using CheatEnabler;
|
||||
|
||||
namespace CheatEnabler.Functions.DysonSphere;
|
||||
|
||||
[ModFeature("FrameRemovalFunctions")]
|
||||
public static class FrameRemovalFunctions
|
||||
{
|
||||
public static void RemoveAllFrames()
|
||||
|
||||
@@ -7,12 +7,10 @@ using static CheatEnabler.Functions.DysonSphere.GeometryHelpers;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.Common.GameConstants;
|
||||
using UXAssist.Common.ModFeatures;
|
||||
using CheatEnabler;
|
||||
|
||||
namespace CheatEnabler.Functions.DysonSphere;
|
||||
|
||||
[ModFeature("IllegalShellFunctions")]
|
||||
public static class IllegalShellFunctions
|
||||
{
|
||||
private static void EnsureDysonShellMaps()
|
||||
@@ -41,7 +39,7 @@ public static class IllegalShellFunctions
|
||||
layer.shellCursor = 1;
|
||||
}
|
||||
|
||||
private static void FinalizeDysonSphereChanges(global::DysonSphere sphere, DysonSphereLayer layer, bool notify = false, bool resetRenderMasks = false)
|
||||
private static void FinalizeDysonSphereChanges(global::DysonSphere sphere, bool notify = false, bool resetRenderMasks = false)
|
||||
{
|
||||
if (sphere == null) return;
|
||||
sphere.CheckAutoNodes();
|
||||
@@ -140,7 +138,7 @@ public static class IllegalShellFunctions
|
||||
node.RecalcSpReq();
|
||||
node.RecalcCpReq();
|
||||
}
|
||||
FinalizeDysonSphereChanges(dysonSphere, layer, true, true);
|
||||
FinalizeDysonSphereChanges(dysonSphere, true, true);
|
||||
}
|
||||
|
||||
public static void KeepMaxProductionShells()
|
||||
@@ -245,7 +243,7 @@ public static class IllegalShellFunctions
|
||||
node.RecalcCpReq();
|
||||
}
|
||||
}
|
||||
FinalizeDysonSphereChanges(dysonSphere, null);
|
||||
FinalizeDysonSphereChanges(dysonSphere);
|
||||
}
|
||||
|
||||
public static void CreateIllegalDysonShellQuickly(int triangleCount)
|
||||
@@ -317,7 +315,7 @@ public static class IllegalShellFunctions
|
||||
node.RecalcSpReq();
|
||||
node.RecalcCpReq();
|
||||
}
|
||||
FinalizeDysonSphereChanges(dysonSphere, layer, true);
|
||||
FinalizeDysonSphereChanges(dysonSphere, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -433,7 +431,7 @@ public static class IllegalShellFunctions
|
||||
|
||||
var shellsChanged = CreateIllegalDysonShellWithMaxOutputForLayer(layer);
|
||||
|
||||
FinalizeDysonSphereChanges(dysonSphere, layer, shellsChanged, true);
|
||||
FinalizeDysonSphereChanges(dysonSphere, shellsChanged, true);
|
||||
}
|
||||
|
||||
public static void CreateIllegalDysonShellWithMaxOutputForAllLayers()
|
||||
@@ -449,7 +447,7 @@ public static class IllegalShellFunctions
|
||||
shellsChanged = CreateIllegalDysonShellWithMaxOutputForLayer(layer) || shellsChanged;
|
||||
}
|
||||
|
||||
FinalizeDysonSphereChanges(dysonSphere, dysonSphere.layersSorted.FirstOrDefault(l => l != null), shellsChanged, true);
|
||||
FinalizeDysonSphereChanges(dysonSphere, shellsChanged, true);
|
||||
}
|
||||
|
||||
public static void CreateIllegalDysonShellsSpecially()
|
||||
@@ -477,8 +475,6 @@ public static class IllegalShellFunctions
|
||||
|
||||
for (var idx = 1; idx <= 2; idx++)
|
||||
{
|
||||
Dictionary<(int, int), int> availableFrames = [];
|
||||
HashSet<int> unusedFrameIds = [];
|
||||
var layer = dysonSphere.layersIdBased[idx];
|
||||
if (layer != null)
|
||||
{
|
||||
@@ -571,6 +567,6 @@ public static class IllegalShellFunctions
|
||||
}
|
||||
}
|
||||
|
||||
FinalizeDysonSphereChanges(dysonSphere, dysonSphere.layersIdBased[2], shellsChanged, true);
|
||||
FinalizeDysonSphereChanges(dysonSphere, shellsChanged, true);
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,11 @@ using System.Linq;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.Common.ModFeatures;
|
||||
using UXAssist.Common.Utils;
|
||||
using CheatEnabler;
|
||||
|
||||
namespace CheatEnabler.Functions.DysonSphere;
|
||||
|
||||
[ModFeature("ShellCompletionFunctions")]
|
||||
public static class ShellCompletionFunctions
|
||||
{
|
||||
public static void CompleteShellsInstantly()
|
||||
|
||||
Reference in new issue
Block a user