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>
This commit is contained in:
Nemanja
2025-04-24 10:32:11 -04:00
committed by GitHub
parent 896f73c59d
commit dc9844edd1
37 changed files with 1403 additions and 580 deletions

View File

@@ -0,0 +1,47 @@
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
}