DNA basics (#14724)

* DNA component

* Commit numba 2

* Added DNA into Station Records Computer

* commit numba 3

* commit numba 4

* Vomit also contain DNA component now

* fixed DNA field not clearing after scanning another item

* commit numba 10
Drinking leaves DNA on an object. Breaking glasses, bottles and beakers leave DNA and leave fingerprints/fibers with 40% chance on glass shards. + lotta fixes

* 11

* 12

* 14

* Added DNA guide entry

* FIX
This commit is contained in:
faint
2023-03-31 07:49:25 +03:00
committed by GitHub
parent dfcb7b3c97
commit 8b6996cbae
25 changed files with 173 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ using Content.Server.Body.Components;
using Content.Server.Chemistry.EntitySystems;
using Content.Server.Chemistry.ReactionEffects;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Forensics;
using Content.Server.HealthExaminable;
using Content.Server.Popups;
using Content.Shared.Chemistry.Components;
@@ -292,7 +293,14 @@ public sealed class BloodstreamSystem : EntitySystem
// Pass some of the chemstream into the spilled blood.
var temp = component.ChemicalSolution.SplitSolution(component.BloodTemporarySolution.Volume / 10);
component.BloodTemporarySolution.AddSolution(temp, _prototypeManager);
_spillableSystem.SpillAt(uid, component.BloodTemporarySolution, "PuddleBlood", false);
var puddle = _spillableSystem.SpillAt(uid, component.BloodTemporarySolution, "PuddleBlood", false);
if (puddle != null)
{
var comp = EnsureComp<ForensicsComponent>(puddle.Owner); //TODO: Get rid of .Owner
if (TryComp<DnaComponent>(uid, out var dna))
comp.DNAs.Add(dna.DNA);
}
component.BloodTemporarySolution.RemoveAllSolution();
}
@@ -331,6 +339,13 @@ public sealed class BloodstreamSystem : EntitySystem
component.BloodTemporarySolution.RemoveAllSolution();
tempSol.AddSolution(component.ChemicalSolution, _prototypeManager);
component.ChemicalSolution.RemoveAllSolution();
_spillableSystem.SpillAt(uid, tempSol, "PuddleBlood", true);
var puddle = _spillableSystem.SpillAt(uid, tempSol, "PuddleBlood", true);
if (puddle != null)
{
var comp = EnsureComp<ForensicsComponent>(puddle.Owner); //TODO: Get rid of .Owner
if (TryComp<DnaComponent>(uid, out var dna))
comp.DNAs.Add(dna.DNA);
}
}
}