Files
tbd-station-14/Content.Shared/UserInterface/ActivatableUIComponent.cs
metalgearsloth afd0618a60 Station AI (#30944)
* Station AI overlay

* implement

* Bunch of ports

* Fix a heap of bugs and basic scouting

* helldivers

* Shuffle interactions a bit

* navmap stuff

* Revert "navmap stuff"

This reverts commit d1f89dd4be83233e22cf5dd062b2581f3c6da062.

* AI wires implemented

* Fix examines

* Optimise the overlay significantly

* Back to old static

* BUI radial working

* lots of work

* Saving work

* thanks fork

* alright

* pc

* AI upload console

* AI upload

* stuff

* Fix copy-paste shitcode

* AI actions

* navmap work

* Fixes

* first impressions

* a

* reh

* Revert "navmap work"

This reverts commit 6f63fea6e9245e189f368f97be3e32e9b210580e.

# Conflicts:
#	Content.Client/Silicons/StationAi/StationAiOverlay.cs

* OD

* radar

* weh

* Fix examines

* scoop mine eyes

* fixes

* reh

* Optimise

* Final round of optimisations

* Fixes

* fixes
2024-08-28 10:57:12 +10:00

78 lines
2.8 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]
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]
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]
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;
}
}