Buff/fix forensic pads (#4932)

* Buff/fix forensic pads

* single line change no longer...

* Fix LOC

* Fix null check

* Pretty up the code (thanks to ShepardToTheStars)
This commit is contained in:
Astra 2025-12-12 20:21:56 +01:00 committed by GitHub
parent 59937ab927
commit 0adba6d9b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -80,8 +80,15 @@ namespace Content.Server.Forensics
return;
}
// Begin DeltaV changes - add Fiberprint to display
if (TryComp<FiberComponent>(args.Target, out var fiber))
StartScan(uid, args.User, args.Target.Value, component, string.IsNullOrEmpty(fiber.FiberColor) ? Loc.GetString("forensic-fibers", ("material", fiber.FiberMaterial)) : Loc.GetString("forensic-fibers-colored", ("color", fiber.FiberColor), ("material", fiber.FiberMaterial)));
{
var text = Loc.GetString("forensic-pad-fibers", ("material", fiber.FiberMaterial), ("fiberprint", fiber.Fiberprint ?? string.Empty));
if (!string.IsNullOrEmpty(fiber.FiberColor)) // If there are colored fibers, use that locale instead
text = Loc.GetString("forensic-pad-fibers-colored", ("color", fiber.FiberColor), ("material", fiber.FiberMaterial), ("fiberprint", fiber.Fiberprint ?? string.Empty));
StartScan(uid, args.User, args.Target.Value, component, text);
}
// End DeltaV changes
}
private void StartScan(EntityUid used, EntityUid user, EntityUid target, ForensicPadComponent pad, string sample)

View File

@ -5,3 +5,6 @@ fibers-plasteel = plasteel
fibers-degraded-plasteel = degraded plasteel
fibers-replicated-plasteel = replicated plasteel
fibers-nanomachine = nanomachine
# Forensic pads should show the fiber prints
forensic-pad-fibers = {LOC($material)} fibers ; {$fiberprint}
forensic-pad-fibers-colored = {LOC($color)} {LOC($material)} fibers ; {$fiberprint}