diff --git a/Content.Shared/Chemistry/Components/Solution.cs b/Content.Shared/Chemistry/Components/Solution.cs
index 2179469c08..df09f7f3f6 100644
--- a/Content.Shared/Chemistry/Components/Solution.cs
+++ b/Content.Shared/Chemistry/Components/Solution.cs
@@ -302,7 +302,7 @@ namespace Content.Shared.Chemistry.Components
/// If you only want the volume of a single reagent, use
///
[Pure]
- public FixedPoint2 GetTotalPrototypeQuantity(params string[] prototypes)
+ public FixedPoint2 GetTotalPrototypeQuantity(params ProtoId[] prototypes)
{
var total = FixedPoint2.Zero;
foreach (var (reagent, quantity) in Contents)
@@ -314,7 +314,7 @@ namespace Content.Shared.Chemistry.Components
return total;
}
- public FixedPoint2 GetTotalPrototypeQuantity(string id)
+ public FixedPoint2 GetTotalPrototypeQuantity(ProtoId id)
{
var total = FixedPoint2.Zero;
foreach (var (reagent, quantity) in Contents)
@@ -645,7 +645,7 @@ namespace Content.Shared.Chemistry.Components
///
/// Splits a solution with only the specified reagent prototypes.
///
- public Solution SplitSolutionWithOnly(FixedPoint2 toTake, params string[] includedPrototypes)
+ public Solution SplitSolutionWithOnly(FixedPoint2 toTake, params ProtoId[] includedPrototypes)
{
// First remove the non-included prototypes
List excluded = new();
@@ -844,7 +844,7 @@ namespace Content.Shared.Chemistry.Components
ValidateSolution();
}
- public Color GetColorWithout(IPrototypeManager? protoMan, params string[] without)
+ public Color GetColorWithout(IPrototypeManager? protoMan, params ProtoId[] without)
{
if (Volume == FixedPoint2.Zero)
{
@@ -887,7 +887,7 @@ namespace Content.Shared.Chemistry.Components
return GetColorWithout(protoMan);
}
- public Color GetColorWithOnly(IPrototypeManager? protoMan, params string[] included)
+ public Color GetColorWithOnly(IPrototypeManager? protoMan, params ProtoId[] included)
{
if (Volume == FixedPoint2.Zero)
{
diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs
index a245c0b606..cd38df021d 100644
--- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs
+++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs
@@ -858,7 +858,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
args.PushMarkup(Loc.GetString(entity.Comp.LocPhysicalQuality,
("color", colorHex),
("desc", primary.LocalizedPhysicalDescription),
- ("chemCount", solution.Contents.Count) ));
+ ("chemCount", solution.Contents.Count)));
// Push the recognizable reagents
@@ -1048,7 +1048,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
public bool EnsureSolution(
Entity entity,
string name,
- [NotNullWhen(true)]out Solution? solution,
+ [NotNullWhen(true)] out Solution? solution,
FixedPoint2 maxVol = default)
{
return EnsureSolution(entity, name, maxVol, null, out _, out solution);
@@ -1058,7 +1058,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
Entity entity,
string name,
out bool existed,
- [NotNullWhen(true)]out Solution? solution,
+ [NotNullWhen(true)] out Solution? solution,
FixedPoint2 maxVol = default)
{
return EnsureSolution(entity, name, maxVol, null, out existed, out solution);
@@ -1240,13 +1240,13 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem
}
else
{
- dissolvedSol.RemoveReagent(reagent,amtChange);
+ dissolvedSol.RemoveReagent(reagent, amtChange);
}
UpdateChemicals(dissolvedSolution);
}
public FixedPoint2 GetReagentQuantityFromConcentration(Entity dissolvedSolution,
- FixedPoint2 volume,float concentration)
+ FixedPoint2 volume, float concentration)
{
var dissolvedSol = dissolvedSolution.Comp.Solution;
if (volume == 0
diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs
index 3b16b577cb..e634e03284 100644
--- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs
+++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs
@@ -221,7 +221,7 @@ namespace Content.Shared.Chemistry.Reagent
if (effect.EntityEffectGuidebookText(prototype, entSys) is not { } description)
return null;
- var quantity = metabolism == null ? 0f : (double) (effect.MinScale * metabolism);
+ var quantity = metabolism == null ? 0f : (double)(effect.MinScale * metabolism);
return Loc.GetString(
"guidebook-reagent-effect-description",
diff --git a/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs b/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs
index 9854560204..0ba1c15122 100644
--- a/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs
+++ b/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs
@@ -1,7 +1,9 @@
using System.Linq;
using Content.Shared.Chemistry.Components;
using Content.Shared.FixedPoint;
+using Robust.Shared.Prototypes;
using Content.Shared.Fluids.Components;
+using Content.Shared.Chemistry.Reagent;
namespace Content.Shared.Fluids;
@@ -78,9 +80,9 @@ public abstract partial class SharedPuddleSystem
}
- public string[] GetEvaporatingReagents(Solution solution)
+ public ProtoId[] GetEvaporatingReagents(Solution solution)
{
- List evaporatingReagents = [];
+ List> evaporatingReagents = [];
foreach (var solProto in solution.GetReagentPrototypes(_prototypeManager).Keys)
{
if (solProto.EvaporationSpeed > FixedPoint2.Zero)
@@ -89,10 +91,10 @@ public abstract partial class SharedPuddleSystem
return evaporatingReagents.ToArray();
}
- public string[] GetAbsorbentReagents(Solution solution)
+ public ProtoId[] GetAbsorbentReagents(Solution solution)
{
- List absorbentReagents = [];
- foreach (var solProto in solution.GetReagentPrototypes(_prototypeManager).Keys)
+ var absorbentReagents = new List>();
+ foreach (ReagentPrototype solProto in solution.GetReagentPrototypes(_prototypeManager).Keys)
{
if (solProto.Absorbent)
absorbentReagents.Add(solProto.ID);
@@ -109,9 +111,9 @@ public abstract partial class SharedPuddleSystem
/// Gets a mapping of evaporating speed of the reagents within a solution.
/// The speed at which a solution evaporates is the average of the speed of all evaporating reagents in it.
///
- public Dictionary GetEvaporationSpeeds(Solution solution)
+ public Dictionary, FixedPoint2> GetEvaporationSpeeds(Solution solution)
{
- Dictionary evaporatingSpeeds = [];
+ Dictionary, FixedPoint2> evaporatingSpeeds = [];
foreach (var solProto in solution.GetReagentPrototypes(_prototypeManager).Keys)
{
if (solProto.EvaporationSpeed > FixedPoint2.Zero)
diff --git a/Content.Shared/Fluids/SharedPuddleSystem.cs b/Content.Shared/Fluids/SharedPuddleSystem.cs
index a2ea262796..e81d1c9d11 100644
--- a/Content.Shared/Fluids/SharedPuddleSystem.cs
+++ b/Content.Shared/Fluids/SharedPuddleSystem.cs
@@ -42,7 +42,7 @@ public abstract partial class SharedPuddleSystem : EntitySystem
[Dependency] private readonly StepTriggerSystem _stepTrigger = default!;
[Dependency] private readonly TileFrictionController _tile = default!;
- private string[] _standoutReagents = [];
+ private ProtoId[] _standoutReagents = [];
///
/// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle.