]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Move GasMixture to shared (#27480)
authorJezithyr <jezithyr@gmail.com>
Tue, 30 Apr 2024 21:31:05 +0000 (14:31 -0700)
committerGitHub <noreply@github.com>
Tue, 30 Apr 2024 21:31:05 +0000 (14:31 -0700)
* 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

37 files changed:
Content.Server/Atmos/Components/GasMixtureHolderComponent.cs
Content.Server/Atmos/Components/MapAtmosphereComponent.cs
Content.Server/Atmos/EntitySystems/AtmosExposedSystem.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Map.cs
Content.Server/Atmos/IGasMixtureHolder.cs
Content.Server/Atmos/IGasReactionEffect.cs
Content.Server/Atmos/Piping/Binary/Components/GasPortComponent.cs
Content.Server/Atmos/Portable/PortableScrubberSystem.cs
Content.Server/Atmos/Reactions/AmmoniaOxygenReaction.cs
Content.Server/Atmos/Reactions/FrezonCoolantReaction.cs
Content.Server/Atmos/Reactions/FrezonProductionReaction.cs
Content.Server/Atmos/Reactions/GasReactionPrototype.cs
Content.Server/Atmos/Reactions/N2ODecompositionReaction.cs
Content.Server/Atmos/Reactions/PlasmaFireReaction.cs
Content.Server/Atmos/Reactions/TritiumFireReaction.cs
Content.Server/Atmos/Reactions/WaterVaporReaction.cs
Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs
Content.Server/Atmos/TileMixtureEnumerator.cs
Content.Server/Botany/Systems/PlantHolderSystem.cs
Content.Server/Destructible/Thresholds/Behaviors/SpawnGasBehavior.cs
Content.Server/Disposal/Unit/Components/DisposalHolderComponent.cs
Content.Server/Lathe/LatheSystem.cs
Content.Server/Mech/Components/MechAirComponent.cs
Content.Server/Medical/CryoPodSystem.cs
Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs
Content.Server/Power/Generation/Teg/TegSystem.cs
Content.Server/Power/Generator/GeneratorExhaustGasSystem.cs
Content.Server/Storage/Components/EntityStorageComponent.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/GasArtifactSystem.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/TemperatureArtifactSystem.cs
Content.Shared/Atmos/GasMixture.cs [moved from Content.Server/Atmos/GasMixture.cs with 98% similarity]
Content.Shared/Atmos/GasMixtureStringRepresentation.cs [new file with mode: 0644]
Content.Shared/Atmos/Reactions/GasReactionEnums.cs [new file with mode: 0644]

index 9d533f6ec4d220264392676072c5dcc6ad4d98d0..98feb4334681615e04742fc1f0e5c10c1efdf3f8 100644 (file)
@@ -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
index 6bdef901d448607ef7a43c79e14c647be6a5aa5b..bdd05e78494b18b34130412027c4dbcbe63a5017 100644 (file)
@@ -1,3 +1,4 @@
+using Content.Shared.Atmos;
 using Content.Shared.Atmos.Components;
 using Content.Shared.Atmos.EntitySystems;
 
index 9590b9aa5486ed095ccfe64cf79c46e1da685088..39469e993f0732080f54a9ce89064f321c4410dc 100644 (file)
@@ -1,3 +1,4 @@
+using Content.Shared.Atmos;
 using Robust.Shared.Map;
 
 namespace Content.Server.Atmos.EntitySystems
index 614d550c2f71b2595fcc48632897f63b8bbd3f91..df31db6ba07faf60255e1e32530b762704483bb4 100644 (file)
@@ -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;
 
index f8ee4f419232194a10f26b5fa72863c5daa5b809..70c4639e481e75064bbd0fb013ab83b004b0b0bc 100644 (file)
@@ -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;
 
index 4b9ef49a406fe5e0ac404ce4de699053f38ed9cb..3830745f68ce9fe56fc95e26f83938b136ebcf0a 100644 (file)
@@ -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;
index 7163b4cd44c33c9463bc9822767ca3c5c404e4d7..db952237338f79e86e88572be49f88ef6700a34a 100644 (file)
@@ -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;
index 25b3b801f76cba5ec93bdd4cbecb4b0f1998dd04..4b77d9c70da2b0a1e99698b6c70140eaaa562edf 100644 (file)
@@ -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;
index 96efa6b98362ab5eb98990db36ae9a0face54afd..65d7ba69a766768a690b6c19d954f549e71d64ce 100644 (file)
@@ -1,4 +1,6 @@
-namespace Content.Server.Atmos
+using Content.Shared.Atmos;
+
+namespace Content.Server.Atmos
 {
     public interface IGasMixtureHolder
     {
index bd229694bb177841294030272dc8204aa779be2b..9fc9231908c2c13e9e13fa448cec32f510652edc 100644 (file)
@@ -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
 {
index fb7ee6d5cf9d03f93222743a035cd60fabab191c..315362383c3c92703b23f2f6457fe42194c1643e 100644 (file)
@@ -1,3 +1,5 @@
+using Content.Shared.Atmos;
+
 namespace Content.Server.Atmos.Piping.Binary.Components
 {
     [RegisterComponent]
index 91ee588057407cc48021e81a619c1e57976a713a..bc5db2e22cbf0afbdf835cf76483508851a2130a 100644 (file)
@@ -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
index 197034ce5457f17086e61c39053e3ec66ba5e5cf..2c071afab1e9d534731ddc7899c4da5bad48b7fe 100644 (file)
@@ -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;
index 051ee8202db2fceb52eb03b0d81c2ff1f98c5efa..475c149cf373bf9555e7cb67c654884f49c8b4af 100644 (file)
@@ -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;
index 4ffd9c2f5b3e9a690ada0482d39950e13f812878..e3d3ece6b6afaad6cf05f6158e8d66a8c11af89f 100644 (file)
@@ -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;
index 0ee29de3bf196fb7178d0496d8c2fdec310f94ef..48a113bb9a2e5704ab17d311ff190c2639b908d9 100644 (file)
@@ -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
     {
index 7fce663dc31e6666c841295c6f1202304993dc95..367c0eb7b9cff4d059d67ab77848a5781f5b2184 100644 (file)
@@ -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;
index e7ab7835fd9ccd4d90594acfe673acc3ec9cae3c..98d567d4ed52b86e6f8436a784fed2cd2932e1a4 100644 (file)
@@ -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
index 7103859a90ff2c32370b8832e2fc21bc9cdb8822..3ad0a4b04de123e112cefc2dbf9c4fa1c0e249eb 100644 (file)
@@ -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
index 8db8fdbd66d135b51e9a1304703f57e0c9370209..e06c4b75ff9394fb2f88722ad87eb1a85ea558b7 100644 (file)
@@ -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;
index 00be83e86d941dd2d7004e46c0a4051527be2420..5b30d65e48e9cafa83ea325c502887eea0dbdc10 100644 (file)
@@ -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;
index 20440032dab5ac398372589a3a1848a960dddd82..5601615f5090ee6d3d33d0455f16d410ca0915c8 100644 (file)
@@ -1,4 +1,5 @@
 using System.Diagnostics.CodeAnalysis;
+using Content.Shared.Atmos;
 
 namespace Content.Server.Atmos;
 
index 721536a7c077e33ddc990fb693b7582b6c528e5a..c8842e149398524dee6c773bed9ce30b1f8df1ce 100644 (file)
@@ -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;
index fec93a87f4526a306eb7a30ee603dcc2aa55830c..81fb07ecfc915c03674243767e16d951a2bbd510 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Atmos;
+using Content.Shared.Atmos;
 using JetBrains.Annotations;
 
 namespace Content.Server.Destructible.Thresholds.Behaviors;
index 3df2182b41e56a04138b843c62c1c295d011b39f..690b33968b0f3a07369d929f9f390e1a24e5839b 100644 (file)
@@ -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
index f56737a5a5f4084aeef663588dc0ab4bda01c8c8..2b3b810fba7ae9c572faf9252b847409c13dfcd5 100644 (file)
@@ -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;
index c533b3d8343d6b5da0abe957ee6ea403b830e31a..d312e1b739946653adfdb9141d618dde1b389d2c 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Atmos;
+using Content.Shared.Atmos;
 
 namespace Content.Server.Mech.Components;
 
index 71921f44fda20fcb48ac549f3b3cc10f001f47a6..8d54fc6dd951d0a36eae3fc1c9f81cd92669a14e 100644 (file)
@@ -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;
index fb56dffac96229b5edfd85fda689493c4525543a..f7650f599b4c6129fb4b333bb6b2b9a3ffced2bd 100644 (file)
@@ -13,6 +13,7 @@ using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
 using Content.Shared.Nutrition;
 using System.Threading;
+using Content.Shared.Atmos;
 
 /// <summary>
 /// System for vapes
index 3510a3da45de7f89bc3c13b44d1b509db183415b..540bd6c4832ac811bd9fb8c4729bc56d4bec3cea 100644 (file)
@@ -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;
index cd85e67221c82b90922abee4e01f6570b57fbaa2..359c31d75bb1c29698676678daf0da25002d9147 100644 (file)
@@ -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;
index 40fdb1b32619cf57cb1ca1c47fa48c422525933d..3fba89b64ab4cd369dfd30d851b0597770074b17 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Atmos;
+using Content.Shared.Atmos;
 using Content.Shared.Storage.Components;
 using Robust.Shared.GameStates;
 
index e24d31a113589d7f61ed30c666b2a0e398831e82..dc054d231824d75a4c13535f56b7af9ed4b7453d 100644 (file)
@@ -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;
 
index f314d4a4fb247c5383b54b0ecc69f4fee964a98d..e62ce36b5b9c45b17fbdf09b869511d62f725d22 100644 (file)
@@ -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;
similarity index 98%
rename from Content.Server/Atmos/GasMixture.cs
rename to Content.Shared/Atmos/GasMixture.cs
index 3d73a4d0b1636f10f6e92b3da869bc169090a81f..a676ed672045fb41b09089dacd953e2b7ad0f779 100644 (file)
@@ -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
 {
     /// <summary>
     ///     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 (file)
index 0000000..942b2bd
--- /dev/null
@@ -0,0 +1,16 @@
+namespace Content.Shared.Atmos;
+
+public readonly record struct GasMixtureStringRepresentation(float TotalMoles, float Temperature, float Pressure, Dictionary<string, float> 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 (file)
index 0000000..73b8998
--- /dev/null
@@ -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,
+}