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
@@ -9,9 +9,11 @@ using UnityEngine;
|
||||
namespace MechaDronesTweaks;
|
||||
|
||||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
||||
[BepInDependency(FastDronesRemover.FastDronesGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
[BepInDependency(FastDronesGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
public class MechaDronesTweaksPlugin : BaseUnityPlugin
|
||||
{
|
||||
private const string FastDronesGuid = "com.dkoppstein.plugin.DSP.FastDrones";
|
||||
|
||||
public new static readonly BepInEx.Logging.ManualLogSource Logger =
|
||||
BepInEx.Logging.Logger.CreateLogSource(PluginInfo.PLUGIN_NAME);
|
||||
|
||||
@@ -22,8 +24,13 @@ public class MechaDronesTweaksPlugin : BaseUnityPlugin
|
||||
/* Remove FastDrones MOD if loaded */
|
||||
try
|
||||
{
|
||||
if (FastDronesRemover.Run(_harmony))
|
||||
if (BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(FastDronesGuid, out var pluginInfo) &&
|
||||
pluginInfo.Metadata.Version.ToString() == "0.0.5")
|
||||
{
|
||||
var assembly = pluginInfo.Instance.GetType().Assembly;
|
||||
var classType = assembly.GetType("com.dkoppstein.plugin.DSP.FastDrones.FastDronesPlugin");
|
||||
_harmony.Patch(AccessTools.Method(classType, "Start"),
|
||||
new HarmonyMethod(AccessTools.Method(typeof(MechaDronesTweaksPlugin), nameof(PatchFastDronesStart))));
|
||||
Logger.LogInfo("Unpatch FastDrones - OK");
|
||||
}
|
||||
}
|
||||
@@ -33,6 +40,8 @@ public class MechaDronesTweaksPlugin : BaseUnityPlugin
|
||||
}
|
||||
}
|
||||
|
||||
private static bool PatchFastDronesStart() => false;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
MechaDronesTweaks.UseFixedSpeed = Config.Bind("MechaDrones", "UseFixedSpeed", MechaDronesTweaks.UseFixedSpeed,
|
||||
@@ -54,10 +63,6 @@ public class MechaDronesTweaksPlugin : BaseUnityPlugin
|
||||
MechaDronesTweaks.EnergyMultiplier,
|
||||
new ConfigDescription("Energy consumption multiplier for mecha drones",
|
||||
new AcceptableValueRange<float>(0f, 1f))).Value;
|
||||
MechaDronesTweaks.EnergyMultiplier = Config.Bind("MechaDrones", "EnergyMultiplier",
|
||||
MechaDronesTweaks.EnergyMultiplier,
|
||||
new ConfigDescription("Energy consumption multiplier for mecha drones",
|
||||
new AcceptableValueRange<float>(0f, 1f))).Value;
|
||||
|
||||
_harmony.PatchAll(typeof(MechaDronesTweaks));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user