# Conflicts: # Content.Server/Atmos/EntitySystems/FlammableSystem.cs # Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/GasArtifactComponent.cs # Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactGasTriggerComponent.cs # Content.Shared/Damage/Systems/StaminaSystem.cs # Content.Shared/Inventory/InventorySystem.Relay.cs # Resources/Locale/en-US/_strings/chat/ui/chat-window.ftl # Resources/Locale/en-US/_strings/damage/damage-popup-component.ftl # Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml # Resources/Prototypes/XenoArch/Effects/normal_effects.yml # Resources/Textures/Objects/Specific/Medical/hypospray.rsi/hypo.png # Resources/Textures/Objects/Specific/Medical/hypospray.rsi/meta.json # Resources/migration.yml
77 lines
2.4 KiB
C#
77 lines
2.4 KiB
C#
using Content.Shared.Access.Systems;
|
|
using Content.Shared.PDA;
|
|
using Content.Shared.Roles;
|
|
using Content.Shared.StatusIcon;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Access.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
|
public sealed partial class IdCardComponent : Component
|
|
{
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
// FIXME Friends
|
|
public string? FullName;
|
|
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
|
public LocId? JobTitle;
|
|
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
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); }
|
|
|
|
/// <summary>
|
|
/// The state of the job icon rsi.
|
|
/// </summary>
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public ProtoId<JobIconPrototype> JobIcon = "JobIconUnknown";
|
|
|
|
/// <summary>
|
|
/// Holds the job prototype when the ID card has no associated station record
|
|
/// </summary>
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public ProtoId<AccessLevelPrototype>? JobPrototype;
|
|
|
|
/// <summary>
|
|
/// The proto IDs of the departments associated with the job
|
|
/// </summary>
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public List<ProtoId<DepartmentPrototype>> JobDepartments = new();
|
|
|
|
// Sunrise-Start
|
|
[DataField("jobColor")]
|
|
[AutoNetworkedField]
|
|
public string? JobColor;
|
|
|
|
[DataField("radioBold")]
|
|
[AutoNetworkedField]
|
|
public bool? RadioBold;
|
|
// Sunrise-End
|
|
|
|
/// <summary>
|
|
/// Determines if accesses from this card should be logged by <see cref="AccessReaderComponent"/>
|
|
/// </summary>
|
|
[DataField]
|
|
public bool BypassLogging;
|
|
|
|
[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";
|
|
|
|
[DataField]
|
|
public bool CanMicrowave = true;
|
|
}
|