From 6869adfa7883ee2d4176fda91d7a4c1371fa7026 Mon Sep 17 00:00:00 2001 From: Jezithyr Date: Tue, 30 Apr 2024 14:31:05 -0700 Subject: [PATCH] Move GasMixture to shared (#27480) * Moved GasMixture to shared * Temp Fix for sandbox violation, idk why Array.Resize isn't working properly. It's already sandboxed. * The most powerful webedit in history --- .../Components/GasMixtureHolderComponent.cs | 4 +++- .../Atmos/Components/MapAtmosphereComponent.cs | 1 + .../Atmos/EntitySystems/AtmosExposedSystem.cs | 1 + .../Atmos/EntitySystems/AtmosphereSystem.API.cs | 2 +- .../EntitySystems/AtmosphereSystem.Gases.cs | 1 + .../AtmosphereSystem.GridAtmosphere.cs | 1 + .../EntitySystems/AtmosphereSystem.Hotspot.cs | 1 + .../Atmos/EntitySystems/AtmosphereSystem.Map.cs | 1 + Content.Server/Atmos/IGasMixtureHolder.cs | 4 +++- Content.Server/Atmos/IGasReactionEffect.cs | 3 ++- .../Piping/Binary/Components/GasPortComponent.cs | 2 ++ .../Atmos/Portable/PortableScrubberSystem.cs | 1 + .../Atmos/Reactions/AmmoniaOxygenReaction.cs | 1 + .../Atmos/Reactions/FrezonCoolantReaction.cs | 1 + .../Atmos/Reactions/FrezonProductionReaction.cs | 1 + .../Atmos/Reactions/GasReactionPrototype.cs | 14 +------------- .../Atmos/Reactions/N2ODecompositionReaction.cs | 1 + .../Atmos/Reactions/PlasmaFireReaction.cs | 1 + .../Atmos/Reactions/TritiumFireReaction.cs | 1 + .../Atmos/Reactions/WaterVaporReaction.cs | 2 ++ .../TileAtmosCollectionSerializer.cs | 1 + Content.Server/Atmos/TileMixtureEnumerator.cs | 1 + .../Botany/Systems/PlantHolderSystem.cs | 1 + .../Thresholds/Behaviors/SpawnGasBehavior.cs | 1 + .../Unit/Components/DisposalHolderComponent.cs | 1 + Content.Server/Lathe/LatheSystem.cs | 1 + .../Mech/Components/MechAirComponent.cs | 1 + Content.Server/Medical/CryoPodSystem.cs | 1 + .../EntitySystems/SmokingSystem.Vape.cs | 1 + Content.Server/Power/Generation/Teg/TegSystem.cs | 1 + .../Power/Generator/GeneratorExhaustGasSystem.cs | 1 + .../Storage/Components/EntityStorageComponent.cs | 1 + .../Effects/Systems/GasArtifactSystem.cs | 1 + .../Effects/Systems/TemperatureArtifactSystem.cs | 1 + .../Atmos/GasMixture.cs | 5 ++--- .../Atmos/GasMixtureStringRepresentation.cs | 16 ++++++++++++++++ .../Atmos/Reactions/GasReactionEnums.cs | 14 ++++++++++++++ 37 files changed, 73 insertions(+), 20 deletions(-) rename {Content.Server => Content.Shared}/Atmos/GasMixture.cs (98%) create mode 100644 Content.Shared/Atmos/GasMixtureStringRepresentation.cs create mode 100644 Content.Shared/Atmos/Reactions/GasReactionEnums.cs diff --git a/Content.Server/Atmos/Components/GasMixtureHolderComponent.cs b/Content.Server/Atmos/Components/GasMixtureHolderComponent.cs index 9d533f6ec4..98feb43346 100644 --- a/Content.Server/Atmos/Components/GasMixtureHolderComponent.cs +++ b/Content.Server/Atmos/Components/GasMixtureHolderComponent.cs @@ -1,4 +1,6 @@ -namespace Content.Server.Atmos.Components +using Content.Shared.Atmos; + +namespace Content.Server.Atmos.Components { [RegisterComponent] public sealed partial class GasMixtureHolderComponent : Component, IGasMixtureHolder diff --git a/Content.Server/Atmos/Components/MapAtmosphereComponent.cs b/Content.Server/Atmos/Components/MapAtmosphereComponent.cs index 6bdef901d4..bdd05e7849 100644 --- a/Content.Server/Atmos/Components/MapAtmosphereComponent.cs +++ b/Content.Server/Atmos/Components/MapAtmosphereComponent.cs @@ -1,3 +1,4 @@ +using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.EntitySystems; diff --git a/Content.Server/Atmos/EntitySystems/AtmosExposedSystem.cs b/Content.Server/Atmos/EntitySystems/AtmosExposedSystem.cs index 9590b9aa54..39469e993f 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosExposedSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosExposedSystem.cs @@ -1,3 +1,4 @@ +using Content.Shared.Atmos; using Robust.Shared.Map; namespace Content.Server.Atmos.EntitySystems diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs index 614d550c2f..df31db6ba0 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs @@ -1,10 +1,10 @@ using System.Linq; using Content.Server.Atmos.Components; using Content.Server.Atmos.Piping.Components; -using Content.Server.Atmos.Reactions; using Content.Server.NodeContainer.NodeGroups; using Content.Shared.Atmos; using Content.Shared.Atmos.Components; +using Content.Shared.Atmos.Reactions; using Robust.Shared.Map.Components; using Robust.Shared.Utility; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs index f8ee4f4192..70c4639e48 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Runtime.CompilerServices; using Content.Server.Atmos.Reactions; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using Robust.Shared.Prototypes; using DependencyAttribute = Robust.Shared.IoC.DependencyAttribute; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs index 4b9ef49a40..3830745f68 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.Reactions; using Content.Shared.Atmos; using Content.Shared.Atmos.Components; +using Content.Shared.Atmos.Reactions; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Utility; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs index 7163b4cd44..db95223733 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.Reactions; using Content.Shared.Atmos; using Content.Shared.Atmos.Components; +using Content.Shared.Atmos.Reactions; using Content.Shared.Audio; using Content.Shared.Database; using Robust.Shared.Audio; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs index 25b3b801f7..4b77d9c70d 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs @@ -1,4 +1,5 @@ using Content.Server.Atmos.Components; +using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Robust.Shared.GameStates; using Robust.Shared.Map.Components; diff --git a/Content.Server/Atmos/IGasMixtureHolder.cs b/Content.Server/Atmos/IGasMixtureHolder.cs index 96efa6b983..65d7ba69a7 100644 --- a/Content.Server/Atmos/IGasMixtureHolder.cs +++ b/Content.Server/Atmos/IGasMixtureHolder.cs @@ -1,4 +1,6 @@ -namespace Content.Server.Atmos +using Content.Shared.Atmos; + +namespace Content.Server.Atmos { public interface IGasMixtureHolder { diff --git a/Content.Server/Atmos/IGasReactionEffect.cs b/Content.Server/Atmos/IGasReactionEffect.cs index bd229694bb..9fc9231908 100644 --- a/Content.Server/Atmos/IGasReactionEffect.cs +++ b/Content.Server/Atmos/IGasReactionEffect.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; -using Content.Server.Atmos.Reactions; +using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; namespace Content.Server.Atmos { diff --git a/Content.Server/Atmos/Piping/Binary/Components/GasPortComponent.cs b/Content.Server/Atmos/Piping/Binary/Components/GasPortComponent.cs index fb7ee6d5cf..315362383c 100644 --- a/Content.Server/Atmos/Piping/Binary/Components/GasPortComponent.cs +++ b/Content.Server/Atmos/Piping/Binary/Components/GasPortComponent.cs @@ -1,3 +1,5 @@ +using Content.Shared.Atmos; + namespace Content.Server.Atmos.Piping.Binary.Components { [RegisterComponent] diff --git a/Content.Server/Atmos/Portable/PortableScrubberSystem.cs b/Content.Server/Atmos/Portable/PortableScrubberSystem.cs index 91ee588057..bc5db2e22c 100644 --- a/Content.Server/Atmos/Portable/PortableScrubberSystem.cs +++ b/Content.Server/Atmos/Portable/PortableScrubberSystem.cs @@ -13,6 +13,7 @@ using Content.Server.NodeContainer.NodeGroups; using Content.Server.Audio; using Content.Server.Administration.Logs; using Content.Server.NodeContainer.EntitySystems; +using Content.Shared.Atmos; using Content.Shared.Database; namespace Content.Server.Atmos.Portable diff --git a/Content.Server/Atmos/Reactions/AmmoniaOxygenReaction.cs b/Content.Server/Atmos/Reactions/AmmoniaOxygenReaction.cs index 197034ce54..2c071afab1 100644 --- a/Content.Server/Atmos/Reactions/AmmoniaOxygenReaction.cs +++ b/Content.Server/Atmos/Reactions/AmmoniaOxygenReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions; diff --git a/Content.Server/Atmos/Reactions/FrezonCoolantReaction.cs b/Content.Server/Atmos/Reactions/FrezonCoolantReaction.cs index 051ee8202d..475c149cf3 100644 --- a/Content.Server/Atmos/Reactions/FrezonCoolantReaction.cs +++ b/Content.Server/Atmos/Reactions/FrezonCoolantReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions; diff --git a/Content.Server/Atmos/Reactions/FrezonProductionReaction.cs b/Content.Server/Atmos/Reactions/FrezonProductionReaction.cs index 4ffd9c2f5b..e3d3ece6b6 100644 --- a/Content.Server/Atmos/Reactions/FrezonProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/FrezonProductionReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions; diff --git a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs index 0ee29de3bf..48a113bb9a 100644 --- a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs +++ b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs @@ -1,22 +1,10 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using Robust.Shared.Prototypes; namespace Content.Server.Atmos.Reactions { - [Flags] - public enum ReactionResult : byte - { - NoReaction = 0, - Reacting = 1, - StopReactions = 2, - } - - public enum GasReaction : byte - { - Fire = 0, - } - [Prototype("gasReaction")] public sealed partial class GasReactionPrototype : IPrototype { diff --git a/Content.Server/Atmos/Reactions/N2ODecompositionReaction.cs b/Content.Server/Atmos/Reactions/N2ODecompositionReaction.cs index 7fce663dc3..367c0eb7b9 100644 --- a/Content.Server/Atmos/Reactions/N2ODecompositionReaction.cs +++ b/Content.Server/Atmos/Reactions/N2ODecompositionReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions; diff --git a/Content.Server/Atmos/Reactions/PlasmaFireReaction.cs b/Content.Server/Atmos/Reactions/PlasmaFireReaction.cs index e7ab7835fd..98d567d4ed 100644 --- a/Content.Server/Atmos/Reactions/PlasmaFireReaction.cs +++ b/Content.Server/Atmos/Reactions/PlasmaFireReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions diff --git a/Content.Server/Atmos/Reactions/TritiumFireReaction.cs b/Content.Server/Atmos/Reactions/TritiumFireReaction.cs index 7103859a90..3ad0a4b04d 100644 --- a/Content.Server/Atmos/Reactions/TritiumFireReaction.cs +++ b/Content.Server/Atmos/Reactions/TritiumFireReaction.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using JetBrains.Annotations; namespace Content.Server.Atmos.Reactions diff --git a/Content.Server/Atmos/Reactions/WaterVaporReaction.cs b/Content.Server/Atmos/Reactions/WaterVaporReaction.cs index 8db8fdbd66..e06c4b75ff 100644 --- a/Content.Server/Atmos/Reactions/WaterVaporReaction.cs +++ b/Content.Server/Atmos/Reactions/WaterVaporReaction.cs @@ -1,5 +1,7 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Fluids.EntitySystems; +using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; using Content.Shared.Chemistry.Components; using Content.Shared.FixedPoint; using Content.Shared.Maps; diff --git a/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs b/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs index 00be83e86d..5b30d65e48 100644 --- a/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs +++ b/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs @@ -1,4 +1,5 @@ using System.Globalization; +using Content.Shared.Atmos; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Markdown; diff --git a/Content.Server/Atmos/TileMixtureEnumerator.cs b/Content.Server/Atmos/TileMixtureEnumerator.cs index 20440032da..5601615f50 100644 --- a/Content.Server/Atmos/TileMixtureEnumerator.cs +++ b/Content.Server/Atmos/TileMixtureEnumerator.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using Content.Shared.Atmos; namespace Content.Server.Atmos; diff --git a/Content.Server/Botany/Systems/PlantHolderSystem.cs b/Content.Server/Botany/Systems/PlantHolderSystem.cs index 721536a7c0..c8842e1493 100644 --- a/Content.Server/Botany/Systems/PlantHolderSystem.cs +++ b/Content.Server/Botany/Systems/PlantHolderSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Fluids.Components; using Content.Server.Ghost.Roles.Components; using Content.Server.Kitchen.Components; using Content.Server.Popups; +using Content.Shared.Atmos; using Content.Shared.Botany; using Content.Shared.Burial.Components; using Content.Shared.Chemistry.Reagent; diff --git a/Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs b/Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs index fec93a87f4..81fb07ecfc 100644 --- a/Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs +++ b/Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs @@ -1,4 +1,5 @@ using Content.Server.Atmos; +using Content.Shared.Atmos; using JetBrains.Annotations; namespace Content.Server.Destructible.Thresholds.Behaviors; diff --git a/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs b/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs index 3df2182b41..690b33968b 100644 --- a/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs +++ b/Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos; using Content.Server.Disposal.Tube.Components; +using Content.Shared.Atmos; using Robust.Shared.Containers; namespace Content.Server.Disposal.Unit.Components diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs index f56737a5a5..2b3b810fba 100644 --- a/Content.Server/Lathe/LatheSystem.cs +++ b/Content.Server/Lathe/LatheSystem.cs @@ -8,6 +8,7 @@ using Content.Server.Materials; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Server.Stack; +using Content.Shared.Atmos; using Content.Shared.UserInterface; using Content.Shared.Database; using Content.Shared.Emag.Components; diff --git a/Content.Server/Mech/Components/MechAirComponent.cs b/Content.Server/Mech/Components/MechAirComponent.cs index c533b3d834..d312e1b739 100644 --- a/Content.Server/Mech/Components/MechAirComponent.cs +++ b/Content.Server/Mech/Components/MechAirComponent.cs @@ -1,4 +1,5 @@ using Content.Server.Atmos; +using Content.Shared.Atmos; namespace Content.Server.Mech.Components; diff --git a/Content.Server/Medical/CryoPodSystem.cs b/Content.Server/Medical/CryoPodSystem.cs index 71921f44fd..8d54fc6dd9 100644 --- a/Content.Server/Medical/CryoPodSystem.cs +++ b/Content.Server/Medical/CryoPodSystem.cs @@ -13,6 +13,7 @@ using Content.Server.NodeContainer.NodeGroups; using Content.Server.NodeContainer.Nodes; using Content.Server.Power.Components; using Content.Server.Temperature.Components; +using Content.Shared.Atmos; using Content.Shared.UserInterface; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs index fb56dffac9..f7650f599b 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs @@ -13,6 +13,7 @@ using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Nutrition; using System.Threading; +using Content.Shared.Atmos; /// /// System for vapes diff --git a/Content.Server/Power/Generation/Teg/TegSystem.cs b/Content.Server/Power/Generation/Teg/TegSystem.cs index 3510a3da45..540bd6c483 100644 --- a/Content.Server/Power/Generation/Teg/TegSystem.cs +++ b/Content.Server/Power/Generation/Teg/TegSystem.cs @@ -7,6 +7,7 @@ using Content.Server.DeviceNetwork.Systems; using Content.Server.NodeContainer; using Content.Server.NodeContainer.Nodes; using Content.Server.Power.Components; +using Content.Shared.Atmos; using Content.Shared.DeviceNetwork; using Content.Shared.Examine; using Content.Shared.Power.Generation.Teg; diff --git a/Content.Server/Power/Generator/GeneratorExhaustGasSystem.cs b/Content.Server/Power/Generator/GeneratorExhaustGasSystem.cs index cd85e67221..359c31d75b 100644 --- a/Content.Server/Power/Generator/GeneratorExhaustGasSystem.cs +++ b/Content.Server/Power/Generator/GeneratorExhaustGasSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos; using Content.Server.Atmos.EntitySystems; +using Content.Shared.Atmos; using Content.Shared.Power.Generator; namespace Content.Server.Power.Generator; diff --git a/Content.Server/Storage/Components/EntityStorageComponent.cs b/Content.Server/Storage/Components/EntityStorageComponent.cs index 40fdb1b326..3fba89b64a 100644 --- a/Content.Server/Storage/Components/EntityStorageComponent.cs +++ b/Content.Server/Storage/Components/EntityStorageComponent.cs @@ -1,4 +1,5 @@ using Content.Server.Atmos; +using Content.Shared.Atmos; using Content.Shared.Storage.Components; using Robust.Shared.GameStates; diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/GasArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/GasArtifactSystem.cs index e24d31a113..dc054d2318 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/GasArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/GasArtifactSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Content.Shared.Atmos; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems; diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/TemperatureArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/TemperatureArtifactSystem.cs index f314d4a4fb..e62ce36b5b 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/TemperatureArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/TemperatureArtifactSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Content.Shared.Atmos; using Robust.Server.GameObjects; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems; diff --git a/Content.Server/Atmos/GasMixture.cs b/Content.Shared/Atmos/GasMixture.cs similarity index 98% rename from Content.Server/Atmos/GasMixture.cs rename to Content.Shared/Atmos/GasMixture.cs index 3d73a4d0b1..a676ed6720 100644 --- a/Content.Server/Atmos/GasMixture.cs +++ b/Content.Shared/Atmos/GasMixture.cs @@ -1,13 +1,12 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.CompilerServices; -using Content.Server.Atmos.Reactions; -using Content.Shared.Atmos; using Content.Shared.Atmos.EntitySystems; +using Content.Shared.Atmos.Reactions; using Robust.Shared.Serialization; using Robust.Shared.Utility; -namespace Content.Server.Atmos +namespace Content.Shared.Atmos { /// /// A general-purpose, variable volume gas mixture. diff --git a/Content.Shared/Atmos/GasMixtureStringRepresentation.cs b/Content.Shared/Atmos/GasMixtureStringRepresentation.cs new file mode 100644 index 0000000000..942b2bdc67 --- /dev/null +++ b/Content.Shared/Atmos/GasMixtureStringRepresentation.cs @@ -0,0 +1,16 @@ +namespace Content.Shared.Atmos; + +public readonly record struct GasMixtureStringRepresentation(float TotalMoles, float Temperature, float Pressure, Dictionary MolesPerGas) : IFormattable +{ + public override string ToString() + { + return $"{Temperature}K {Pressure} kPa"; + } + + public string ToString(string? format, IFormatProvider? formatProvider) + { + return ToString(); + } + + public static implicit operator string(GasMixtureStringRepresentation rep) => rep.ToString(); +} diff --git a/Content.Shared/Atmos/Reactions/GasReactionEnums.cs b/Content.Shared/Atmos/Reactions/GasReactionEnums.cs new file mode 100644 index 0000000000..73b8998d40 --- /dev/null +++ b/Content.Shared/Atmos/Reactions/GasReactionEnums.cs @@ -0,0 +1,14 @@ +namespace Content.Shared.Atmos.Reactions; + +[Flags] +public enum ReactionResult : byte +{ + NoReaction = 0, + Reacting = 1, + StopReactions = 2, +} + +public enum GasReaction : byte +{ + Fire = 0, +} -- 2.52.0