* Port forensics from nyanotrasen

* port updates

* printing

* Update Resources/Locale/en-US/forensics/forensics.ftl

Co-authored-by: Veritius <veritiusgaming@gmail.com>

* Update Content.Server/Forensics/Components/ForensicPadComponent.cs

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* Update Content.Server/Forensics/Systems/ForensicPadSystem.cs

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* Update Content.Server/Forensics/Systems/ForensicScannerSystem.cs

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* partially address reviews

* comments

* redo the events

* handle it

* rewrite loc

* master fixes

Co-authored-by: ike709 <ike709@github.com>
Co-authored-by: Veritius <veritiusgaming@gmail.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
ike709
2022-06-27 20:04:53 -05:00
committed by GitHub
parent 8b0e8915a8
commit d770eb6a35
30 changed files with 859 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
namespace Content.Server.Forensics
{
/// <summary>
/// This controls fibers left by gloves on items,
/// which the forensics system uses.
/// </summary>
[RegisterComponent]
public sealed class FiberComponent : Component
{
[DataField("fiberMaterial")]
public string FiberMaterial = "fibers-synthetic";
[DataField("fiberColor")]
public string? FiberColor;
}
}

View File

@@ -0,0 +1,12 @@
namespace Content.Server.Forensics
{
/// <summary>
/// This component is for mobs that leave fingerprints.
/// </summary>
[RegisterComponent]
public sealed class FingerprintComponent : Component
{
[DataField("fingerprint")]
public string? Fingerprint;
}
}

View File

@@ -0,0 +1,10 @@
namespace Content.Server.Forensics
{
/// <summary>
/// This component stops the entity from leaving finger prints,
/// usually so fibres can be left instead.
/// </summary>
[RegisterComponent]
public sealed class FingerprintMaskComponent : Component
{}
}

View File

@@ -0,0 +1,19 @@
using System.Threading;
namespace Content.Server.Forensics
{
/// <summary>
/// Used to take a sample of someone's fingerprints.
/// </summary>
[RegisterComponent]
public sealed class ForensicPadComponent : Component
{
public CancellationTokenSource? CancelToken;
[DataField("scanDelay")]
public float ScanDelay = 3.0f;
public bool Used = false;
public String Sample = string.Empty;
}
}

View File

@@ -0,0 +1,27 @@
using System.Threading;
namespace Content.Server.Forensics
{
[RegisterComponent]
public sealed class ForensicScannerComponent : Component
{
public CancellationTokenSource? CancelToken;
/// <summary>
/// A list of fingerprint GUIDs that the forensic scanner found from the <see cref="ForensicsComponent"/> on an entity.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public List<string> Fingerprints = new();
/// <summary>
/// A list of glove fibers that the forensic scanner found from the <see cref="ForensicsComponent"/> on an entity.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public List<string> Fibers = new();
/// <summary>
/// The time (in seconds) that it takes to scan an entity.
/// </summary>
[DataField("scanDelay")]
public float ScanDelay = 3.0f;
}
}

View File

@@ -0,0 +1,12 @@
namespace Content.Server.Forensics
{
[RegisterComponent]
public sealed class ForensicsComponent : Component
{
[DataField("fingerprints")]
public HashSet<string> Fingerprints = new();
[DataField("fibers")]
public HashSet<string> Fibers = new();
}
}