Change Biometrics after using Dna Scrambler Implant (#22098)
This commit is contained in:
@@ -30,14 +30,14 @@ namespace Content.Server.Forensics
|
||||
component.DNA = GenerateDNA();
|
||||
}
|
||||
|
||||
private string GenerateFingerprint()
|
||||
public string GenerateFingerprint()
|
||||
{
|
||||
var fingerprint = new byte[16];
|
||||
_random.NextBytes(fingerprint);
|
||||
return Convert.ToHexString(fingerprint);
|
||||
}
|
||||
|
||||
private string GenerateDNA()
|
||||
public string GenerateDNA()
|
||||
{
|
||||
var letters = new[] { "A", "C", "G", "T" };
|
||||
var DNA = string.Empty;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Cuffs;
|
||||
using Content.Server.Forensics;
|
||||
using Content.Server.Humanoid;
|
||||
using Content.Server.Store.Components;
|
||||
using Content.Server.Store.Systems;
|
||||
@@ -19,6 +20,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
[Dependency] private readonly StoreSystem _store = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly ForensicsSystem _forensicsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -80,6 +82,14 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
|
||||
var newProfile = HumanoidCharacterProfile.RandomWithSpecies(humanoid.Species);
|
||||
_humanoidAppearance.LoadProfile(ent, newProfile, humanoid);
|
||||
_metaData.SetEntityName(ent, newProfile.Name);
|
||||
if (TryComp<DnaComponent>(ent, out var dna))
|
||||
{
|
||||
dna.DNA = _forensicsSystem.GenerateDNA();
|
||||
}
|
||||
if (TryComp<FingerprintComponent>(ent, out var fingerprint))
|
||||
{
|
||||
fingerprint.Fingerprint = _forensicsSystem.GenerateFingerprint();
|
||||
}
|
||||
_popup.PopupEntity(Loc.GetString("scramble-implant-activated-popup"), ent, ent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user