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:
@@ -9,6 +9,7 @@ using Content.Shared.Shuttles;
|
|||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Shuttles
|
namespace Content.Server.Shuttles
|
||||||
{
|
{
|
||||||
@@ -89,7 +90,7 @@ namespace Content.Server.Shuttles
|
|||||||
{
|
{
|
||||||
RemovePilot(pilotComponent);
|
RemovePilot(pilotComponent);
|
||||||
|
|
||||||
if (console != component)
|
if (console == component)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -160,7 +161,7 @@ namespace Content.Server.Shuttles
|
|||||||
|
|
||||||
public void ClearPilots(ShuttleConsoleComponent component)
|
public void ClearPilots(ShuttleConsoleComponent component)
|
||||||
{
|
{
|
||||||
foreach (var pilot in component.SubscribedPilots)
|
while (component.SubscribedPilots.TryGetValue(0, out var pilot))
|
||||||
{
|
{
|
||||||
RemovePilot(pilot);
|
RemovePilot(pilot);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user