Files
wwdpublic/Content.Shared/PDA/PdaComponent.cs
Kutosss d290f7a55e [ADD] "Паспорт в ПДА" (#423)
* [ADD] "Паспорт в ПДА"

* Apply suggestions from code reviegfdw

gfd

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Create pda-component.ftl

* Create pda-component.ftl

* Update pda-component.ftl

* Update pda-component.ftl

* Apply suggestions from code review

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Update pda.yml

* фикс йопт

---------

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
2025-04-07 21:34:56 +03:00

52 lines
1.8 KiB
C#

using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
using Content.Shared.Access.Components;
using Content.Shared.Containers.ItemSlots;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.PDA
{
[RegisterComponent, NetworkedComponent]
public sealed partial class PdaComponent : Component
{
public const string PdaIdSlotId = "PDA-id";
public const string PdaPenSlotId = "PDA-pen";
public const string PdaPaiSlotId = "PDA-pai";
public const string PdaPassportSlotId = "PDA-passport"; // WD EDIT
/// <summary>
/// The base PDA sprite state, eg. "pda", "pda-clown"
/// </summary>
[DataField("state")]
public string? State;
[DataField("idSlot")]
public ItemSlot IdSlot = new();
[DataField("penSlot")]
public ItemSlot PenSlot = new();
[DataField("paiSlot")]
public ItemSlot PaiSlot = new();
// WD EDIT START
[DataField("passportSlot")]
public ItemSlot PassportSlot = new();
// WD EDIT END
// 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.
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? IdCard;
[ViewVariables] public EntityUid? ContainedId;
[ViewVariables] public bool FlashlightOn;
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerName;
[ViewVariables] public string? StationName;
[ViewVariables] public string? StationAlertLevel;
[ViewVariables] public Color StationAlertColor = Color.White;
}
}