2020-06-03 11:46:59 +02:00
|
|
|
using System;
|
2020-05-28 06:22:47 -05:00
|
|
|
using System.Collections.Generic;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Access.Components;
|
2021-11-20 18:26:01 +13:00
|
|
|
using Content.Shared.Containers.ItemSlots;
|
2020-05-28 06:22:47 -05:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-11-20 18:26:01 +13:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-11-20 18:26:01 +13:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-06-03 11:46:59 +02:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.PDA
|
2020-05-28 06:22:47 -05:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2021-10-22 05:31:07 +03:00
|
|
|
public class PDAComponent : Component
|
2020-05-28 06:22:47 -05:00
|
|
|
{
|
2021-10-03 07:05:52 +03:00
|
|
|
public override string Name => "PDA";
|
2020-06-03 11:46:59 +02:00
|
|
|
|
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();
|
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.
|
|
|
|
|
[DataField("idCard", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string? IdCard;
|
2020-11-08 13:43:13 +01:00
|
|
|
|
2021-10-03 07:05:52 +03:00
|
|
|
[ViewVariables] public IdCardComponent? ContainedID;
|
|
|
|
|
[ViewVariables] public bool FlashlightOn;
|
2020-11-08 13:43:13 +01:00
|
|
|
|
2021-10-03 07:05:52 +03:00
|
|
|
[ViewVariables] public string? OwnerName;
|
2020-05-28 06:22:47 -05:00
|
|
|
}
|
|
|
|
|
}
|