* PDA update and fix * fix alert level * Fix color level * Maybe this will look better * PDA update and fix * fix alert level * Fix color level * Maybe this will look better * Now threat color is taken in the same way as for emergency lamps * Minor improvements * Fix alert level string * AlertLevelChangedEvent for all PDAs * StationAlert is also stored in PDAComponent * Removed IdAccessLevels * Removed Access from PDAMenu.xaml.cs and Draw time real-time * AlertLevel updated from AlertLevelChangedEvent * Removed garbage * Removed garbage from PDAUpdateState.cs * Change comp-pda-ui-station-time * revert rename PDAOwnerInfo to PdaOwnerInfo * remove not use short names jobs * "ftl var should be lowercase" * "ftl var should be lowercase" again * transfer StationAlert to PDAIdInfoText * transfer StationAlert to PDAIdInfoText * Line breaks of parameter/argument lists conventions * not randomly inline property attributes * no broadcast AlertLevelChangedEvent * fix cctualOwnerName * GridModifiedEvent never called * add alert-level-unknown-instructions * UpdateAlertLevel for latejoin * Add alert-level-unknown * Revert "GridModifiedEvent never called" This reverts commit fa7d1620 * remove garbage and fix quite long
42 lines
1.5 KiB
C#
42 lines
1.5 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 class PDAComponent : Component
|
|
{
|
|
public const string PDAIdSlotId = "PDA-id";
|
|
public const string PDAPenSlotId = "PDA-pen";
|
|
|
|
/// <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();
|
|
|
|
// 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 IdCardComponent? ContainedID;
|
|
[ViewVariables] public bool FlashlightOn;
|
|
|
|
[ViewVariables] public string? OwnerName;
|
|
[ViewVariables] public string? StationName;
|
|
[ViewVariables] public string? StationAlertLevel;
|
|
[ViewVariables] public Color StationAlertColor = Color.White;
|
|
}
|
|
}
|