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:
parent
59937ab927
commit
0adba6d9b6
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue