2021-12-16 23:42:02 +13:00
|
|
|
using Content.Shared.Access.Systems;
|
|
|
|
|
using Content.Shared.PDA;
|
2024-08-11 22:57:49 -05:00
|
|
|
using Content.Shared.Roles;
|
2023-07-29 10:25:27 +02:00
|
|
|
using Content.Shared.StatusIcon;
|
2022-07-10 18:36:53 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2024-08-09 08:14:07 +02:00
|
|
|
using Robust.Shared.Prototypes;
|
2019-09-01 22:57:22 +02:00
|
|
|
|
2023-12-09 23:38:50 -06:00
|
|
|
namespace Content.Shared.Access.Components;
|
|
|
|
|
|
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
|
|
|
[AutoGenerateComponentState]
|
|
|
|
|
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
|
|
|
|
public sealed partial class IdCardComponent : Component
|
2019-09-01 22:57:22 +02:00
|
|
|
{
|
2024-08-09 08:14:07 +02:00
|
|
|
[DataField]
|
2023-12-09 23:38:50 -06:00
|
|
|
[AutoNetworkedField]
|
|
|
|
|
// FIXME Friends
|
|
|
|
|
public string? FullName;
|
2019-09-06 08:12:44 +02:00
|
|
|
|
2024-08-09 08:14:07 +02:00
|
|
|
[DataField]
|
2023-12-09 23:38:50 -06:00
|
|
|
[AutoNetworkedField]
|
2024-08-09 08:14:07 +02:00
|
|
|
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
2024-10-09 18:05:36 +03:00
|
|
|
public LocId? JobTitle;
|
|
|
|
|
|
|
|
|
|
private string? _jobTitle;
|
|
|
|
|
|
|
|
|
|
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWriteExecute)]
|
|
|
|
|
public string? LocalizedJobTitle { set => _jobTitle = value; get => _jobTitle ?? Loc.GetString(JobTitle ?? string.Empty); }
|
2023-07-29 10:25:27 +02:00
|
|
|
|
2023-12-09 23:38:50 -06:00
|
|
|
/// <summary>
|
|
|
|
|
/// The state of the job icon rsi.
|
|
|
|
|
/// </summary>
|
2024-08-09 08:14:07 +02:00
|
|
|
[DataField]
|
2023-12-09 23:38:50 -06:00
|
|
|
[AutoNetworkedField]
|
2024-08-09 08:14:07 +02:00
|
|
|
public ProtoId<JobIconPrototype> JobIcon = "JobIconUnknown";
|
2023-07-29 10:25:27 +02:00
|
|
|
|
2023-12-09 23:38:50 -06:00
|
|
|
/// <summary>
|
2024-08-11 22:57:49 -05:00
|
|
|
/// The proto IDs of the departments associated with the job
|
2023-12-09 23:38:50 -06:00
|
|
|
/// </summary>
|
2024-08-09 08:14:07 +02:00
|
|
|
[DataField]
|
2023-12-09 23:38:50 -06:00
|
|
|
[AutoNetworkedField]
|
2024-08-11 22:57:49 -05:00
|
|
|
public List<ProtoId<DepartmentPrototype>> JobDepartments = new();
|
2023-12-26 16:24:53 -06:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Determines if accesses from this card should be logged by <see cref="AccessReaderComponent"/>
|
|
|
|
|
/// </summary>
|
2024-08-09 08:14:07 +02:00
|
|
|
[DataField]
|
2023-12-26 16:24:53 -06:00
|
|
|
public bool BypassLogging;
|
2024-05-09 18:26:39 -07:00
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public LocId NameLocId = "access-id-card-component-owner-name-job-title-text";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public LocId FullNameLocId = "access-id-card-component-owner-full-name-job-title-text";
|
2024-05-17 01:48:22 -07:00
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public bool CanMicrowave = true;
|
2019-09-01 22:57:22 +02:00
|
|
|
}
|