AtmosDevices can optionally process in space. (#4405)

Refactors some misc atmos things, too.
This commit is contained in:
Vera Aguilera Puerto
2021-08-02 13:59:41 +02:00
committed by GitHub
parent e42acf2401
commit 009087863f
14 changed files with 176 additions and 120 deletions

View File

@@ -16,9 +16,9 @@ namespace Content.Server.Atmos.Components
/// <summary>
/// This is our SSAir equivalent.
/// </summary>
[ComponentReference(typeof(IGridAtmosphereComponent))]
[ComponentReference(typeof(IAtmosphereComponent))]
[RegisterComponent, Serializable]
public class GridAtmosphereComponent : Component, IGridAtmosphereComponent, ISerializationHooks
public class GridAtmosphereComponent : Component, IAtmosphereComponent, ISerializationHooks
{
public override string Name => "GridAtmosphere";
public virtual bool Simulated => true;

View File

@@ -2,7 +2,7 @@
namespace Content.Server.Atmos.Components
{
public interface IGridAtmosphereComponent : IComponent
public interface IAtmosphereComponent : IComponent
{
/// <summary>
/// Whether this atmosphere is simulated or not.

View File

@@ -0,0 +1,13 @@
using Robust.Shared.GameObjects;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
[ComponentReference(typeof(IAtmosphereComponent))]
public class SpaceAtmosphereComponent : Component, IAtmosphereComponent
{
public override string Name => "SpaceAtmosphere";
public bool Simulated => false;
}
}

View File

@@ -1,16 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Atmos;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
[ComponentReference(typeof(IGridAtmosphereComponent))]
public class SpaceGridAtmosphereComponent : UnsimulatedGridAtmosphereComponent
{
public override string Name => "SpaceGridAtmosphere";
}
}

View File

@@ -8,10 +8,9 @@ using Robust.Shared.Maths;
namespace Content.Server.Atmos.Components
{
[RegisterComponent]
[ComponentReference(typeof(IGridAtmosphereComponent))]
[ComponentReference(typeof(GridAtmosphereComponent))]
[ComponentReference(typeof(IAtmosphereComponent))]
[Serializable]
public class UnsimulatedGridAtmosphereComponent : GridAtmosphereComponent, IGridAtmosphereComponent
public class UnsimulatedGridAtmosphereComponent : GridAtmosphereComponent
{
public override string Name => "UnsimulatedGridAtmosphere";