Fix forensic scanner UI. (#12398)
* Add missing Dispose method to ForensicScannerBoundUserInterface. * Remove old code from ForensicScanner. * Prevent forensic scanner from being used on the floor and allow its window to stay open when active hand is swapped. * Use more standardized UI code for ForensicScanner. * Add a delay to ForensicScanner printing. * Show name of what was scanned on ForensicScanner UI. * Add a print sound for ForensicScanner. * Add more error reporting for ForensicScanner. * Centralize common logic in ForensicScannerSystem. * Allow ForensicScanner blank printouts. * Tweak ForensicScanner audio parameters.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Threading;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Forensics
|
||||
{
|
||||
@@ -12,18 +13,58 @@ namespace Content.Server.Forensics
|
||||
/// </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();
|
||||
|
||||
public string LastScanned = string.Empty;
|
||||
/// <summary>
|
||||
/// What is the name of the entity that was scanned last?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will be used for the title of the printout and displayed to players.
|
||||
/// </remarks>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public string LastScannedName = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// When will the scanner be ready to print again?
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public TimeSpan PrintReadyAt = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// The time (in seconds) that it takes to scan an entity.
|
||||
/// </summary>
|
||||
[DataField("scanDelay")]
|
||||
public float ScanDelay = 3.0f;
|
||||
|
||||
/// <summary>
|
||||
/// How often can the scanner print out reports?
|
||||
/// </summary>
|
||||
[DataField("printCooldown")]
|
||||
public TimeSpan PrintCooldown = TimeSpan.FromSeconds(5);
|
||||
|
||||
/// <summary>
|
||||
/// The sound that's played when there's a match between a scan and an
|
||||
/// inserted forensic pad.
|
||||
/// </summary>
|
||||
[DataField("soundMatch")]
|
||||
public SoundSpecifier SoundMatch = new SoundPathSpecifier("/Audio/Machines/Nuke/angry_beep.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// The sound that's played when there's no match between a scan and an
|
||||
/// inserted forensic pad.
|
||||
/// </summary>
|
||||
[DataField("soundNoMatch")]
|
||||
public SoundSpecifier SoundNoMatch = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// The sound that's played when the scanner prints off a report.
|
||||
/// </summary>
|
||||
[DataField("soundPrint")]
|
||||
public SoundSpecifier SoundPrint = new SoundPathSpecifier("/Audio/Machines/short_print_and_rip.ogg");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user