Improve ID card names to be better.

And more inline with SS13.
This commit is contained in:
Pieter-Jan Briers
2020-01-19 18:27:16 +01:00
parent 1bd17f73b1
commit edf280e2df

View File

@@ -1,4 +1,5 @@
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
@@ -51,10 +52,16 @@ namespace Content.Server.GameObjects.Components.Access
return; return;
} }
var tempFullName = string.IsNullOrWhiteSpace(FullName) ? "Unknown" : FullName; var jobSuffix = string.IsNullOrWhiteSpace(JobTitle) ? "" : $" ({JobTitle})";
var tempJobTitle = string.IsNullOrWhiteSpace(JobTitle) ? "N/A" : JobTitle;
Owner.Name = $"{_ownerOriginalName} ({tempFullName}, {tempJobTitle})"; if (string.IsNullOrWhiteSpace(FullName))
{
Owner.Name = Loc.GetString("{0}{1}", _ownerOriginalName, jobSuffix);
}
else
{
Owner.Name = Loc.GetString("{0}'s ID card{1}", FullName, jobSuffix);
}
} }
public override void Initialize() public override void Initialize()