Criminal record hud icons (#25192)
* Security hud shows icon based on criminal record status * Criminal status now linked to name instead of identity * parole loc * Test fix * review changes * Check station records instead of storing names on criminal record consoles. * cleanup * more cleanup * review changes * change outdated comments * rename * review changes * remove event subscription * replaced event with trycomp * default value
This commit is contained in:
@@ -219,16 +219,16 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
|
||||
|
||||
private void SetStatus(SecurityStatus status)
|
||||
{
|
||||
if (status == SecurityStatus.Wanted)
|
||||
if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected)
|
||||
{
|
||||
GetWantedReason();
|
||||
GetReason(status);
|
||||
return;
|
||||
}
|
||||
|
||||
OnStatusSelected?.Invoke(status);
|
||||
}
|
||||
|
||||
private void GetWantedReason()
|
||||
private void GetReason(SecurityStatus status)
|
||||
{
|
||||
if (_reasonDialog != null)
|
||||
{
|
||||
@@ -237,7 +237,7 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
|
||||
}
|
||||
|
||||
var field = "reason";
|
||||
var title = Loc.GetString("criminal-records-status-wanted");
|
||||
var title = Loc.GetString("criminal-records-status-" + status.ToString().ToLower());
|
||||
var placeholders = _proto.Index<DatasetPrototype>(ReasonPlaceholders);
|
||||
var placeholder = Loc.GetString("criminal-records-console-reason-placeholder", ("placeholder", _random.Pick(placeholders.Values))); // just funny it doesn't actually get used
|
||||
var prompt = Loc.GetString("criminal-records-console-reason");
|
||||
@@ -251,7 +251,7 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
|
||||
if (reason.Length < 1 || reason.Length > _maxLength)
|
||||
return;
|
||||
|
||||
OnDialogConfirmed?.Invoke(SecurityStatus.Wanted, reason);
|
||||
OnDialogConfirmed?.Invoke(status, reason);
|
||||
};
|
||||
|
||||
_reasonDialog.OnClose += () => { _reasonDialog = null; };
|
||||
|
||||
Reference in New Issue
Block a user