Move PaperSystem to Shared (#30592)
* Fix paper system late localization * IS THIS WHAT YOU WANT * well I guess this is happening now * fix the BUI * did that even do anything before? * again with the escapeformatting... * Dirtying * Move dirty to function * Rename PaperSystem to PaperVisualizerSystem * Fix namespace * how many namespace changes must I suffer through * SetContent is for Setting Content * minor shuffling * review --------- Co-authored-by: plykiya <plykiya@protonmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Content.Server.Paper;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.UserInterface;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Forensics;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Paper;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -183,7 +183,7 @@ namespace Content.Server.Forensics
|
||||
var printed = EntityManager.SpawnEntity(component.MachineOutput, Transform(uid).Coordinates);
|
||||
_handsSystem.PickupOrDrop(args.Actor, printed, checkActionBlocker: false);
|
||||
|
||||
if (!HasComp<PaperComponent>(printed))
|
||||
if (!TryComp<PaperComponent>(printed, out var paperComp))
|
||||
{
|
||||
Log.Error("Printed paper did not have PaperComponent.");
|
||||
return;
|
||||
@@ -217,7 +217,7 @@ namespace Content.Server.Forensics
|
||||
text.AppendLine(residue);
|
||||
}
|
||||
|
||||
_paperSystem.SetContent(printed, text.ToString());
|
||||
_paperSystem.SetContent((printed, paperComp), text.ToString());
|
||||
_audioSystem.PlayPvs(component.SoundPrint, uid,
|
||||
AudioParams.Default
|
||||
.WithVariation(0.25f)
|
||||
|
||||
Reference in New Issue
Block a user