Files
tbd-station-14/Content.Server/Jobs/AddImplantSpecial.cs
DrSmugleaf 00826aaad6 Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out (#37959)
* Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out

* Missed one

* Missed another

* Fix data field ids
2025-07-10 05:06:51 +02:00

24 lines
641 B
C#

using Content.Shared.Implants;
using Content.Shared.Roles;
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
namespace Content.Server.Jobs;
/// <summary>
/// Adds implants on spawn to the entity
/// </summary>
[UsedImplicitly]
public sealed partial class AddImplantSpecial : JobSpecial
{
[DataField]
public HashSet<EntProtoId> Implants { get; private set; } = new();
public override void AfterEquip(EntityUid mob)
{
var entMan = IoCManager.Resolve<IEntityManager>();
var implantSystem = entMan.System<SharedSubdermalImplantSystem>();
implantSystem.AddImplants(mob, Implants);
}
}