Allow ownerless ids to show in pda (#3693)
* Allow ownerless ids to show in pda * use new localization, and null coalesce * Adjust localization naming
This commit is contained in:
@@ -102,23 +102,23 @@ namespace Content.Client.GameObjects.Components.PDA
|
|||||||
|
|
||||||
if (msg.PDAOwnerInfo.ActualOwnerName != null)
|
if (msg.PDAOwnerInfo.ActualOwnerName != null)
|
||||||
{
|
{
|
||||||
_menu.PDAOwnerLabel.SetMarkup(Loc.GetString("Owner: [color=white]{0}[/color]",
|
_menu.PDAOwnerLabel.SetMarkup(Loc.GetString("comp-pda-ui-owner",
|
||||||
msg.PDAOwnerInfo.ActualOwnerName));
|
("ActualOwnerName", msg.PDAOwnerInfo.ActualOwnerName)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.PDAOwnerInfo.JobTitle == null || msg.PDAOwnerInfo.IdOwner == null)
|
|
||||||
|
if (msg.PDAOwnerInfo.IdOwner != null || msg.PDAOwnerInfo.JobTitle != null)
|
||||||
{
|
{
|
||||||
_menu.IDInfoLabel.SetMarkup(Loc.GetString("ID:"));
|
_menu.IDInfoLabel.SetMarkup(Loc.GetString("comp-pda-ui",
|
||||||
|
("Owner",msg.PDAOwnerInfo.IdOwner ?? "Unknown"),
|
||||||
|
("JobTitle",msg.PDAOwnerInfo.JobTitle ?? "Unassigned")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_menu.IDInfoLabel.SetMarkup(Loc.GetString(
|
_menu.IDInfoLabel.SetMarkup(Loc.GetString("comp-pda-ui-blank"));
|
||||||
"ID: [color=white]{0}[/color], [color=yellow]{1}[/color]",
|
|
||||||
msg.PDAOwnerInfo.IdOwner,
|
|
||||||
msg.PDAOwnerInfo.JobTitle));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_menu.EjectIDButton.Visible = msg.PDAOwnerInfo.IdOwner != null;
|
_menu.EjectIDButton.Visible = msg.PDAOwnerInfo.IdOwner != null || msg.PDAOwnerInfo.JobTitle != null;
|
||||||
_menu.EjectPenButton.Visible = msg.HasPen;
|
_menu.EjectPenButton.Visible = msg.HasPen;
|
||||||
|
|
||||||
if (msg.Account != null)
|
if (msg.Account != null)
|
||||||
|
|||||||
11
Resources/Locale/en-US/components/pda-component.ftl
Normal file
11
Resources/Locale/en-US/components/pda-component.ftl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
### UI
|
||||||
|
|
||||||
|
# For the PDA screen
|
||||||
|
comp-pda-ui = ID: [color=white]{$Owner}[/color], [color=yellow]{$JobTitle}[/color]
|
||||||
|
|
||||||
|
comp-pda-ui-blank = ID:
|
||||||
|
|
||||||
|
comp-pda-ui-owner = Owner: [color=white]{$ActualOwnerName}[/color]
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user