From 618e53336f3d8c884a8e24207a0198fcd9820e0f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 13:39:23 +0200 Subject: [PATCH] Delete TurnTime and IAnalogBehavior TurnTime has no caller; IAnalogBehavior's only implementer is Thruster. Pure deletes, no behaviour change. Not compiled in Unity (the operator's); the Shared tests build at the end. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/Behaviors/Behaviors.cs | 5 ----- Assets/Scripts/ServerShared/Behaviors/Thruster.cs | 2 +- Assets/Scripts/ServerShared/Entity.cs | 2 -- Assets/Scripts/ServerShared/Ship.cs | 7 ------- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 244af7d89..1a12d4282 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -93,11 +93,6 @@ public interface IActivatedBehavior void Deactivate(); } -public interface IAnalogBehavior -{ - float Axis { get; set; } -} - public interface IEventBehavior { void ResetEvents(); diff --git a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs index 007bf66bc..35894febb 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs @@ -37,7 +37,7 @@ public class ThrusterData : BehaviorData } } -public class Thruster : Behavior, IAnalogBehavior, IPowerConsumer +public class Thruster : Behavior, IPowerConsumer { // Live: heat, quality, durability and power move this stat after construction, so it is read, never cached. public float Thrust => Evaluate(_data.Thrust); diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index 59bc38cc9..90fb6e0b5 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -2356,6 +2356,4 @@ public class BehaviorGroup return null; } - - //public IAnalogBehavior Axis; } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Ship.cs b/Assets/Scripts/ServerShared/Ship.cs index 993d92940..6848c6073 100644 --- a/Assets/Scripts/ServerShared/Ship.cs +++ b/Assets/Scripts/ServerShared/Ship.cs @@ -59,13 +59,6 @@ public class Ship : Entity public float RightStrafeTotalTorque { get; private set; } private List RightStrafeTorqueThrusters = new List(); - public float TurnTime(float2 direction) - { - var angleDiff = Direction.Angle(normalize(direction)); - var clockwise = dot(direction, Direction.Rotate(ItemRotation.Clockwise)) > 0; - return angleDiff / ((clockwise ? ClockwiseTorque : CounterClockwiseTorque) / Mass); - } - public event Action OnExitedWormhole; public event Action OnEnteredWormhole;