ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.Implants;
|
||||
using Content.Shared.Implants.Components;
|
||||
using Content.Shared.Roles;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -13,7 +12,6 @@ namespace Content.Server.Jobs;
|
||||
[UsedImplicitly]
|
||||
public sealed partial class AddImplantSpecial : JobSpecial
|
||||
{
|
||||
|
||||
[DataField("implants", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<EntityPrototype>))]
|
||||
public HashSet<String> Implants { get; private set; } = new();
|
||||
|
||||
@@ -21,19 +19,6 @@ public sealed partial class AddImplantSpecial : JobSpecial
|
||||
{
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
var implantSystem = entMan.System<SharedSubdermalImplantSystem>();
|
||||
var xformQuery = entMan.GetEntityQuery<TransformComponent>();
|
||||
|
||||
if (!xformQuery.TryGetComponent(mob, out var xform))
|
||||
return;
|
||||
|
||||
foreach (var implantId in Implants)
|
||||
{
|
||||
var implant = entMan.SpawnEntity(implantId, xform.Coordinates);
|
||||
|
||||
if (!entMan.TryGetComponent<SubdermalImplantComponent>(implant, out var implantComp))
|
||||
return;
|
||||
|
||||
implantSystem.ForceImplant(mob, implant, implantComp);
|
||||
}
|
||||
implantSystem.AddImplants(mob, Implants);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user