diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 0cefbbcfaa..d8cc822cbd 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -47,8 +47,8 @@ namespace Content.Client.Hands.Systems SubscribeLocalEvent(HandlePlayerAttached); SubscribeLocalEvent(HandlePlayerDetached); - SubscribeLocalEvent(HandleCompAdd); - SubscribeLocalEvent(HandleCompRemove); + SubscribeLocalEvent(OnHandsStartup); + SubscribeLocalEvent(OnHandsShutdown); SubscribeLocalEvent(HandleComponentState); SubscribeLocalEvent(OnVisualsChanged); @@ -399,13 +399,13 @@ namespace Content.Client.Hands.Systems OnPlayerHandsRemoved?.Invoke(); } - private void HandleCompAdd(EntityUid uid, HandsComponent component, ComponentAdd args) + private void OnHandsStartup(EntityUid uid, HandsComponent component, ComponentStartup args) { if (_playerManager.LocalPlayer?.ControlledEntity == uid) OnPlayerHandsAdded?.Invoke(component); } - private void HandleCompRemove(EntityUid uid, HandsComponent component, ComponentRemove args) + private void OnHandsShutdown(EntityUid uid, HandsComponent component, ComponentShutdown args) { if (_playerManager.LocalPlayer?.ControlledEntity == uid) OnPlayerHandsRemoved?.Invoke(); diff --git a/Content.Server/Shuttles/Components/ShuttleComponent.cs b/Content.Server/Shuttles/Components/ShuttleComponent.cs index f29a8bb220..25415636e0 100644 --- a/Content.Server/Shuttles/Components/ShuttleComponent.cs +++ b/Content.Server/Shuttles/Components/ShuttleComponent.cs @@ -29,7 +29,14 @@ namespace Content.Server.Shuttles.Components /// /// The thrusters contributing to each direction for impulse. /// - public readonly List[] LinearThrusters = new List[4]; + // No touchy + public readonly List[] LinearThrusters = new List[] + { + new(), + new(), + new(), + new(), + }; /// /// The thrusters contributing to the angular impulse of the shuttle. diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.cs index b99d916b67..46eb0fba80 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.cs @@ -54,7 +54,6 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem InitializeIFF(); InitializeImpact(); - SubscribeLocalEvent(OnShuttleAdd); SubscribeLocalEvent(OnShuttleStartup); SubscribeLocalEvent(OnShuttleShutdown); @@ -82,15 +81,6 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem CleanupHyperspace(); } - private void OnShuttleAdd(EntityUid uid, ShuttleComponent component, ComponentAdd args) - { - // Easier than doing it in the comp and they don't have constructors. - for (var i = 0; i < component.LinearThrusters.Length; i++) - { - component.LinearThrusters[i] = new List(); - } - } - private void OnGridFixtureChange(EntityUid uid, FixturesComponent manager, GridFixtureChangeEvent args) { foreach (var fixture in args.NewFixtures)