Skip to content

Commit

Permalink
Ладно вот реальни решение
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekins3366 committed Aug 17, 2024
1 parent 437ba7f commit 8ad955c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Content.Server/Shuttles/Systems/ShuttleSystem.IFF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Events;
using Content.Shared.Tiles;

namespace Content.Server.Shuttles.Systems;

Expand All @@ -22,14 +23,14 @@ private void OnIFFShow(EntityUid uid, IFFConsoleComponent component, IFFShowIFFM
return;
}

/// if (!args.Show)
/// {
/// AddIFFFlag(xform.GridUid.Value, IFFFlags.HideLabel);
/// }
/// else
/// {
/// RemoveIFFFlag(xform.GridUid.Value, IFFFlags.HideLabel);
/// }
if (!args.Show)
{
AddIFFFlag(xform.GridUid.Value, IFFFlags.HideLabel);
}
else
{
RemoveIFFFlag(xform.GridUid.Value, IFFFlags.HideLabel);
}
}

private void OnIFFShowVessel(EntityUid uid, IFFConsoleComponent component, IFFShowVesselMessage args)
Expand All @@ -40,6 +41,11 @@ private void OnIFFShowVessel(EntityUid uid, IFFConsoleComponent component, IFFSh
return;
}

if (HasComp<ProtectedGridComponent>(xform.GridUid.Value))
{
return;
}

if (!args.Show)
{
AddIFFFlag(xform.GridUid.Value, IFFFlags.Hide);
Expand Down

0 comments on commit 8ad955c

Please sign in to comment.