ECS Atmos Part 4: Moves all atmos logic from TileAtmosphere to AtmosphereSystem. (#4295)
* Moves all atmos logic from TileAtmosphere to AtmosphereSystem. * Atmos uses grid anchoring to check for firelocks instead of grid tile lookups. * CVar for space wind sound * CVar for explosive depressurization
This commit is contained in:
committed by
GitHub
parent
e1fdd902bb
commit
fcafa8f439
82
Content.Server/Atmos/MonstermosInfo.cs
Normal file
82
Content.Server/Atmos/MonstermosInfo.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Atmos
|
||||
{
|
||||
public struct MonstermosInfo
|
||||
{
|
||||
[ViewVariables]
|
||||
public int LastCycle;
|
||||
|
||||
[ViewVariables]
|
||||
public long LastQueueCycle;
|
||||
|
||||
[ViewVariables]
|
||||
public long LastSlowQueueCycle;
|
||||
|
||||
[ViewVariables]
|
||||
public float MoleDelta;
|
||||
|
||||
[ViewVariables]
|
||||
public float TransferDirectionEast;
|
||||
|
||||
[ViewVariables]
|
||||
public float TransferDirectionWest;
|
||||
|
||||
[ViewVariables]
|
||||
public float TransferDirectionNorth;
|
||||
|
||||
[ViewVariables]
|
||||
public float TransferDirectionSouth;
|
||||
|
||||
[ViewVariables]
|
||||
public float CurrentTransferAmount;
|
||||
|
||||
[ViewVariables]
|
||||
public AtmosDirection CurrentTransferDirection;
|
||||
|
||||
[ViewVariables]
|
||||
public bool FastDone;
|
||||
|
||||
public float this[AtmosDirection direction]
|
||||
{
|
||||
get =>
|
||||
direction switch
|
||||
{
|
||||
AtmosDirection.East => TransferDirectionEast,
|
||||
AtmosDirection.West => TransferDirectionWest,
|
||||
AtmosDirection.North => TransferDirectionNorth,
|
||||
AtmosDirection.South => TransferDirectionSouth,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(direction))
|
||||
};
|
||||
|
||||
set
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case AtmosDirection.East:
|
||||
TransferDirectionEast = value;
|
||||
break;
|
||||
case AtmosDirection.West:
|
||||
TransferDirectionWest = value;
|
||||
break;
|
||||
case AtmosDirection.North:
|
||||
TransferDirectionNorth = value;
|
||||
break;
|
||||
case AtmosDirection.South:
|
||||
TransferDirectionSouth = value;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(direction));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float this[int index]
|
||||
{
|
||||
get => this[(AtmosDirection) (1 << index)];
|
||||
set => this[(AtmosDirection) (1 << index)] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user