]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Entity storage air capacity changes (#14734)
authorKara <lunarautomaton6@gmail.com>
Sun, 19 Mar 2023 00:56:38 +0000 (17:56 -0700)
committerGitHub <noreply@github.com>
Sun, 19 Mar 2023 00:56:38 +0000 (19:56 -0500)
Content.Server/Storage/Components/EntityStorageComponent.cs
Content.Server/Storage/EntitySystems/EntityStorageSystem.cs
Content.Shared/Storage/Components/SharedEntityStorageComponent.cs
Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml

index 568c67bc06f9342a8718c2c829822b98d553c969..0824dc8909790c2ba33911e45ee3ad89fab9545b 100644 (file)
@@ -12,5 +12,6 @@ public sealed class EntityStorageComponent : SharedEntityStorageComponent, IGasM
     ///     None while open. Grabs gas from the atmosphere when closed, and exposes any entities inside to it.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite)]
-    public GasMixture Air { get; set; } = new (GasMixVolume);
+    [DataField("air")]
+    public GasMixture Air { get; set; } = new (200);
 }
index ebefd304f7947a9b6ecc36d5b8291a2dc464aa25..46459105bf98934f5a322f3f5571ea5d1979192c 100644 (file)
@@ -77,7 +77,7 @@ public sealed class EntityStorageSystem : SharedEntityStorageSystem
 
         if (tile != null && _atmos.GetTileMixture(tile.Value.GridUid, null, tile.Value.GridIndices, true) is {} environment)
         {
-            _atmos.Merge(serverComp.Air, environment.RemoveVolume(SharedEntityStorageComponent.GasMixVolume));
+            _atmos.Merge(serverComp.Air, environment.RemoveVolume(serverComp.Air.Volume));
         }
     }
 
index bbabde8e7d26030daefaaa746e646d35f21d67a0..9f6b9413a02a8628d8fee2c1a26451a61db85c63 100644 (file)
@@ -11,7 +11,6 @@ namespace Content.Shared.Storage.Components;
 public abstract class SharedEntityStorageComponent : Component
 {
     public readonly float MaxSize = 1.0f; // maximum width or height of an entity allowed inside the storage.
-    public const float GasMixVolume = 70f;
 
     public static readonly TimeSpan InternalOpenAttemptDelay = TimeSpan.FromSeconds(0.5);
     public TimeSpan LastInternalOpenAttempt;
index 0f3bfb795dc05c2df80f4a7157e70b293410939e..381dbe962b93561e7d4478db2e6fcc42809c8f32 100644 (file)
   id: CrateLivestock
   name: livestock crate
   components:
+  - type: EntityStorage
+    air:
+      volume: 800
   - type: Sprite
     sprite: Structures/Storage/Crates/livestock.rsi
     layers: