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 <ritter.paul1+git@googlemail.com>
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
Paul Ritter
2021-08-24 09:58:06 +02:00
committed by GitHub
parent 5e012628c1
commit 01de0db5ed

View File

@@ -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);
}