# Conflicts: # Content.Client/Lobby/UI/Loadouts/LoadoutWindow.xaml.cs # Content.Server/Connection/ConnectionManager.cs # Content.Server/GameTicking/GameTicker.Spawning.cs # Content.Server/Shuttles/Systems/ArrivalsSystem.cs # Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs # Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs # Content.Server/Station/Systems/StationSpawningSystem.cs # Content.Shared/Chat/SharedChatSystem.cs # Content.Shared/UserInterface/ActivatableUIComponent.cs # Resources/Prototypes/Datasets/Names/ai.yml # Resources/Prototypes/Datasets/adjectives.yml # Resources/Prototypes/Datasets/verbs.yml # Resources/Prototypes/Entities/Clothing/Shoes/boots.yml # Resources/Prototypes/Entities/Clothing/Shoes/specific.yml # Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml # Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml # Resources/Prototypes/Entities/Stations/base.yml # Resources/Prototypes/Entities/Structures/Machines/lathe.yml # Resources/Prototypes/Maps/bagel.yml # Resources/Prototypes/Roles/Jobs/Science/borg.yml # Resources/Prototypes/Roles/Jobs/Security/security_cadet.yml # Resources/Textures/Clothing/Head/Helmets/light_riot.rsi/equipped-HELMET.png # Resources/Textures/Clothing/Head/Helmets/light_riot.rsi/icon.png # Resources/Textures/Clothing/Head/Helmets/light_riot.rsi/meta.json # Resources/Textures/Interface/Misc/job_icons.rsi/meta.json # Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json # Resources/Textures/Structures/Wallmounts/barsign.rsi/officerbeersky.png # Resources/Textures/Structures/Wallmounts/signs.rsi/anomaly.png # Resources/Textures/Structures/Wallmounts/signs.rsi/meta.json # SpaceStation14.sln
77 lines
2.9 KiB
C#
77 lines
2.9 KiB
C#
using Content.Shared.Whitelist;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
|
|
|
namespace Content.Shared.UserInterface
|
|
{
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class ActivatableUIComponent : Component
|
|
{
|
|
[DataField(required: true, customTypeSerializer: typeof(EnumSerializer))]
|
|
public Enum? Key;
|
|
|
|
/// <summary>
|
|
/// Whether the item must be held in one of the user's hands to work.
|
|
/// This is ignored unless <see cref="RequiresComplex"/> is true.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField, AutoNetworkedField] // Sunrise-Edit
|
|
public bool InHandsOnly;
|
|
|
|
[DataField]
|
|
public bool SingleUser;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool AdminOnly;
|
|
|
|
[DataField]
|
|
public LocId VerbText = "ui-verb-toggle-open";
|
|
|
|
/// <summary>
|
|
/// Whether you need to be able to do complex interactions to operate this UI.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This should probably be true for most machines & computers, but there will still be UIs that represent a
|
|
/// more generic interaction / configuration that might not require complex.
|
|
/// </remarks>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField, AutoNetworkedField] // Sunrise-Edit]
|
|
public bool RequiresComplex = true;
|
|
|
|
/// <summary>
|
|
/// Entities that are required to open this UI.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public EntityWhitelist? RequiredItems;
|
|
|
|
/// <summary>
|
|
/// If true, then this UI can only be opened via verbs. I.e., normal interactions/activations will not open
|
|
/// the UI.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public bool VerbOnly;
|
|
|
|
/// <summary>
|
|
/// Whether spectators (non-admin ghosts) should be allowed to view this UI.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField]
|
|
public bool BlockSpectators;
|
|
|
|
/// <summary>
|
|
/// Whether the item must be in the user's currently selected/active hand.
|
|
/// This is ignored unless <see cref="InHandsOnly"/> is true.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField, AutoNetworkedField] // Sunrise-Edit
|
|
public bool RequireActiveHand = true;
|
|
|
|
/// <summary>
|
|
/// The client channel currently using the object, or null if there's none/not single user.
|
|
/// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? CurrentSingleUser;
|
|
}
|
|
}
|