diff --git a/Content.Client/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs b/Content.Client/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs index a3cedb5f2f..7c7d824ee9 100644 --- a/Content.Client/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs +++ b/Content.Client/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs @@ -1,5 +1,5 @@ using System.Linq; -using Content.Client.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Atmos.Prototypes; using Content.Shared.Body.Part; using Content.Shared.Chemistry; @@ -16,7 +16,7 @@ namespace Content.Client.Chemistry.EntitySystems; /// public sealed class ChemistryGuideDataSystem : SharedChemistryGuideDataSystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [ValidatePrototypeId] private const string DefaultMixingCategory = "DummyMix"; diff --git a/Content.Server/Administration/Commands/AddReagent.cs b/Content.Server/Administration/Commands/AddReagent.cs index 46e8e8c35e..9194031009 100644 --- a/Content.Server/Administration/Commands/AddReagent.cs +++ b/Content.Server/Administration/Commands/AddReagent.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.Reagent; @@ -42,7 +42,7 @@ namespace Content.Server.Administration.Commands return; } - var solutionContainerSystem = _entManager.System(); + var solutionContainerSystem = _entManager.System(); if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution)) { var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name)); diff --git a/Content.Server/Administration/Commands/SetSolutionCapacity.cs b/Content.Server/Administration/Commands/SetSolutionCapacity.cs index 19900d488b..0c529d7b5b 100644 --- a/Content.Server/Administration/Commands/SetSolutionCapacity.cs +++ b/Content.Server/Administration/Commands/SetSolutionCapacity.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.FixedPoint; @@ -36,7 +36,7 @@ namespace Content.Server.Administration.Commands return; } - var solutionContainerSystem = _entManager.System(); + var solutionContainerSystem = _entManager.System(); if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution)) { var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name)); diff --git a/Content.Server/Administration/Commands/SetSolutionTemperature.cs b/Content.Server/Administration/Commands/SetSolutionTemperature.cs index 5ebd39880b..85911f168a 100644 --- a/Content.Server/Administration/Commands/SetSolutionTemperature.cs +++ b/Content.Server/Administration/Commands/SetSolutionTemperature.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Chemistry.Components.SolutionManager; using Robust.Shared.Console; @@ -35,7 +35,7 @@ namespace Content.Server.Administration.Commands return; } - var solutionContainerSystem = _entManager.System(); + var solutionContainerSystem = _entManager.System(); if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution)) { var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name)); diff --git a/Content.Server/Administration/Commands/SetSolutionThermalEnergy.cs b/Content.Server/Administration/Commands/SetSolutionThermalEnergy.cs index 6442f1141a..54b6c092e9 100644 --- a/Content.Server/Administration/Commands/SetSolutionThermalEnergy.cs +++ b/Content.Server/Administration/Commands/SetSolutionThermalEnergy.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Chemistry.Components.SolutionManager; using Robust.Shared.Console; @@ -35,7 +35,7 @@ namespace Content.Server.Administration.Commands return; } - var solutionContainerSystem = _entManager.System(); + var solutionContainerSystem = _entManager.System(); if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solutionEnt, out var solution)) { var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name)); diff --git a/Content.Server/Administration/Toolshed/SolutionCommand.cs b/Content.Server/Administration/Toolshed/SolutionCommand.cs index e81e9aa323..f8c9bdd5c7 100644 --- a/Content.Server/Administration/Toolshed/SolutionCommand.cs +++ b/Content.Server/Administration/Toolshed/SolutionCommand.cs @@ -3,6 +3,7 @@ using Content.Shared.Administration; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; +using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Syntax; using Robust.Shared.Toolshed.TypeParsers; @@ -13,7 +14,7 @@ namespace Content.Server.Administration.Toolshed; [ToolshedCommand, AdminCommand(AdminFlags.Debug)] public sealed class SolutionCommand : ToolshedCommand { - private SolutionContainerSystem? _solutionContainer; + private SharedSolutionContainerSystem? _solutionContainer; [CommandImplementation("get")] public SolutionRef? Get( @@ -22,7 +23,7 @@ public sealed class SolutionCommand : ToolshedCommand [CommandArgument] ValueRef name ) { - _solutionContainer ??= GetSys(); + _solutionContainer ??= GetSys(); if (_solutionContainer.TryGetSolution(input, name.Evaluate(ctx)!, out var solution)) return new SolutionRef(solution.Value); @@ -48,7 +49,7 @@ public sealed class SolutionCommand : ToolshedCommand [CommandArgument] ValueRef amountRef ) { - _solutionContainer ??= GetSys(); + _solutionContainer ??= GetSys(); var amount = amountRef.Evaluate(ctx); if (amount > 0) diff --git a/Content.Server/Administration/UI/EditSolutionsEui.cs b/Content.Server/Administration/UI/EditSolutionsEui.cs index b4904d969e..6bee7d19fc 100644 --- a/Content.Server/Administration/UI/EditSolutionsEui.cs +++ b/Content.Server/Administration/UI/EditSolutionsEui.cs @@ -4,6 +4,7 @@ using Content.Server.EUI; using Content.Shared.Administration; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Eui; +using Content.Shared.Chemistry.EntitySystems; using JetBrains.Annotations; using Robust.Shared.Timing; @@ -17,13 +18,13 @@ namespace Content.Server.Administration.UI { [Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - private readonly SolutionContainerSystem _solutionContainerSystem = default!; + private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public readonly EntityUid Target; public EditSolutionsEui(EntityUid entity) { IoCManager.InjectDependencies(this); - _solutionContainerSystem = _entityManager.System(); + _solutionContainerSystem = _entityManager.System(); Target = entity; } diff --git a/Content.Server/Animals/Systems/UdderSystem.cs b/Content.Server/Animals/Systems/UdderSystem.cs index b7856e9042..452ba54d6e 100644 --- a/Content.Server/Animals/Systems/UdderSystem.cs +++ b/Content.Server/Animals/Systems/UdderSystem.cs @@ -1,6 +1,6 @@ using Content.Server.Animals.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Popups; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; @@ -25,7 +25,7 @@ internal sealed class UdderSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { diff --git a/Content.Server/Animals/Systems/WoolySystem.cs b/Content.Server/Animals/Systems/WoolySystem.cs index cbe959fb56..ef0ba086ea 100644 --- a/Content.Server/Animals/Systems/WoolySystem.cs +++ b/Content.Server/Animals/Systems/WoolySystem.cs @@ -1,6 +1,6 @@ using Content.Server.Animals.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Nutrition; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Mobs.Systems; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; @@ -9,7 +9,7 @@ using Robust.Shared.Timing; namespace Content.Server.Animals.Systems; /// -/// Gives ability to produce fiber reagents, produces endless if the +/// Gives ability to produce fiber reagents, produces endless if the /// owner has no HungerComponent /// public sealed class WoolySystem : EntitySystem @@ -17,7 +17,7 @@ public sealed class WoolySystem : EntitySystem [Dependency] private readonly HungerSystem _hunger = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly MobStateSystem _mobState = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; public override void Initialize() { diff --git a/Content.Server/Anomaly/Effects/InjectionAnomalySystem.cs b/Content.Server/Anomaly/Effects/InjectionAnomalySystem.cs index 1fa0c00bd3..f84978ef00 100644 --- a/Content.Server/Anomaly/Effects/InjectionAnomalySystem.cs +++ b/Content.Server/Anomaly/Effects/InjectionAnomalySystem.cs @@ -1,5 +1,5 @@ using Content.Server.Anomaly.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Anomaly.Components; using Content.Shared.Chemistry.Components.SolutionManager; using System.Linq; @@ -16,7 +16,7 @@ namespace Content.Server.Anomaly.Effects; public sealed class InjectionAnomalySystem : EntitySystem { [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly TransformSystem _transform = default!; private EntityQuery _injectableQuery; @@ -24,7 +24,7 @@ public sealed class InjectionAnomalySystem : EntitySystem public override void Initialize() { SubscribeLocalEvent(OnPulse); - SubscribeLocalEvent(OnSupercritical, before: new[] { typeof(SolutionContainerSystem) }); + SubscribeLocalEvent(OnSupercritical, before: new[] { typeof(SharedSolutionContainerSystem) }); _injectableQuery = GetEntityQuery(); } diff --git a/Content.Server/Anomaly/Effects/PuddleCreateAnomalySystem.cs b/Content.Server/Anomaly/Effects/PuddleCreateAnomalySystem.cs index d460e6f4b0..97c42cad8c 100644 --- a/Content.Server/Anomaly/Effects/PuddleCreateAnomalySystem.cs +++ b/Content.Server/Anomaly/Effects/PuddleCreateAnomalySystem.cs @@ -1,5 +1,5 @@ using Content.Server.Anomaly.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Shared.Anomaly.Components; @@ -11,7 +11,7 @@ namespace Content.Server.Anomaly.Effects; public sealed class PuddleCreateAnomalySystem : EntitySystem { [Dependency] private readonly PuddleSystem _puddle = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; public override void Initialize() { diff --git a/Content.Server/Anomaly/Effects/ReagentProducerAnomalySystem.cs b/Content.Server/Anomaly/Effects/ReagentProducerAnomalySystem.cs index d289fdabff..b96c510861 100644 --- a/Content.Server/Anomaly/Effects/ReagentProducerAnomalySystem.cs +++ b/Content.Server/Anomaly/Effects/ReagentProducerAnomalySystem.cs @@ -1,5 +1,5 @@ using Content.Server.Anomaly.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Anomaly.Components; using Content.Shared.Chemistry.Components; using Content.Shared.Sprite; @@ -28,7 +28,7 @@ public sealed class ReagentProducerAnomalySystem : EntitySystem //Useful: //Those reagents that the players are hunting for. Very low percentage of loss. - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly PointLightSystem _light = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 67246825fe..3da343aaa8 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.EntityEffects.Effects; using Content.Server.Fluids.EntitySystems; using Content.Server.Forensics; @@ -37,7 +36,7 @@ public sealed class BloodstreamSystem : EntitySystem [Dependency] private readonly PuddleSystem _puddleSystem = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly SharedDrunkSystem _drunkSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly SharedStutteringSystem _stutteringSystem = default!; [Dependency] private readonly AlertsSystem _alertsSystem = default!; [Dependency] private readonly ForensicsSystem _forensicsSystem = default!; @@ -178,9 +177,16 @@ public sealed class BloodstreamSystem : EntitySystem private void OnComponentInit(Entity entity, ref ComponentInit args) { - var chemicalSolution = _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.ChemicalSolutionName); - var bloodSolution = _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.BloodSolutionName); - var tempSolution = _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.BloodTemporarySolutionName); + if (!_solutionContainerSystem.EnsureSolution(entity.Owner, + entity.Comp.ChemicalSolutionName, + out var chemicalSolution) || + !_solutionContainerSystem.EnsureSolution(entity.Owner, + entity.Comp.BloodSolutionName, + out var bloodSolution) || + !_solutionContainerSystem.EnsureSolution(entity.Owner, + entity.Comp.BloodTemporarySolutionName, + out var tempSolution)) + return; chemicalSolution.MaxVolume = entity.Comp.ChemicalMaxVolume; bloodSolution.MaxVolume = entity.Comp.BloodMaxVolume; diff --git a/Content.Server/Body/Systems/LungSystem.cs b/Content.Server/Body/Systems/LungSystem.cs index a3c185d5cc..901d61f8fc 100644 --- a/Content.Server/Body/Systems/LungSystem.cs +++ b/Content.Server/Body/Systems/LungSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Atmos; using Content.Shared.Chemistry.Components; using Content.Shared.Clothing; @@ -13,7 +13,7 @@ public sealed class LungSystem : EntitySystem { [Dependency] private readonly AtmosphereSystem _atmos = default!; [Dependency] private readonly InternalsSystem _internals = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; public static string LungSolutionName = "Lung"; @@ -50,9 +50,11 @@ public sealed class LungSystem : EntitySystem private void OnComponentInit(Entity entity, ref ComponentInit args) { - var solution = _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName); - solution.MaxVolume = 100.0f; - solution.CanReact = false; // No dexalin lungs + if (_solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName, out var solution)) + { + solution.MaxVolume = 100.0f; + solution.CanReact = false; // No dexalin lungs + } } private void OnMaskToggled(Entity ent, ref ItemMaskToggledEvent args) diff --git a/Content.Server/Body/Systems/MetabolizerSystem.cs b/Content.Server/Body/Systems/MetabolizerSystem.cs index 5ba3c6ee58..3497d4a6d7 100644 --- a/Content.Server/Body/Systems/MetabolizerSystem.cs +++ b/Content.Server/Body/Systems/MetabolizerSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration.Logs; using Content.Shared.Body.Organ; using Content.Shared.Chemistry.Components; @@ -24,7 +24,7 @@ namespace Content.Server.Body.Systems [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; private EntityQuery _organQuery; private EntityQuery _solutionQuery; @@ -56,11 +56,11 @@ namespace Content.Server.Body.Systems { if (!entity.Comp.SolutionOnBody) { - _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName); + _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName, out _); } else if (_organQuery.CompOrNull(entity)?.Body is { } body) { - _solutionContainerSystem.EnsureSolution(body, entity.Comp.SolutionName); + _solutionContainerSystem.EnsureSolution(body, entity.Comp.SolutionName, out _); } } diff --git a/Content.Server/Body/Systems/RespiratorSystem.cs b/Content.Server/Body/Systems/RespiratorSystem.cs index 2854bbaeca..6209f00419 100644 --- a/Content.Server/Body/Systems/RespiratorSystem.cs +++ b/Content.Server/Body/Systems/RespiratorSystem.cs @@ -2,9 +2,9 @@ using Content.Server.Administration.Logs; using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; using Content.Server.Chat.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.EntityEffects.EffectConditions; using Content.Server.EntityEffects.Effects; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Alert; using Content.Shared.Atmos; using Content.Shared.Body.Components; @@ -33,7 +33,7 @@ public sealed class RespiratorSystem : EntitySystem [Dependency] private readonly LungSystem _lungSystem = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly IPrototypeManager _protoMan = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly ChatSystem _chat = default!; private static readonly ProtoId GasId = new("Gas"); diff --git a/Content.Server/Body/Systems/StomachSystem.cs b/Content.Server/Body/Systems/StomachSystem.cs index a4c2e8292d..9fc7ff10e4 100644 --- a/Content.Server/Body/Systems/StomachSystem.cs +++ b/Content.Server/Body/Systems/StomachSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Body.Organ; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; @@ -11,7 +11,7 @@ namespace Content.Server.Body.Systems public sealed class StomachSystem : EntitySystem { [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public const string DefaultSolutionName = "stomach"; diff --git a/Content.Server/Botany/Systems/BotanySystem.Produce.cs b/Content.Server/Botany/Systems/BotanySystem.Produce.cs index e309fb4772..34559a8304 100644 --- a/Content.Server/Botany/Systems/BotanySystem.Produce.cs +++ b/Content.Server/Botany/Systems/BotanySystem.Produce.cs @@ -10,7 +10,11 @@ public sealed partial class BotanySystem if (!TryGetSeed(produce, out var seed)) return; - var solutionContainer = _solutionContainerSystem.EnsureSolution(uid, produce.SolutionName, FixedPoint2.Zero, out _); + if (!_solutionContainerSystem.EnsureSolution(uid, + produce.SolutionName, + out var solutionContainer, + FixedPoint2.Zero)) + return; solutionContainer.RemoveAllSolution(); foreach (var (chem, quantity) in seed.Chemicals) diff --git a/Content.Server/Botany/Systems/BotanySystem.Seed.cs b/Content.Server/Botany/Systems/BotanySystem.Seed.cs index f64fcb3c43..c988e5338c 100644 --- a/Content.Server/Botany/Systems/BotanySystem.Seed.cs +++ b/Content.Server/Botany/Systems/BotanySystem.Seed.cs @@ -1,7 +1,7 @@ using Content.Server.Botany.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Kitchen.Components; using Content.Server.Popups; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Botany; using Content.Shared.Examine; using Content.Shared.Hands.EntitySystems; @@ -31,7 +31,7 @@ public sealed partial class BotanySystem : EntitySystem [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] private readonly SharedPointLightSystem _light = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly MetaDataSystem _metaData = default!; [Dependency] private readonly FixtureSystem _fixtureSystem = default!; [Dependency] private readonly CollisionWakeSystem _colWakeSystem = default!; diff --git a/Content.Server/Botany/Systems/PlantHolderSystem.cs b/Content.Server/Botany/Systems/PlantHolderSystem.cs index 21117b94ba..002a054339 100644 --- a/Content.Server/Botany/Systems/PlantHolderSystem.cs +++ b/Content.Server/Botany/Systems/PlantHolderSystem.cs @@ -1,11 +1,11 @@ using Content.Server.Atmos; using Content.Server.Atmos.EntitySystems; using Content.Server.Botany.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Fluids.Components; using Content.Server.Ghost.Roles.Components; using Content.Server.Kitchen.Components; using Content.Server.Popups; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Atmos; using Content.Shared.Botany; using Content.Shared.Burial.Components; @@ -40,7 +40,7 @@ public sealed class PlantHolderSystem : EntitySystem [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly SharedPointLightSystem _pointLight = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly TagSystem _tagSystem = default!; [Dependency] private readonly RandomHelperSystem _randomHelper = default!; [Dependency] private readonly IRobustRandom _random = default!; diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs index d936451d52..830368baa3 100644 --- a/Content.Server/Cargo/Systems/PricingSystem.cs +++ b/Content.Server/Cargo/Systems/PricingSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Administration; using Content.Server.Body.Systems; using Content.Server.Cargo.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Body.Components; using Content.Shared.Chemistry.Components.SolutionManager; @@ -30,7 +30,7 @@ public sealed class PricingSystem : EntitySystem [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly BodySystem _bodySystem = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; /// public override void Initialize() diff --git a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs index 289db75981..c733c7215e 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Labels; using Content.Server.Popups; using Content.Server.Storage.EntitySystems; @@ -33,7 +32,7 @@ namespace Content.Server.Chemistry.EntitySystems { [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; [Dependency] private readonly StorageSystem _storageSystem = default!; @@ -211,8 +210,11 @@ namespace Content.Server.Chemistry.EntitySystems _storageSystem.Insert(container, item, out _, user: user, storage); _labelSystem.Label(item, message.Label); - var itemSolution = _solutionContainerSystem.EnsureSolutionEntity(item, SharedChemMaster.PillSolutionName, message.Dosage, null, out _); - _solutionContainerSystem.TryAddSolution(itemSolution, withdrawal.SplitSolution(message.Dosage)); + _solutionContainerSystem.EnsureSolutionEntity(item, SharedChemMaster.PillSolutionName,out var itemSolution ,message.Dosage); + if (!itemSolution.HasValue) + return; + + _solutionContainerSystem.TryAddSolution(itemSolution.Value, withdrawal.SplitSolution(message.Dosage)); var pill = EnsureComp(item); pill.PillType = chemMaster.Comp.PillType; @@ -220,7 +222,7 @@ namespace Content.Server.Chemistry.EntitySystems // Log pill creation by a user _adminLogger.Add(LogType.Action, LogImpact.Low, - $"{ToPrettyString(user):user} printed {ToPrettyString(item):pill} {SharedSolutionContainerSystem.ToPrettyString(itemSolution.Comp.Solution)}"); + $"{ToPrettyString(user):user} printed {ToPrettyString(item):pill} {SharedSolutionContainerSystem.ToPrettyString(itemSolution.Value.Comp.Solution)}"); } UpdateUiState(chemMaster); diff --git a/Content.Server/Chemistry/EntitySystems/DeleteOnSolutionEmptySystem.cs b/Content.Server/Chemistry/EntitySystems/DeleteOnSolutionEmptySystem.cs index cfc6ba988a..4020a114c8 100644 --- a/Content.Server/Chemistry/EntitySystems/DeleteOnSolutionEmptySystem.cs +++ b/Content.Server/Chemistry/EntitySystems/DeleteOnSolutionEmptySystem.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components.DeleteOnSolutionEmptyComponent; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; @@ -7,7 +6,7 @@ namespace Content.Server.Chemistry.EntitySystems.DeleteOnSolutionEmptySystem { public sealed class DeleteOnSolutionEmptySystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { diff --git a/Content.Server/Chemistry/EntitySystems/HypospraySystem.cs b/Content.Server/Chemistry/EntitySystems/HypospraySystem.cs index c5bdb39816..9b78e81aa0 100644 --- a/Content.Server/Chemistry/EntitySystems/HypospraySystem.cs +++ b/Content.Server/Chemistry/EntitySystems/HypospraySystem.cs @@ -13,7 +13,6 @@ using Content.Shared.Timing; using Content.Shared.Weapons.Melee.Events; using Content.Server.Interaction; using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Robust.Shared.GameStates; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -143,7 +142,7 @@ public sealed class HypospraySystem : SharedHypospraySystem RaiseLocalEvent(target, ref ev); // same LogType as syringes... - _adminLogger.Add(LogType.ForceFeed, $"{EntityManager.ToPrettyString(user):user} injected {EntityManager.ToPrettyString(target):target} with a solution {SolutionContainerSystem.ToPrettyString(removedSolution):removedSolution} using a {EntityManager.ToPrettyString(uid):using}"); + _adminLogger.Add(LogType.ForceFeed, $"{EntityManager.ToPrettyString(user):user} injected {EntityManager.ToPrettyString(target):target} with a solution {SharedSolutionContainerSystem.ToPrettyString(removedSolution):removedSolution} using a {EntityManager.ToPrettyString(uid):using}"); return true; } diff --git a/Content.Server/Chemistry/EntitySystems/ReactionMixerSystem.cs b/Content.Server/Chemistry/EntitySystems/ReactionMixerSystem.cs index a81f38a21d..3913afbd07 100644 --- a/Content.Server/Chemistry/EntitySystems/ReactionMixerSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ReactionMixerSystem.cs @@ -4,7 +4,7 @@ using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Nutrition.EntitySystems; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Server.Popups; namespace Content.Server.Chemistry.EntitySystems; @@ -12,7 +12,7 @@ namespace Content.Server.Chemistry.EntitySystems; public sealed partial class ReactionMixerSystem : EntitySystem { [Dependency] private readonly PopupSystem _popup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainers = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainers = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; public override void Initialize() diff --git a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs index 18872e9dcf..f8d4a7efcd 100644 --- a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs @@ -1,6 +1,5 @@ using Content.Server.Chemistry.Components; using Content.Server.Chemistry.Containers.EntitySystems; -using Content.Server.Nutrition.Components; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Dispenser; using Content.Shared.Chemistry.EntitySystems; @@ -25,7 +24,7 @@ namespace Content.Server.Chemistry.EntitySystems public sealed class ReagentDispenserSystem : EntitySystem { [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly SolutionTransferSystem _solutionTransferSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; diff --git a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs index cd39d20b75..4227af577f 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Placeable; @@ -13,7 +13,7 @@ public sealed class SolutionHeaterSystem : EntitySystem { [Dependency] private readonly PowerReceiverSystem _powerReceiver = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; /// public override void Initialize() diff --git a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs index 3c57cc31af..d56fded024 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Body.Components; using Content.Server.Body.Systems; using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Inventory; using Content.Shared.Popups; using Content.Shared.Projectiles; @@ -20,7 +20,7 @@ public sealed class SolutionInjectOnCollideSystem : EntitySystem [Dependency] private readonly BloodstreamSystem _bloodstream = default!; [Dependency] private readonly InventorySystem _inventory = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly TagSystem _tag = default!; public override void Initialize() diff --git a/Content.Server/Chemistry/EntitySystems/SolutionPurgeSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionPurgeSystem.cs index 42b8ab374a..5a25e76456 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionPurgeSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionPurgeSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components.SolutionManager; using Robust.Shared.Timing; @@ -7,7 +7,7 @@ namespace Content.Server.Chemistry.EntitySystems; public sealed class SolutionPurgeSystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IGameTiming _timing = default!; public override void Update(float frameTime) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRandomFillSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRandomFillSystem.cs index 6685fb485f..62dd2d3a75 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRandomFillSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRandomFillSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Random; using Content.Shared.Random.Helpers; @@ -10,7 +10,7 @@ namespace Content.Server.Chemistry.EntitySystems; public sealed class SolutionRandomFillSystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionsSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionsSystem = default!; [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly IRobustRandom _random = default!; @@ -37,7 +37,8 @@ public sealed class SolutionRandomFillSystem : EntitySystem return; } - var target = _solutionsSystem.EnsureSolutionEntity(entity.Owner, entity.Comp.Solution, pick.quantity, null, out _); - _solutionsSystem.TryAddReagent(target, reagent, quantity, out _); + _solutionsSystem.EnsureSolutionEntity(entity.Owner, entity.Comp.Solution, out var target , pick.quantity); + if(target.HasValue) + _solutionsSystem.TryAddReagent(target.Value, reagent, quantity); } } diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index 5af181e4af..6a60062857 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.FixedPoint; @@ -9,7 +9,7 @@ namespace Content.Server.Chemistry.EntitySystems; public sealed class SolutionRegenerationSystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IGameTiming _timing = default!; public override void Update(float frameTime) diff --git a/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs b/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs index 32bd912b22..57875fc16a 100644 --- a/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/TransformableContainerSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.NameModifier.EntitySystems; @@ -10,7 +9,7 @@ namespace Content.Server.Chemistry.EntitySystems; public sealed class TransformableContainerSystem : EntitySystem { [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly SolutionContainerSystem _solutionsSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionsSystem = default!; [Dependency] private readonly MetaDataSystem _metadataSystem = default!; [Dependency] private readonly NameModifierSystem _nameMod = default!; diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index 5093b59409..c9b64e649e 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; @@ -7,6 +6,7 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; using Content.Shared.Physics; using Content.Shared.Throwing; +using Content.Shared.Chemistry.EntitySystems; using JetBrains.Annotations; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -25,7 +25,7 @@ namespace Content.Server.Chemistry.EntitySystems [Dependency] private readonly IPrototypeManager _protoManager = default!; [Dependency] private readonly SharedMapSystem _map = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly ThrowingSystem _throwing = default!; [Dependency] private readonly ReactiveSystem _reactive = default!; [Dependency] private readonly SharedTransformSystem _transformSystem = default!; diff --git a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs index ad02cb8ff9..f2d1bcebe1 100644 --- a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reaction; using Content.Shared.Chemistry.Reagent; @@ -39,7 +39,7 @@ public sealed partial class CleanTileReaction : ITileReaction { var entities = entityManager.System().GetLocalEntitiesIntersecting(tile, 0f).ToArray(); var puddleQuery = entityManager.GetEntityQuery(); - var solutionContainerSystem = entityManager.System(); + var solutionContainerSystem = entityManager.System(); // Multiply as the amount we can actually purge is higher than the react amount. var purgeAmount = reactVolume / CleanAmountMultiplier; diff --git a/Content.Server/Construction/Conditions/MinSolution.cs b/Content.Server/Construction/Conditions/MinSolution.cs index f98d639b7b..4a9fe1ee14 100644 --- a/Content.Server/Construction/Conditions/MinSolution.cs +++ b/Content.Server/Construction/Conditions/MinSolution.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Construction; using Content.Shared.Examine; @@ -33,7 +33,7 @@ public sealed partial class MinSolution : IGraphCondition public bool Condition(EntityUid uid, IEntityManager entMan) { - var containerSys = entMan.System(); + var containerSys = entMan.System(); if (!containerSys.TryGetSolution(uid, Solution, out _, out var solution)) return false; @@ -46,7 +46,7 @@ public sealed partial class MinSolution : IGraphCondition var entMan = IoCManager.Resolve(); var uid = args.Examined; - var containerSys = entMan.System(); + var containerSys = entMan.System(); if (!containerSys.TryGetSolution(uid, Solution, out _, out var solution)) return false; diff --git a/Content.Server/Construction/Conditions/SolutionEmpty.cs b/Content.Server/Construction/Conditions/SolutionEmpty.cs index 9235a187eb..7699979c7c 100644 --- a/Content.Server/Construction/Conditions/SolutionEmpty.cs +++ b/Content.Server/Construction/Conditions/SolutionEmpty.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Construction; using Content.Shared.Examine; @@ -18,7 +18,7 @@ public sealed partial class SolutionEmpty : IGraphCondition public bool Condition(EntityUid uid, IEntityManager entMan) { - var containerSys = entMan.System(); + var containerSys = entMan.System(); if (!containerSys.TryGetSolution(uid, Solution, out _, out var solution)) return false; @@ -30,7 +30,7 @@ public sealed partial class SolutionEmpty : IGraphCondition var entMan = IoCManager.Resolve(); var uid = args.Examined; - var containerSys = entMan.System(); + var containerSys = entMan.System(); if (!containerSys.TryGetSolution(uid, Solution, out _, out var solution)) return false; diff --git a/Content.Server/Destructible/DestructibleSystem.cs b/Content.Server/Destructible/DestructibleSystem.cs index e0183a037d..f156d517a3 100644 --- a/Content.Server/Destructible/DestructibleSystem.cs +++ b/Content.Server/Destructible/DestructibleSystem.cs @@ -2,7 +2,6 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.Administration.Logs; using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Construction; using Content.Server.Destructible.Thresholds; using Content.Server.Destructible.Thresholds.Behaviors; @@ -10,6 +9,7 @@ using Content.Server.Destructible.Thresholds.Triggers; using Content.Server.Explosion.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Server.Stack; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.Destructible; @@ -37,7 +37,7 @@ namespace Content.Server.Destructible [Dependency] public readonly ExplosionSystem ExplosionSystem = default!; [Dependency] public readonly StackSystem StackSystem = default!; [Dependency] public readonly TriggerSystem TriggerSystem = default!; - [Dependency] public readonly SolutionContainerSystem SolutionContainerSystem = default!; + [Dependency] public readonly SharedSolutionContainerSystem SolutionContainerSystem = default!; [Dependency] public readonly PuddleSystem PuddleSystem = default!; [Dependency] public readonly SharedContainerSystem ContainerSystem = default!; [Dependency] public readonly IPrototypeManager PrototypeManager = default!; diff --git a/Content.Server/Destructible/Thresholds/Behaviors/SpillBehavior.cs b/Content.Server/Destructible/Thresholds/Behaviors/SpillBehavior.cs index 5826a3871d..ff050ce2cd 100644 --- a/Content.Server/Destructible/Thresholds/Behaviors/SpillBehavior.cs +++ b/Content.Server/Destructible/Thresholds/Behaviors/SpillBehavior.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Shared.Fluids.Components; using JetBrains.Annotations; @@ -22,7 +22,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors /// public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null) { - var solutionContainerSystem = system.EntityManager.System(); + var solutionContainerSystem = system.EntityManager.System(); var spillableSystem = system.EntityManager.System(); var coordinates = system.EntityManager.GetComponent(owner).Coordinates; diff --git a/Content.Server/EntityEffects/Effects/AddToSolutionReaction.cs b/Content.Server/EntityEffects/Effects/AddToSolutionReaction.cs index 10fb667ca4..b5bb2a22fb 100644 --- a/Content.Server/EntityEffects/Effects/AddToSolutionReaction.cs +++ b/Content.Server/EntityEffects/Effects/AddToSolutionReaction.cs @@ -1,4 +1,4 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.EntityEffects; using JetBrains.Annotations; using Robust.Shared.Prototypes; @@ -18,7 +18,7 @@ namespace Content.Server.EntityEffects.Effects return; // TODO see if this is correct - var solutionContainerSystem = reagentArgs.EntityManager.System(); + var solutionContainerSystem = reagentArgs.EntityManager.System(); if (!solutionContainerSystem.TryGetSolution(reagentArgs.TargetEntity, _solution, out var solutionContainer)) return; diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index 98d541996f..853b4fbc29 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -1,10 +1,10 @@ using Content.Server.Administration.Logs; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Explosion.Components; using Content.Server.Flash; using Content.Server.Electrocution; using Content.Server.Pinpointer; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Flash.Components; using Content.Server.Radio.EntitySystems; using Content.Shared.Chemistry.Components; @@ -75,7 +75,7 @@ namespace Content.Server.Explosion.EntitySystems [Dependency] private readonly RadioSystem _radioSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly InventorySystem _inventory = default!; [Dependency] private readonly ElectrocutionSystem _electrocution = default!; @@ -330,7 +330,7 @@ namespace Content.Server.Explosion.EntitySystems return; _adminLogger.Add(LogType.Trigger, - $"{ToPrettyString(user.Value):user} started a {delay} second timer trigger on entity {ToPrettyString(uid):timer}, which contains {SolutionContainerSystem.ToPrettyString(solutionA)} in one beaker and {SolutionContainerSystem.ToPrettyString(solutionB)} in the other."); + $"{ToPrettyString(user.Value):user} started a {delay} second timer trigger on entity {ToPrettyString(uid):timer}, which contains {SharedSolutionContainerSystem.ToPrettyString(solutionA)} in one beaker and {SharedSolutionContainerSystem.ToPrettyString(solutionB)} in the other."); } else { diff --git a/Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs b/Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs index 52afdcf8b4..56e039a700 100644 --- a/Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs +++ b/Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs @@ -1,5 +1,4 @@ using System.Numerics; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Popups; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; @@ -26,7 +25,7 @@ public sealed class AbsorbentSystem : SharedAbsorbentSystem [Dependency] private readonly PuddleSystem _puddleSystem = default!; [Dependency] private readonly SharedMeleeWeaponSystem _melee = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly UseDelaySystem _useDelay = default!; [Dependency] private readonly MapSystem _mapSystem = default!; diff --git a/Content.Server/Fluids/EntitySystems/DrainSystem.cs b/Content.Server/Fluids/EntitySystems/DrainSystem.cs index b79685d83b..091f384986 100644 --- a/Content.Server/Fluids/EntitySystems/DrainSystem.cs +++ b/Content.Server/Fluids/EntitySystems/DrainSystem.cs @@ -1,7 +1,7 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.DoAfter; using Content.Server.Fluids.Components; using Content.Server.Popups; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Audio; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Database; @@ -25,7 +25,7 @@ namespace Content.Server.Fluids.EntitySystems; public sealed class DrainSystem : SharedDrainSystem { [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!; [Dependency] private readonly SharedAudioSystem _audioSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs index e722108e14..296b397146 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs @@ -85,7 +85,7 @@ public sealed partial class PuddleSystem var splitSolution = _solutionContainerSystem.SplitSolution(soln.Value, totalSplit / hitCount); - _adminLogger.Add(LogType.MeleeHit, $"{ToPrettyString(args.User)} splashed {SolutionContainerSystem.ToPrettyString(splitSolution):solution} from {ToPrettyString(entity.Owner):entity} onto {ToPrettyString(hit):target}"); + _adminLogger.Add(LogType.MeleeHit, $"{ToPrettyString(args.User)} splashed {SharedSolutionContainerSystem.ToPrettyString(splitSolution):solution} from {ToPrettyString(entity.Owner):entity} onto {ToPrettyString(hit):target}"); _reactive.DoEntityReaction(hit, splitSolution, ReactionMethod.Touch); _popups.PopupEntity( @@ -114,7 +114,7 @@ public sealed partial class PuddleSystem if (args.User != null) { _adminLogger.Add(LogType.Landed, - $"{ToPrettyString(entity.Owner):entity} spilled a solution {SolutionContainerSystem.ToPrettyString(solution):solution} on landing"); + $"{ToPrettyString(entity.Owner):entity} spilled a solution {SharedSolutionContainerSystem.ToPrettyString(solution):solution} on landing"); } var drainedSolution = _solutionContainerSystem.Drain(entity.Owner, soln.Value, solution.Volume); diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index 67ba2a76bb..3889be1174 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Administration.Logs; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.DoAfter; using Content.Server.Fluids.Components; using Content.Server.Spreader; @@ -51,7 +50,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedColorFlashEffectSystem _color = default!; [Dependency] private readonly SharedPopupSystem _popups = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly StepTriggerSystem _stepTrigger = default!; [Dependency] private readonly SpeedModifierContactsSystem _speedModContacts = default!; [Dependency] private readonly TileFrictionController _tile = default!; @@ -325,8 +324,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem private void OnPuddleInit(Entity entity, ref ComponentInit args) { - _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName, FixedPoint2.New(PuddleVolume), - out _); + _solutionContainerSystem.EnsureSolution(entity.Owner, entity.Comp.SolutionName, out _, FixedPoint2.New(PuddleVolume)); } private void OnSolutionUpdate(Entity entity, ref SolutionContainerChangedEvent args) @@ -580,7 +578,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem if (user != null) { _adminLogger.Add(LogType.Landed, - $"{ToPrettyString(user.Value):user} threw {ToPrettyString(uid):entity} which splashed a solution {SolutionContainerSystem.ToPrettyString(solution):solution} onto {ToPrettyString(owner):target}"); + $"{ToPrettyString(user.Value):user} threw {ToPrettyString(uid):entity} which splashed a solution {SharedSolutionContainerSystem.ToPrettyString(solution):solution} onto {ToPrettyString(owner):target}"); } targets.Add(owner); diff --git a/Content.Server/Fluids/EntitySystems/SmokeSystem.cs b/Content.Server/Fluids/EntitySystems/SmokeSystem.cs index 72450562f1..42f3a07d26 100644 --- a/Content.Server/Fluids/EntitySystems/SmokeSystem.cs +++ b/Content.Server/Fluids/EntitySystems/SmokeSystem.cs @@ -1,7 +1,6 @@ using Content.Server.Administration.Logs; using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.EntityEffects.Effects; using Content.Server.Spreader; using Content.Shared.Chemistry; @@ -44,7 +43,7 @@ public sealed class SmokeSystem : EntitySystem [Dependency] private readonly ReactiveSystem _reactive = default!; [Dependency] private readonly SharedBroadphaseSystem _broadphase = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; private EntityQuery _smokeQuery; private EntityQuery _smokeAffectedQuery; @@ -292,7 +291,7 @@ public sealed class SmokeSystem : EntitySystem if (_blood.TryAddToChemicals(entity, transferSolution, bloodstream)) { // Log solution addition by smoke - _logger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(entity):target} ingested smoke {SolutionContainerSystem.ToPrettyString(transferSolution)}"); + _logger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(entity):target} ingested smoke {SharedSolutionContainerSystem.ToPrettyString(transferSolution)}"); } } diff --git a/Content.Server/Fluids/EntitySystems/SpraySystem.cs b/Content.Server/Fluids/EntitySystems/SpraySystem.cs index 215ed7c33f..fe179be402 100644 --- a/Content.Server/Fluids/EntitySystems/SpraySystem.cs +++ b/Content.Server/Fluids/EntitySystems/SpraySystem.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Chemistry.EntitySystems; using Content.Server.Fluids.Components; using Content.Server.Gravity; @@ -9,6 +8,7 @@ using Content.Shared.Fluids; using Content.Shared.Interaction; using Content.Shared.Timing; using Content.Shared.Vapor; +using Content.Shared.Chemistry.EntitySystems; using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; using Robust.Shared.Physics.Components; @@ -25,7 +25,7 @@ public sealed class SpraySystem : EntitySystem [Dependency] private readonly UseDelaySystem _useDelay = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly VaporSystem _vapor = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; diff --git a/Content.Server/Forensics/Systems/ForensicsSystem.cs b/Content.Server/Forensics/Systems/ForensicsSystem.cs index ec311d136a..34529aba4a 100644 --- a/Content.Server/Forensics/Systems/ForensicsSystem.cs +++ b/Content.Server/Forensics/Systems/ForensicsSystem.cs @@ -1,5 +1,4 @@ using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.DoAfter; using Content.Server.Fluids.EntitySystems; using Content.Server.Forensics.Components; @@ -10,7 +9,6 @@ using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.DoAfter; -using Content.Shared.Fluids.Components; using Content.Shared.Forensics; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; @@ -28,7 +26,7 @@ namespace Content.Server.Forensics [Dependency] private readonly InventorySystem _inventory = default!; [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { diff --git a/Content.Server/Glue/GlueSystem.cs b/Content.Server/Glue/GlueSystem.cs index 79249f5bd9..6a91de4761 100644 --- a/Content.Server/Glue/GlueSystem.cs +++ b/Content.Server/Glue/GlueSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Administration.Logs; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Database; using Content.Shared.Glue; using Content.Shared.Hands; @@ -19,7 +19,7 @@ public sealed class GlueSystem : SharedGlueSystem { [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly OpenableSystem _openable = default!; diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs index c05c679f17..ab57abf2fb 100644 --- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -1,6 +1,5 @@ using Content.Server.Administration.Logs; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Construction; using Content.Server.Explosion.EntitySystems; using Content.Server.DeviceLinking.Events; @@ -58,7 +57,7 @@ namespace Content.Server.Kitchen.EntitySystems [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly ExplosionSystem _explosion = default!; [Dependency] private readonly SharedContainerSystem _container = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly TagSystem _tag = default!; [Dependency] private readonly TemperatureSystem _temperature = default!; [Dependency] private readonly UserInterfaceSystem _userInterface = default!; diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index f7e0c6fde2..71536ddf8e 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -1,8 +1,8 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Kitchen.Components; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Server.Stack; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Containers.ItemSlots; using Content.Shared.FixedPoint; @@ -29,7 +29,7 @@ namespace Content.Server.Kitchen.EntitySystems internal sealed class ReagentGrinderSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainersSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainersSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; diff --git a/Content.Server/Lube/LubeSystem.cs b/Content.Server/Lube/LubeSystem.cs index 06d6456a57..fa44234893 100644 --- a/Content.Server/Lube/LubeSystem.cs +++ b/Content.Server/Lube/LubeSystem.cs @@ -1,7 +1,5 @@ using Content.Server.Administration.Logs; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared.Database; -using Content.Shared.Glue; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Item; @@ -9,7 +7,7 @@ using Content.Shared.Lube; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Popups; using Content.Shared.Verbs; -using Robust.Shared.Audio; +using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.Audio.Systems; using Robust.Shared.Random; @@ -19,7 +17,7 @@ public sealed class LubeSystem : EntitySystem { [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly OpenableSystem _openable = default!; diff --git a/Content.Server/Medical/CryoPodSystem.cs b/Content.Server/Medical/CryoPodSystem.cs index 2c9f58616a..a1c1f1f9ce 100644 --- a/Content.Server/Medical/CryoPodSystem.cs +++ b/Content.Server/Medical/CryoPodSystem.cs @@ -5,7 +5,6 @@ using Content.Server.Atmos.Piping.Components; using Content.Server.Atmos.Piping.Unary.EntitySystems; using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Medical.Components; using Content.Server.NodeContainer; using Content.Server.NodeContainer.EntitySystems; @@ -13,6 +12,7 @@ using Content.Server.NodeContainer.NodeGroups; using Content.Server.NodeContainer.Nodes; using Content.Server.Power.Components; using Content.Server.Temperature.Components; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Atmos; using Content.Shared.UserInterface; using Content.Shared.Chemistry; @@ -44,7 +44,7 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem [Dependency] private readonly GasCanisterSystem _gasCanisterSystem = default!; [Dependency] private readonly ClimbSystem _climbSystem = default!; [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!; [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index 52d6a3fafa..cf5869d1cb 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -1,10 +1,10 @@ using Content.Server.Administration.Logs; using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Medical.Components; using Content.Server.Popups; using Content.Server.Stack; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Audio; using Content.Shared.Damage; using Content.Shared.Database; @@ -36,7 +36,7 @@ public sealed class HealingSystem : EntitySystem [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; [Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 48710d71c2..82f8075902 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -1,8 +1,8 @@ using Content.Server.Body.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Medical.Components; using Content.Server.PowerCell; using Content.Server.Temperature.Components; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Damage; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; @@ -29,7 +29,7 @@ public sealed class HealthAnalyzerSystem : EntitySystem [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; [Dependency] private readonly ItemToggleSystem _toggle = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; diff --git a/Content.Server/Medical/VomitSystem.cs b/Content.Server/Medical/VomitSystem.cs index 4cc4e538ce..5cff161e0e 100644 --- a/Content.Server/Medical/VomitSystem.cs +++ b/Content.Server/Medical/VomitSystem.cs @@ -1,10 +1,10 @@ using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Shared.Chemistry.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Server.Forensics; using Content.Server.Popups; using Content.Server.Stunnable; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using Content.Shared.IdentityManagement; diff --git a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Specific/MedibotInjectOperator.cs b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Specific/MedibotInjectOperator.cs index 01cfbd113d..2cc735194f 100644 --- a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Specific/MedibotInjectOperator.cs +++ b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Specific/MedibotInjectOperator.cs @@ -1,6 +1,6 @@ using Content.Server.Chat.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.NPC.Components; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Damage; using Content.Shared.Emag.Components; using Content.Shared.Interaction; @@ -19,7 +19,7 @@ public sealed partial class MedibotInjectOperator : HTNOperator private SharedAudioSystem _audio = default!; private SharedInteractionSystem _interaction = default!; private SharedPopupSystem _popup = default!; - private SolutionContainerSystem _solutionContainer = default!; + private SharedSolutionContainerSystem _solutionContainer = default!; /// /// Target entity to inject. @@ -35,7 +35,7 @@ public sealed partial class MedibotInjectOperator : HTNOperator _audio = sysManager.GetEntitySystem(); _interaction = sysManager.GetEntitySystem(); _popup = sysManager.GetEntitySystem(); - _solutionContainer = sysManager.GetEntitySystem(); + _solutionContainer = sysManager.GetEntitySystem(); } public override void TaskShutdown(NPCBlackboard blackboard, HTNOperatorStatus status) diff --git a/Content.Server/NPC/Systems/NPCUtilitySystem.cs b/Content.Server/NPC/Systems/NPCUtilitySystem.cs index a2fb285ac1..8dff93648b 100644 --- a/Content.Server/NPC/Systems/NPCUtilitySystem.cs +++ b/Content.Server/NPC/Systems/NPCUtilitySystem.cs @@ -1,4 +1,3 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Server.NPC.Queries; using Content.Server.NPC.Queries.Considerations; @@ -7,6 +6,7 @@ using Content.Server.NPC.Queries.Queries; using Content.Server.Nutrition.Components; using Content.Server.Nutrition.EntitySystems; using Content.Server.Storage.Components; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Damage; using Content.Shared.Examine; using Content.Shared.Fluids.Components; @@ -47,7 +47,7 @@ public sealed class NPCUtilitySystem : EntitySystem [Dependency] private readonly OpenableSystem _openable = default!; [Dependency] private readonly PuddleSystem _puddle = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly SolutionContainerSystem _solutions = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutions = default!; [Dependency] private readonly WeldableSystem _weldable = default!; [Dependency] private readonly ExamineSystemShared _examine = default!; [Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!; diff --git a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs index 19ed48ec49..a38e363603 100644 --- a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs @@ -1,4 +1,3 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Explosion.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Server.Nutrition.Components; @@ -11,6 +10,7 @@ using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Rejuvenate; using Content.Shared.Throwing; +using Content.Shared.Chemistry.EntitySystems; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -21,7 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems [UsedImplicitly] public sealed class CreamPieSystem : SharedCreamPieSystem { - [Dependency] private readonly SolutionContainerSystem _solutions = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutions = default!; [Dependency] private readonly PuddleSystem _puddle = default!; [Dependency] private readonly ItemSlotsSystem _itemSlots = default!; [Dependency] private readonly TriggerSystem _trigger = default!; diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index ab4ce450d8..f04d79b47d 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -1,6 +1,5 @@ using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.EntityEffects.Effects; using Content.Server.Fluids.EntitySystems; using Content.Server.Forensics; @@ -51,7 +50,7 @@ public sealed class DrinkSystem : SharedDrinkSystem [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly StomachSystem _stomach = default!; [Dependency] private readonly ForensicsSystem _forensics = default!; @@ -129,7 +128,7 @@ public sealed class DrinkSystem : SharedDrinkSystem } else { - _solutionContainer.EnsureSolution(entity.Owner, entity.Comp.Solution); + _solutionContainer.EnsureSolution(entity.Owner, entity.Comp.Solution, out _); } UpdateAppearance(entity, entity.Comp); @@ -193,12 +192,12 @@ public sealed class DrinkSystem : SharedDrinkSystem _popup.PopupEntity(Loc.GetString("drink-component-force-feed", ("user", userName)), user, target); // logging - _adminLogger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user):user} is forcing {ToPrettyString(target):target} to drink {ToPrettyString(item):drink} {SolutionContainerSystem.ToPrettyString(drinkSolution)}"); + _adminLogger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user):user} is forcing {ToPrettyString(target):target} to drink {ToPrettyString(item):drink} {SharedSolutionContainerSystem.ToPrettyString(drinkSolution)}"); } else { // log voluntary drinking - _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(target):target} is drinking {ToPrettyString(item):drink} {SolutionContainerSystem.ToPrettyString(drinkSolution)}"); + _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(target):target} is drinking {ToPrettyString(item):drink} {SharedSolutionContainerSystem.ToPrettyString(drinkSolution)}"); } var flavors = _flavorProfile.GetLocalizedFlavorsMessage(user, drinkSolution); diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 3a7c249c2b..0bb4244f1a 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Administration.Logs; using Content.Shared.Body.Components; using Content.Shared.Body.Organ; using Content.Shared.Chemistry; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs index 318a53a0b7..5684cef3f4 100644 --- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs @@ -1,6 +1,6 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.DoAfter; using Content.Server.Nutrition.Components; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Nutrition; using Content.Shared.Nutrition.Components; using Content.Shared.Chemistry.Components; @@ -19,7 +19,7 @@ namespace Content.Server.Nutrition.EntitySystems; public sealed class SliceableFoodSystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly TransformSystem _transform = default!; [Dependency] private readonly DoAfterSystem _doAfter = default!; @@ -169,7 +169,7 @@ public sealed class SliceableFoodSystem : EntitySystem private void OnComponentStartup(Entity entity, ref ComponentStartup args) { var foodComp = EnsureComp(entity); - _solutionContainer.EnsureSolution(entity.Owner, foodComp.Solution); + _solutionContainer.EnsureSolution(entity.Owner, foodComp.Solution, out _); } } diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs index 7f8253efed..0d637139d8 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; using Content.Server.Body.Systems; -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Server.Forensics; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Reagent; @@ -23,7 +23,7 @@ namespace Content.Server.Nutrition.EntitySystems public sealed partial class SmokingSystem : EntitySystem { [Dependency] private readonly ReactiveSystem _reactiveSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!; [Dependency] private readonly AtmosphereSystem _atmos = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; diff --git a/Content.Server/Nutrition/EntitySystems/TrashOnSolutionEmptySystem.cs b/Content.Server/Nutrition/EntitySystems/TrashOnSolutionEmptySystem.cs index f18e3dcc13..b2e12036f9 100644 --- a/Content.Server/Nutrition/EntitySystems/TrashOnSolutionEmptySystem.cs +++ b/Content.Server/Nutrition/EntitySystems/TrashOnSolutionEmptySystem.cs @@ -1,4 +1,3 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Nutrition.Components; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; @@ -9,7 +8,7 @@ namespace Content.Server.Nutrition.EntitySystems { public sealed class TrashOnSolutionEmptySystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly TagSystem _tagSystem = default!; public override void Initialize() diff --git a/Content.Server/Payload/EntitySystems/PayloadSystem.cs b/Content.Server/Payload/EntitySystems/PayloadSystem.cs index 15966956d4..f5159bf223 100644 --- a/Content.Server/Payload/EntitySystems/PayloadSystem.cs +++ b/Content.Server/Payload/EntitySystems/PayloadSystem.cs @@ -1,11 +1,11 @@ using Content.Server.Administration.Logs; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Explosion.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Database; using Content.Shared.Examine; using Content.Shared.Payload.Components; using Content.Shared.Tag; +using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.Containers; using Robust.Shared.Serialization.Manager; using Robust.Shared.Utility; @@ -17,7 +17,7 @@ namespace Content.Server.Payload.EntitySystems; public sealed class PayloadSystem : EntitySystem { [Dependency] private readonly TagSystem _tagSystem = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly TransformSystem _transform = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly IComponentFactory _componentFactory = default!; @@ -156,8 +156,8 @@ public sealed class PayloadSystem : EntitySystem return; } - var solStringA = SolutionContainerSystem.ToPrettyString(solutionA); - var solStringB = SolutionContainerSystem.ToPrettyString(solutionB); + var solStringA = SharedSolutionContainerSystem.ToPrettyString(solutionA); + var solStringB = SharedSolutionContainerSystem.ToPrettyString(solutionB); _adminLogger.Add(LogType.ChemicalReaction, $"Chemical bomb payload {ToPrettyString(entity.Owner):payload} at {_transform.GetMapCoordinates(entity.Owner):location} is combining two solutions: {solStringA:solutionA} and {solStringB:solutionB}"); diff --git a/Content.Server/Power/Generator/GeneratorSystem.cs b/Content.Server/Power/Generator/GeneratorSystem.cs index a75d1e4113..72b99d59af 100644 --- a/Content.Server/Power/Generator/GeneratorSystem.cs +++ b/Content.Server/Power/Generator/GeneratorSystem.cs @@ -1,11 +1,11 @@ using System.Linq; using Content.Server.Audio; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Fluids.EntitySystems; using Content.Server.Materials; using Content.Server.Popups; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.FixedPoint; using Content.Shared.Popups; using Content.Shared.Power.Generator; @@ -22,7 +22,7 @@ public sealed class GeneratorSystem : SharedGeneratorSystem [Dependency] private readonly AppearanceSystem _appearance = default!; [Dependency] private readonly AmbientSoundSystem _ambientSound = default!; [Dependency] private readonly MaterialStorageSystem _materialStorage = default!; - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly PuddleSystem _puddle = default!; diff --git a/Content.Server/Weapons/Ranged/Systems/ChemicalAmmoSystem.cs b/Content.Server/Weapons/Ranged/Systems/ChemicalAmmoSystem.cs index e896e2b373..089ef23a14 100644 --- a/Content.Server/Weapons/Ranged/Systems/ChemicalAmmoSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/ChemicalAmmoSystem.cs @@ -1,14 +1,14 @@ -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Weapons.Ranged.Components; using Content.Shared.Chemistry.Components; using Content.Shared.Weapons.Ranged.Events; +using Content.Shared.Chemistry.EntitySystems; using System.Linq; namespace Content.Server.Weapons.Ranged.Systems { public sealed class ChemicalAmmoSystem : EntitySystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; public override void Initialize() { diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.Solution.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.Solution.cs index 7ad4b15ffc..cc36132e8e 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.Solution.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.Solution.cs @@ -1,5 +1,4 @@ using Content.Server.Chemistry.Components; -using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.FixedPoint; @@ -12,7 +11,7 @@ namespace Content.Server.Weapons.Ranged.Systems; public sealed partial class GunSystem { - [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; protected override void InitializeSolution() {