mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 04:30:57 +01:00
* Refactor OnIFFShow and OnInitIFFConsole by extracting AddAllSupportedIFFFlags method. Fix possible addition of unallowed flags. Fix posible addition of unallowed flags in OnInitIFFConsole by performing AllowedFlags check in the extracted function. * Add documentation to HideOnInit * Update IFFConsoleComponent.cs --------- Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
21 lines
646 B
C#
21 lines
646 B
C#
using Content.Server.Shuttles.Systems;
|
|
using Content.Shared.Shuttles.Components;
|
|
|
|
namespace Content.Server.Shuttles.Components;
|
|
|
|
[RegisterComponent, Access(typeof(ShuttleSystem))]
|
|
public sealed partial class IFFConsoleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Flags that this console is allowed to set.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("allowedFlags")]
|
|
public IFFFlags AllowedFlags = IFFFlags.HideLabel;
|
|
|
|
/// <summary>
|
|
/// If true, automatically applies all supported IFF flags to the console's grid on MapInitEvent.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool HideOnInit = false;
|
|
}
|