2023-09-08 18:16:05 -07:00
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2022-03-10 23:37:35 -06:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.UserInterface;
|
|
|
|
|
|
|
|
|
|
|
|
[RegisterComponent]
|
2023-09-08 18:16:05 -07:00
|
|
|
|
public sealed partial class IntrinsicUIComponent : Component
|
2022-03-10 23:37:35 -06:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// List of UIs and their actions that this entity has.
|
|
|
|
|
|
/// </summary>
|
2024-04-26 18:16:24 +10:00
|
|
|
|
[DataField("uis", required: true)] public Dictionary<Enum, IntrinsicUIEntry> UIs = new();
|
2022-03-10 23:37:35 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[DataDefinition]
|
2024-04-26 18:16:24 +10:00
|
|
|
|
public sealed partial class IntrinsicUIEntry
|
2022-03-10 23:37:35 -06:00
|
|
|
|
{
|
2023-09-08 18:16:05 -07:00
|
|
|
|
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
|
|
|
|
|
|
public string? ToggleAction;
|
2022-03-10 23:37:35 -06:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The action used for this BUI.
|
|
|
|
|
|
/// </summary>
|
2023-09-08 18:16:05 -07:00
|
|
|
|
[DataField("toggleActionEntity")]
|
|
|
|
|
|
public EntityUid? ToggleActionEntity = new();
|
2022-03-10 23:37:35 -06:00
|
|
|
|
}
|