2021-11-20 18:26:01 +13:00
|
|
|
using Robust.Shared.Prototypes;
|
2023-02-06 15:53:24 -04:00
|
|
|
using Robust.Shared.GameStates;
|
2023-05-17 23:35:40 +03:00
|
|
|
using Content.Shared.Access.Components;
|
|
|
|
|
using Content.Shared.Containers.ItemSlots;
|
2021-11-20 18:26:01 +13:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-06-03 11:46:59 +02:00
|
|
|
|
2021-12-16 23:42:02 +13:00
|
|
|
namespace Content.Shared.PDA
|
2020-05-28 06:22:47 -05:00
|
|
|
{
|
2023-02-06 15:53:24 -04:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class PdaComponent : Component
|
2020-05-28 06:22:47 -05:00
|
|
|
{
|
2023-06-15 03:44:28 +02:00
|
|
|
public const string PdaIdSlotId = "PDA-id";
|
|
|
|
|
public const string PdaPenSlotId = "PDA-pen";
|
2024-01-04 07:56:14 -05:00
|
|
|
public const string PdaPaiSlotId = "PDA-pai";
|
2022-03-28 17:03:03 +13:00
|
|
|
|
2023-02-05 10:34:54 -08:00
|
|
|
/// <summary>
|
|
|
|
|
/// The base PDA sprite state, eg. "pda", "pda-clown"
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("state")]
|
|
|
|
|
public string? State;
|
|
|
|
|
|
2021-11-20 18:26:01 +13:00
|
|
|
[DataField("idSlot")]
|
|
|
|
|
public ItemSlot IdSlot = new();
|
2021-10-06 08:55:45 +11:00
|
|
|
|
|
|
|
|
[DataField("penSlot")]
|
2021-11-20 18:26:01 +13:00
|
|
|
public ItemSlot PenSlot = new();
|
2024-01-04 07:56:14 -05:00
|
|
|
[DataField("paiSlot")]
|
|
|
|
|
public ItemSlot PaiSlot = new();
|
2020-11-08 13:43:13 +01:00
|
|
|
|
2021-11-20 18:26:01 +13:00
|
|
|
// Really this should just be using ItemSlot.StartingItem. However, seeing as we have so many different starting
|
|
|
|
|
// PDA's and no nice way to inherit the other fields from the ItemSlot data definition, this makes the yaml much
|
|
|
|
|
// nicer to read.
|
2021-12-30 22:56:10 +01:00
|
|
|
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2021-11-20 18:26:01 +13:00
|
|
|
public string? IdCard;
|
2020-11-08 13:43:13 +01:00
|
|
|
|
2023-07-22 21:19:51 -07:00
|
|
|
[ViewVariables] public EntityUid? ContainedId;
|
2021-10-03 07:05:52 +03:00
|
|
|
[ViewVariables] public bool FlashlightOn;
|
2020-11-08 13:43:13 +01:00
|
|
|
|
2023-11-19 15:17:53 -05:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerName;
|
2024-09-15 01:55:03 +00:00
|
|
|
// The Entity that "owns" the PDA, usually a player's character.
|
|
|
|
|
// This is useful when we are doing stuff like renaming a player and want to find their PDA to change the name
|
|
|
|
|
// as well.
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)] public EntityUid? PdaOwner;
|
2022-07-23 18:58:28 -07:00
|
|
|
[ViewVariables] public string? StationName;
|
2023-05-17 23:35:40 +03:00
|
|
|
[ViewVariables] public string? StationAlertLevel;
|
|
|
|
|
[ViewVariables] public Color StationAlertColor = Color.White;
|
2020-05-28 06:22:47 -05:00
|
|
|
}
|
|
|
|
|
}
|