]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Station Records Computer now shows fingerprints (#14524)
authorfaint <46868845+ficcialfaint@users.noreply.github.com>
Tue, 14 Mar 2023 02:55:56 +0000 (05:55 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 02:55:56 +0000 (19:55 -0700)
* station records fingerprints

* Add UI + Fixes

* now itll display N/A if a mob doesnt have a fingerprint

* ? - 0

* f8

* N/A is a fluent string now

* remove locale string duplicating

* no whitespace

Content.Client/StationRecords/GeneralStationRecordConsoleWindow.xaml.cs
Content.Server/StationRecords/Systems/StationRecordsSystem.cs
Content.Shared/StationRecords/GeneralStationRecord.cs
Resources/Locale/en-US/station-records/general-station-records.ftl

index 8172651a4c0931cac89f7ebfb273d26cacdeeca6..91b3c3d8b708fe94af9476ad406cf85d9d9ee080 100644 (file)
@@ -115,6 +115,10 @@ public sealed partial class GeneralStationRecordConsoleWindow : DefaultWindow
             new Label()
             {
                 Text = Loc.GetString("general-station-record-console-record-gender", ("gender", record.Gender.ToString()))
+            },
+            new Label()
+            {
+                Text = Loc.GetString("general-station-record-console-record-fingerprint", ("fingerprint", record.Fingerprint is null ? Loc.GetString("generic-not-available-shorthand") : record.Fingerprint))
             }
         };
 
index 50f62d323ba30e0612069ce01ab20936544c551c..8ab2ca21295f09ed2128f0edffd3d2ef2c5db9a1 100644 (file)
@@ -3,7 +3,9 @@ using System.Linq;
 using Content.Server.GameTicking;
 using Content.Server.Station.Systems;
 using Content.Shared.Access.Components;
+using Content.Server.Forensics;
 using Content.Shared.Inventory;
+using Content.Shared.Nuke;
 using Content.Shared.PDA;
 using Content.Shared.Preferences;
 using Content.Shared.Roles;
@@ -71,7 +73,9 @@ public sealed class StationRecordsSystem : EntitySystem
             return;
         }
 
-        CreateGeneralRecord(station, idUid.Value, profile.Name, profile.Age, profile.Species, profile.Gender, jobId, profile, records);
+        TryComp<FingerprintComponent>(player, out var fingerprintComponent);
+
+        CreateGeneralRecord(station, idUid.Value, profile.Name, profile.Age, profile.Species, profile.Gender, jobId, fingerprintComponent?.Fingerprint, profile, records);
     }
 
 
@@ -99,7 +103,7 @@ public sealed class StationRecordsSystem : EntitySystem
     ///     Optional - other systems should anticipate this.
     /// </param>
     /// <param name="records">Station records component.</param>
-    public void CreateGeneralRecord(EntityUid station, EntityUid? idUid, string name, int age, string species, Gender gender, string jobId, HumanoidCharacterProfile? profile = null,
+    public void CreateGeneralRecord(EntityUid station, EntityUid? idUid, string name, int age, string species, Gender gender, string jobId, string? mobFingerprint, HumanoidCharacterProfile? profile = null,
         StationRecordsComponent? records = null)
     {
         if (!Resolve(station, ref records))
@@ -121,7 +125,8 @@ public sealed class StationRecordsSystem : EntitySystem
             JobPrototype = jobId,
             Species = species,
             Gender = gender,
-            DisplayPriority = jobPrototype.Weight
+            DisplayPriority = jobPrototype.Weight,
+            Fingerprint = mobFingerprint
         };
 
         var key = AddRecord(station, records);
index b1e2a6065a15670282819d02f809e36dd9f5536f..74964178c6fd053cf71a022740520ae1004b0b17 100644 (file)
@@ -56,4 +56,10 @@ public sealed class GeneralStationRecord
     /// </summary>
     [ViewVariables]
     public int DisplayPriority;
+
+    /// <summary>
+    ///     Fingerprint of the person.
+    /// </summary>
+    [ViewVariables]
+    public string? Fingerprint;
 }
index 299f75399ddfa78d093236caea76b28db1197e7c..a041a8cbee73d423779a268b4adedb620f345ddb 100644 (file)
@@ -7,3 +7,4 @@ general-station-record-console-record-age = Age: {$age}
 general-station-record-console-record-title = Job: {$job}
 general-station-record-console-record-species = Species: {$species}
 general-station-record-console-record-gender = Gender: {$gender}
+general-station-record-console-record-fingerprint = Fingerprint: {$fingerprint}