+++ /dev/null
-using Content.Server.Access.Systems;
-
-namespace Content.Server.Access.Components;
-
-[RegisterComponent, Access(typeof(IdExaminableSystem))]
-public sealed partial class IdExaminableComponent : Component
-{
-}
using Content.Server.Chemistry.ReactionEffects;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Forensics;
-using Content.Server.HealthExaminable;
using Content.Server.Popups;
using Content.Shared.Alert;
using Content.Shared.Chemistry.Components;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Drunk;
using Content.Shared.FixedPoint;
+using Content.Shared.HealthExaminable;
using Content.Shared.Mobs.Systems;
using Content.Shared.Popups;
using Content.Shared.Rejuvenate;
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
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";
}
--- /dev/null
+using Content.Shared.Access.Systems;
+
+namespace Content.Shared.Access.Components;
+
+[RegisterComponent, Access(typeof(IdExaminableSystem))]
+public sealed partial class IdExaminableComponent : Component;
-using Content.Server.Access.Components;
using Content.Shared.Access.Components;
using Content.Shared.Examine;
using Content.Shared.Inventory;
using Content.Shared.Verbs;
using Robust.Shared.Utility;
-namespace Content.Server.Access.Systems;
+namespace Content.Shared.Access.Systems;
public sealed class IdExaminableSystem : EntitySystem
{
private void OnGetExamineVerbs(EntityUid uid, IdExaminableComponent component, GetVerbsEvent<ExamineVerb> args)
{
var detailsRange = _examineSystem.IsInDetailsRange(args.User, uid);
- var info = GetInfo(uid) ?? Loc.GetString("id-examinable-component-verb-no-id");
+ var info = GetMessage(uid);
var verb = new ExamineVerb()
{
args.Verbs.Add(verb);
}
- private string? GetInfo(EntityUid uid)
+ public string GetMessage(EntityUid uid)
+ {
+ return GetInfo(uid) ?? Loc.GetString("id-examinable-component-verb-no-id");
+ }
+
+ public string? GetInfo(EntityUid uid)
{
if (_inventorySystem.TryGetSlotEntity(uid, "id", out var idUid))
{
var jobSuffix = string.IsNullOrWhiteSpace(id.JobTitle) ? string.Empty : $" ({id.JobTitle})";
var val = string.IsNullOrWhiteSpace(id.FullName)
- ? Loc.GetString("access-id-card-component-owner-name-job-title-text",
+ ? Loc.GetString(id.NameLocId,
("jobSuffix", jobSuffix))
- : Loc.GetString("access-id-card-component-owner-full-name-job-title-text",
+ : Loc.GetString(id.FullNameLocId,
("fullName", id.FullName),
("jobSuffix", jobSuffix));
var jobSuffix = string.IsNullOrWhiteSpace(id.JobTitle) ? string.Empty : $" ({id.JobTitle})";
var val = string.IsNullOrWhiteSpace(id.FullName)
- ? Loc.GetString("access-id-card-component-owner-name-job-title-text",
+ ? Loc.GetString(id.NameLocId,
("jobSuffix", jobSuffix))
- : Loc.GetString("access-id-card-component-owner-full-name-job-title-text",
+ : Loc.GetString(id.FullNameLocId,
("fullName", id.FullName),
("jobSuffix", jobSuffix));
_metaSystem.SetEntityName(uid, val);
using Content.Shared.Damage.Prototypes;
using Content.Shared.FixedPoint;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
+using Robust.Shared.Prototypes;
-namespace Content.Server.HealthExaminable;
+namespace Content.Shared.HealthExaminable;
[RegisterComponent, Access(typeof(HealthExaminableSystem))]
public sealed partial class HealthExaminableComponent : Component
public List<FixedPoint2> Thresholds = new()
{ FixedPoint2.New(10), FixedPoint2.New(25), FixedPoint2.New(50), FixedPoint2.New(75) };
- [DataField("examinableTypes", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<DamageTypePrototype>))]
- public HashSet<string> ExaminableTypes = default!;
+ [DataField(required: true)]
+ public HashSet<ProtoId<DamageTypePrototype>> ExaminableTypes = default!;
/// <summary>
/// Health examine text is automatically generated through creating loc string IDs, in the form:
/// `health-examine-[prefix]-[type]-[threshold]`
/// This part determines the prefix.
/// </summary>
- [DataField("locPrefix")]
+ [DataField]
public string LocPrefix = "carbon";
}
using Content.Shared.Verbs;
using Robust.Shared.Utility;
-namespace Content.Server.HealthExaminable;
+namespace Content.Shared.HealthExaminable;
public sealed class HealthExaminableSystem : EntitySystem
{
args.Verbs.Add(verb);
}
- private FormattedMessage CreateMarkup(EntityUid uid, HealthExaminableComponent component, DamageableComponent damage)
+ public FormattedMessage CreateMarkup(EntityUid uid, HealthExaminableComponent component, DamageableComponent damage)
{
var msg = new FormattedMessage();