Add custom paper for forensic scanner output (#16221)
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Threading;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Forensics
|
||||
{
|
||||
@@ -72,5 +74,12 @@ namespace Content.Server.Forensics
|
||||
/// </summary>
|
||||
[DataField("soundPrint")]
|
||||
public SoundSpecifier SoundPrint = new SoundPathSpecifier("/Audio/Machines/short_print_and_rip.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// What the machine will print
|
||||
/// </summary>
|
||||
[DataField("machineOutput", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string MachineOutput = "ForensicReportPaper";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Content.Server.Forensics
|
||||
}
|
||||
|
||||
// Spawn a piece of paper.
|
||||
var printed = EntityManager.SpawnEntity("Paper", Transform(uid).Coordinates);
|
||||
var printed = EntityManager.SpawnEntity(component.MachineOutput, Transform(uid).Coordinates);
|
||||
_handsSystem.PickupOrDrop(args.Session.AttachedEntity, printed, checkActionBlocker: false);
|
||||
|
||||
if (!TryComp<PaperComponent>(printed, out var paper))
|
||||
|
||||
Reference in New Issue
Block a user