Files
tbd-station-14/Content.Server/Nuke/NukeCodePaperSystem.cs
Alex Evgrashin df970b2283 Nuke fixes (#6868)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-02-23 17:00:51 -07:00

25 lines
653 B
C#

using Content.Server.Paper;
namespace Content.Server.Nuke
{
public sealed class NukeCodePaperSystem : EntitySystem
{
[Dependency] private readonly NukeCodeSystem _codes = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<NukeCodePaperComponent, MapInitEvent>(OnMapInit);
}
private void OnMapInit(EntityUid uid, NukeCodePaperComponent component, MapInitEvent args)
{
PaperComponent? paper = null;
if (!Resolve(uid, ref paper))
return;
paper.Content += _codes.Code;
}
}
}