From 01de0db5edf16664dabda68723b34f46c3c69e10 Mon Sep 17 00:00:00 2001 From: Paul Ritter Date: Tue, 24 Aug 2021 09:58:06 +0200 Subject: [PATCH] fixes some bugs with the shuttleconsole (#4517) * fixes some bugs with the shuttleconsole * Update Content.Server/Shuttles/ShuttleConsoleSystem.cs Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Co-authored-by: Paul Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> --- Content.Server/Shuttles/ShuttleConsoleSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/ShuttleConsoleSystem.cs index c3d76a9f4d..af7c725d72 100644 --- a/Content.Server/Shuttles/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/ShuttleConsoleSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Shuttles; using Content.Shared.Tag; using Robust.Shared.GameObjects; using Robust.Shared.Localization; +using Robust.Shared.Utility; namespace Content.Server.Shuttles { @@ -89,7 +90,7 @@ namespace Content.Server.Shuttles { RemovePilot(pilotComponent); - if (console != component) + if (console == component) { return; } @@ -160,7 +161,7 @@ namespace Content.Server.Shuttles public void ClearPilots(ShuttleConsoleComponent component) { - foreach (var pilot in component.SubscribedPilots) + while (component.SubscribedPilots.TryGetValue(0, out var pilot)) { RemovePilot(pilot); }