* Added the ability for blood to track DNA using ReagentData; Forensic Scanner now accounts for solution DNA, non-DNA holders have "Unknown DNA" * Removes touch DNA for puddles, adds DNA to vomit * DNA now leaves traces in containers and those marked without don't show DNA on scan (except for puddles), gibbed parts have DNA * Fix stupid metamorphic glass bug grrr * Removed SpillableComponent since DnaSubstanceTraceComponent is used instead * Removes data field from maps, adds DNA tracking for some missed items * Give default value, fix missing values. * Fixes recipe bug * Review changes * Make the Data list into a nullable type * Revert map changes * Move gibbed unknown DNA to forensicssystem
77 lines
2.4 KiB
C#
77 lines
2.4 KiB
C#
using System.Text;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Timing;
|
|
using Content.Shared.Forensics;
|
|
|
|
namespace Content.Client.Forensics
|
|
{
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class ForensicScannerMenu : DefaultWindow
|
|
{
|
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
|
|
|
public ForensicScannerMenu()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
}
|
|
|
|
public void UpdatePrinterState(bool disabled)
|
|
{
|
|
Print.Disabled = disabled;
|
|
}
|
|
|
|
public void UpdateState(ForensicScannerBoundUserInterfaceState msg)
|
|
{
|
|
if (string.IsNullOrEmpty(msg.LastScannedName))
|
|
{
|
|
Print.Disabled = true;
|
|
Clear.Disabled = true;
|
|
NameLabel.Text = string.Empty;
|
|
Diagnostics.Text = string.Empty;
|
|
return;
|
|
}
|
|
|
|
Print.Disabled = (msg.PrintReadyAt > _gameTiming.CurTime);
|
|
Clear.Disabled = false;
|
|
|
|
NameLabel.Text = msg.LastScannedName;
|
|
|
|
var text = new StringBuilder();
|
|
|
|
text.AppendLine(Loc.GetString("forensic-scanner-interface-fingerprints"));
|
|
foreach (var fingerprint in msg.Fingerprints)
|
|
{
|
|
text.AppendLine(fingerprint);
|
|
}
|
|
text.AppendLine();
|
|
text.AppendLine(Loc.GetString("forensic-scanner-interface-fibers"));
|
|
foreach (var fiber in msg.Fibers)
|
|
{
|
|
text.AppendLine(fiber);
|
|
}
|
|
text.AppendLine();
|
|
text.AppendLine(Loc.GetString("forensic-scanner-interface-dnas"));
|
|
foreach (var dna in msg.TouchDNAs)
|
|
{
|
|
text.AppendLine(dna);
|
|
}
|
|
foreach (var dna in msg.SolutionDNAs)
|
|
{
|
|
if (msg.TouchDNAs.Contains(dna))
|
|
continue;
|
|
text.AppendLine(dna);
|
|
}
|
|
text.AppendLine();
|
|
text.AppendLine(Loc.GetString("forensic-scanner-interface-residues"));
|
|
foreach (var residue in msg.Residues)
|
|
{
|
|
text.AppendLine(residue);
|
|
}
|
|
Diagnostics.Text = text.ToString();
|
|
}
|
|
}
|
|
}
|