Skip to content

Commit

Permalink
Update ThrusterSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Sep 13, 2024
1 parent d33a0b1 commit 1c3d520
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Content.Server/Shuttles/Systems/ThrusterSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Numerics;
using Content.Server.Audio;
using Content.Server.Construction;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Server.Shuttles.Components;
Expand Down Expand Up @@ -203,12 +204,10 @@ private void OnRotate(EntityUid uid, ThrusterComponent component, ref MoveEvent
if (component.Type == ThrusterType.Linear)
{
oldShuttleComponent.LinearThrust[oldDirection] -= component.Thrust;
oldShuttleComponent.BaseLinearThrust[oldDirection] -= component.BaseThrust;
DebugTools.Assert(oldShuttleComponent.LinearThrusters[oldDirection].Contains(uid));
oldShuttleComponent.LinearThrusters[oldDirection].Remove(uid);

shuttleComponent.LinearThrust[direction] += component.Thrust;
shuttleComponent.BaseLinearThrust[direction] += component.BaseThrust;
DebugTools.Assert(!shuttleComponent.LinearThrusters[direction].Contains(uid));
shuttleComponent.LinearThrusters[direction].Add(uid);
}
Expand Down Expand Up @@ -287,7 +286,6 @@ public void EnableThruster(EntityUid uid, ThrusterComponent component, Transform
var direction = (int) xform.LocalRotation.GetCardinalDir() / 2;

shuttleComponent.LinearThrust[direction] += component.Thrust;
shuttleComponent.BaseLinearThrust[direction] += component.BaseThrust;
DebugTools.Assert(!shuttleComponent.LinearThrusters[direction].Contains(uid));
shuttleComponent.LinearThrusters[direction].Add(uid);

Expand Down Expand Up @@ -391,7 +389,6 @@ public void DisableThruster(EntityUid uid, ThrusterComponent component, EntityUi
var direction = (int) angle.Value.GetCardinalDir() / 2;

shuttleComponent.LinearThrust[direction] -= component.Thrust;
shuttleComponent.BaseLinearThrust[direction] -= component.BaseThrust;
DebugTools.Assert(shuttleComponent.LinearThrusters[direction].Contains(uid));
shuttleComponent.LinearThrusters[direction].Remove(uid);
break;
Expand Down

0 comments on commit 1c3d520

Please sign in to comment.