Add more DNA interactions (#21989)

* Add more DNA interactions

* remove unused import

* update based on feedback

* Add event for chemistrysystem.injector

* move event to shared; transfer dna to implanter

* doafter and interaction event fixes

* add BreakOnHandChange

* doh

* use events instead of updating component directly

* Add DataFields to ForensicScannerComponent fields

* Convert most events to system api call
This commit is contained in:
themias
2023-12-15 04:52:55 -05:00
committed by GitHub
parent 2455980090
commit 9cc4a50692
20 changed files with 291 additions and 26 deletions

View File

@@ -51,6 +51,7 @@ namespace Content.Server.Forensics
component.Fingerprints,
component.Fibers,
component.DNAs,
component.Residues,
component.LastScannedName,
component.PrintCooldown,
component.PrintReadyAt);
@@ -74,6 +75,7 @@ namespace Content.Server.Forensics
scanner.Fingerprints = new();
scanner.Fibers = new();
scanner.DNAs = new();
scanner.Residues = new();
}
else
@@ -81,6 +83,7 @@ namespace Content.Server.Forensics
scanner.Fingerprints = forensics.Fingerprints.ToList();
scanner.Fibers = forensics.Fibers.ToList();
scanner.DNAs = forensics.DNAs.ToList();
scanner.Residues = forensics.Residues.ToList();
}
scanner.LastScannedName = MetaData(args.Args.Target.Value).EntityName;
@@ -222,6 +225,12 @@ namespace Content.Server.Forensics
{
text.AppendLine(dna);
}
text.AppendLine();
text.AppendLine(Loc.GetString("forensic-scanner-interface-residues"));
foreach (var residue in component.Residues)
{
text.AppendLine(residue);
}
_paperSystem.SetContent(printed, text.ToString());
_audioSystem.PlayPvs(component.SoundPrint, uid,