diff --git a/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs b/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs index 67ac1bf13c5d33..f0a4f96152aa6d 100644 --- a/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs +++ b/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs @@ -104,6 +104,12 @@ private void OnChangeStatus(Entity ent, ref Cri if (_idCard.TryFindIdCard(mob.Value, out var id) && id.Comp.FullName is {} fullName) officer = fullName; + (string, object)[] args; + if (reason != null) + args = new (string, object)[] { ("name", name), ("officer", officer), ("reason", reason) }; + else + args = new (string, object)[] { ("name", name), ("officer", officer) }; + // figure out which radio message to send depending on transition var statusString = (oldStatus, msg.Status) switch { @@ -118,9 +124,7 @@ private void OnChangeStatus(Entity ent, ref Cri // this is impossible _ => "not-wanted" }; - var message = Loc.GetString($"criminal-records-console-{statusString}", ("name", name), ("officer", officer), - reason != null ? ("reason", reason) : default!); - _radio.SendRadioMessage(ent, message, ent.Comp.SecurityChannel, ent); + _radio.SendRadioMessage(ent, Loc.GetString($"criminal-records-console-{statusString}", args), ent.Comp.SecurityChannel, ent); UpdateUserInterface(ent); }