Add more DNA interactions (#21989)
* Add more DNA interactions * remove unused import * update based on feedback * Add event for chemistrysystem.injector * move event to shared; transfer dna to implanter * doafter and interaction event fixes * add BreakOnHandChange * doh * use events instead of updating component directly * Add DataFields to ForensicScannerComponent fields * Convert most events to system api call
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Forensics;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Implants.Components;
|
||||
using Content.Shared.Popups;
|
||||
@@ -72,6 +73,9 @@ public abstract class SharedImplanterSystem : EntitySystem
|
||||
else
|
||||
ImplantMode(implanter, component);
|
||||
|
||||
var ev = new TransferDnaEvent { Donor = target, Recipient = implanter };
|
||||
RaiseLocalEvent(target, ref ev);
|
||||
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
@@ -140,6 +144,10 @@ public abstract class SharedImplanterSystem : EntitySystem
|
||||
implantComp.ImplantedEntity = null;
|
||||
implanterContainer.Insert(implant);
|
||||
permanentFound = implantComp.Permanent;
|
||||
|
||||
var ev = new TransferDnaEvent { Donor = target, Recipient = implanter };
|
||||
RaiseLocalEvent(target, ref ev);
|
||||
|
||||
//Break so only one implant is drawn
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user