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.Localization;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -51,10 +52,16 @@ namespace Content.Server.GameObjects.Components.Access
return;
}
var tempFullName = string.IsNullOrWhiteSpace(FullName) ? "Unknown" : FullName;
var tempJobTitle = string.IsNullOrWhiteSpace(JobTitle) ? "N/A" : JobTitle;
var jobSuffix = string.IsNullOrWhiteSpace(JobTitle) ? "" : $" ({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()