Files
tbd-station-14/Content.Shared/Security/Components/GenpopLockerComponent.cs
Nemanja dc9844edd1 Genpop Closets & IDs (#36392)
* Genpop IDs and Lockers

* placeholder generation, no ui yet.

* UI

* Fix time offset

* fix meta.jsons

* big speller

* Scarkyo review

* Add turnstile prototypes

* make IDs recyclable

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
2025-04-24 16:32:11 +02:00

48 lines
1.2 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Security.Components;
/// <summary>
/// This is used for a locker that automatically sets up and handles a <see cref="GenpopIdCardComponent"/>
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class GenpopLockerComponent : Component
{
public const int MaxCrimeLength = 48;
/// <summary>
/// The <see cref="GenpopIdCardComponent"/> that this locker is currently associated with.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? LinkedId;
/// <summary>
/// The Prototype spawned.
/// </summary>
[DataField]
public EntProtoId<GenpopIdCardComponent> IdCardProto = "PrisonerIDCard";
}
[Serializable, NetSerializable]
public sealed class GenpopLockerIdConfiguredMessage : BoundUserInterfaceMessage
{
public string Name;
public float Sentence;
public string Crime;
public GenpopLockerIdConfiguredMessage(string name, float sentence, string crime)
{
Name = name;
Sentence = sentence;
Crime = crime;
}
}
[Serializable, NetSerializable]
public enum GenpopLockerUiKey : byte
{
Key
}