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:
@@ -54,6 +54,7 @@ public sealed class DrinkSystem : EntitySystem
|
||||
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
|
||||
[Dependency] private readonly StomachSystem _stomach = default!;
|
||||
[Dependency] private readonly ForensicsSystem _forensics = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -399,9 +400,7 @@ public sealed class DrinkSystem : EntitySystem
|
||||
//TODO: Grab the stomach UIDs somehow without using Owner
|
||||
_stomach.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp);
|
||||
|
||||
var comp = EnsureComp<ForensicsComponent>(uid);
|
||||
if (TryComp<DnaComponent>(args.Target, out var dna))
|
||||
comp.DNAs.Add(dna.DNA);
|
||||
_forensics.TransferDna(uid, args.Target.Value);
|
||||
|
||||
if (!forceDrink && solution.Volume > 0)
|
||||
args.Repeat = true;
|
||||
|
||||
Reference in New Issue
Block a user