Better DNA forensics & ReagentData (#26699)

* Added the ability for blood to track DNA using ReagentData; Forensic Scanner now accounts for solution DNA, non-DNA holders have "Unknown DNA"

* Removes touch DNA for puddles, adds DNA to vomit

* DNA now leaves traces in containers and those marked without don't show DNA on scan (except for puddles), gibbed parts have DNA

* Fix stupid metamorphic glass bug grrr

* Removed SpillableComponent since DnaSubstanceTraceComponent is used instead

* Removes data field from maps, adds DNA tracking for some missed items

* Give default value, fix missing values.

* Fixes recipe bug

* Review changes

* Make the Data list into a nullable type

* Revert map changes

* Move gibbed unknown DNA to forensicssystem
This commit is contained in:
SlamBamActionman
2024-08-09 01:27:27 +02:00
committed by GitHub
parent c43fcdfa06
commit 07174d0aaf
45 changed files with 307 additions and 66 deletions

View File

@@ -452,7 +452,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
/// <param name="quantity">The amount of reagent to add.</param>
/// <returns>If all the reagent could be added.</returns>
[PublicAPI]
public bool TryAddReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, float? temperature = null, ReagentData? data = null)
public bool TryAddReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, float? temperature = null, List<ReagentData>? data = null)
=> TryAddReagent(soln, new ReagentQuantity(prototype, quantity, data), out _, temperature);
/// <summary>
@@ -464,7 +464,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
/// <param name="quantity">The amount of reagent to add.</param>
/// <param name="acceptedQuantity">The amount of reagent successfully added.</param>
/// <returns>If all the reagent could be added.</returns>
public bool TryAddReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, out FixedPoint2 acceptedQuantity, float? temperature = null, ReagentData? data = null)
public bool TryAddReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, out FixedPoint2 acceptedQuantity, float? temperature = null, List<ReagentData>? data = null)
{
var reagent = new ReagentQuantity(prototype, quantity, data);
return TryAddReagent(soln, reagent, out acceptedQuantity, temperature);
@@ -513,7 +513,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
/// <param name="prototype">The Id of the reagent to remove.</param>
/// <param name="quantity">The amount of reagent to remove.</param>
/// <returns>If the reagent to remove was found in the container.</returns>
public bool RemoveReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, ReagentData? data = null)
public bool RemoveReagent(Entity<SolutionComponent> soln, string prototype, FixedPoint2 quantity, List<ReagentData>? data = null)
{
return RemoveReagent(soln, new ReagentQuantity(prototype, quantity, data));
}