From 97519565b4b8b9039977ea0d336088f0e477f857 Mon Sep 17 00:00:00 2001
From: Sofie <63377159+SofieBrink@users.noreply.github.com>
Date: Sat, 18 Jul 2026 11:52:18 +0200
Subject: [PATCH] Remove deprecated module
---
Source/KSPCommunityPartModules.csproj | 1 -
Source/Modules/ModuleCoPFollowTransform.cs | 58 ----------------------
2 files changed, 59 deletions(-)
delete mode 100644 Source/Modules/ModuleCoPFollowTransform.cs
diff --git a/Source/KSPCommunityPartModules.csproj b/Source/KSPCommunityPartModules.csproj
index 00c6e67..9b8fd37 100644
--- a/Source/KSPCommunityPartModules.csproj
+++ b/Source/KSPCommunityPartModules.csproj
@@ -40,7 +40,6 @@
-
diff --git a/Source/Modules/ModuleCoPFollowTransform.cs b/Source/Modules/ModuleCoPFollowTransform.cs
deleted file mode 100644
index 4a71d87..0000000
--- a/Source/Modules/ModuleCoPFollowTransform.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Usecase: Making the Centre of Pressure follow a transform on the same part.
- Example: BoringCrewServices Starliner main parachutes
- Originally By: Sofie Brink
- Originally For: KSPCommunityPartModules
-*/
-using UnityEngine;
-
-namespace KSPCommunityPartModules.Modules
-{
- public class ModuleCoPFollowTransform : PartModule
- {
- public const string MODULENAME = nameof(ModuleCoPFollowTransform);
-
- [KSPField]
- public string transformName;
-
- [SerializeField]
- private Transform followTransform;
-
- public override void OnLoad(ConfigNode node)
- {
- Debug.LogWarning($"[{MODULENAME}] This module is deprecated! please use ModuleCenterFollowTransform instead!");
- if (followTransform == null || followTransform.name != transformName)
- {
- if (transformName != null) followTransform = part.FindModelTransform(transformName);
- if (followTransform == null) Debug.LogError($"[{MODULENAME}] transformName '{transformName}' was empty or does not exist on part '{part.partInfo?.name}'");
- }
-
- if (followTransform == null && part.partInfo != null)
- {
- // this may be important if someone is swapping out versions of this module with B9PS
- // Note this probably isn't correct for parts that also have modules that mess with this field (e.g. ModuleProceduralFairing)
- part.CoPOffset = part.partInfo.partPrefab.CoPOffset;
- }
-
- // NOTE: isEnabled will be persisted to the save file, but we want to treat it purely as runtime state
- this.isEnabled = followTransform != null;
- this.enabled = followTransform != null && HighLogic.LoadedSceneIsFlight;
- }
-
- public void FixedUpdate()
- {
- // Note that we shouldn't ever get here if the transform just didn't exist
- // But it's certainly possible for *something* to delete it later
- if (followTransform == null)
- {
- isEnabled = false;
- enabled = false;
- // should we reset CoPOffset here? Not sure.
- }
- else
- {
- part.CoPOffset = part.transform.InverseTransformPoint(followTransform.position);
- }
- }
- }
-}