Station Records Computer now shows fingerprints (#14524)

* 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
This commit is contained in:
faint
2023-03-14 05:55:56 +03:00
committed by GitHub
parent 89d3875cde
commit d6af11a084
4 changed files with 19 additions and 3 deletions

View 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))
}
};

View 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);

View File

@@ -56,4 +56,10 @@ public sealed class GeneralStationRecord
/// </summary>
[ViewVariables]
public int DisplayPriority;
/// <summary>
/// Fingerprint of the person.
/// </summary>
[ViewVariables]
public string? Fingerprint;
}

View 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}