Много чего
This commit is contained in:
21
Content.Server/_White/AddImplant/AddImplantSystem.cs
Normal file
21
Content.Server/_White/AddImplant/AddImplantSystem.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Implants;
|
||||
|
||||
namespace Content.Server._White.AddImplant;
|
||||
|
||||
public sealed class AddImplantSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedSubdermalImplantSystem _implantSystem = default!;
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<AddImplantComponent, MapInitEvent>(OnMapInit);
|
||||
}
|
||||
public void OnMapInit(Entity<AddImplantComponent> ent, ref MapInitEvent args)
|
||||
{
|
||||
_implantSystem.AddImplants(ent.Owner, ent.Comp.Implants);
|
||||
RemComp<AddImplantComponent>(ent.Owner);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user