Add barebone nuke (#5242)
Co-authored-by: Alexander Evgrashin <evgrashin.adl@gmail.com>
This commit is contained in:
27
Content.Server/Nuke/NukeCodePaperSystem.cs
Normal file
27
Content.Server/Nuke/NukeCodePaperSystem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Server.Paper;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Nuke
|
||||
{
|
||||
public 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user