Files
tbd-station-14/Content.Server/Nuke/NukeCodePaperSystem.cs
2022-02-16 18:23:23 +11:00

28 lines
745 B
C#

using Content.Server.Paper;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
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;
}
}
}