2021-11-11 04:29:11 +03:00
|
|
|
using Content.Server.Paper;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Nuke
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class NukeCodePaperSystem : EntitySystem
|
2021-11-11 04:29:11 +03:00
|
|
|
{
|
|
|
|
|
[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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|