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
64a23e9772
commit
e35fba88ae
60 files changed
+1094
-994
No files matched your search
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using UXAssist.Common;
|
||||
@@ -14,11 +13,6 @@ namespace UXAssist.Patches.Factory;
|
||||
[ModFeature("BeltSignalsForBuyOut")]
|
||||
internal static class BeltSignalPatch
|
||||
{
|
||||
public static void Enable(bool enable)
|
||||
{
|
||||
BeltSignalsForBuyOut.Enable(enable);
|
||||
}
|
||||
|
||||
public static void InitPersist()
|
||||
{
|
||||
BeltSignalsForBuyOut.InitPersist();
|
||||
@@ -125,23 +119,6 @@ internal static class BeltSignalPatch
|
||||
_loaded = true;
|
||||
}
|
||||
|
||||
private static void RemoveBeltSignalProtos()
|
||||
{
|
||||
if (!_initialized || !_loaded) return;
|
||||
var signals = LDB._signals;
|
||||
if (signals.dataIndices.TryGetValue(301, out var index))
|
||||
{
|
||||
signals.dataArray = [.. signals.dataArray.Take(index), .. signals.dataArray.Skip(index + 6)];
|
||||
for (var id = 301; id <= 306; id++)
|
||||
signals.dataIndices.Remove(id);
|
||||
var len = signals.dataArray.Length;
|
||||
for (; index < len; index++)
|
||||
signals.dataIndices[signals.dataArray[index].ID] = index;
|
||||
}
|
||||
|
||||
_loaded = false;
|
||||
}
|
||||
|
||||
private static void InitSignalBelts()
|
||||
{
|
||||
if (!GameMain.isRunning) return;
|
||||
|
||||
Reference in new issue
Block a user