diff --git a/Content.Server/Atmos/Piping/Other/Components/GasMinerComponent.cs b/Content.Server/Atmos/Piping/Other/Components/GasMinerComponent.cs index 170337d6ff..9c7ffc5905 100644 --- a/Content.Server/Atmos/Piping/Other/Components/GasMinerComponent.cs +++ b/Content.Server/Atmos/Piping/Other/Components/GasMinerComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.Atmos.Piping.Other.Components [ViewVariables(VVAccess.ReadWrite)] [DataField("spawnGas")] - public Gas SpawnGas { get; set; } = Gas.Invalid; + public Gas? SpawnGas { get; set; } = null; [ViewVariables(VVAccess.ReadWrite)] [DataField("spawnTemperature")] diff --git a/Content.Server/Atmos/Piping/Other/EntitySystems/GasMinerSystem.cs b/Content.Server/Atmos/Piping/Other/EntitySystems/GasMinerSystem.cs index 4646827e54..142a929de8 100644 --- a/Content.Server/Atmos/Piping/Other/EntitySystems/GasMinerSystem.cs +++ b/Content.Server/Atmos/Piping/Other/EntitySystems/GasMinerSystem.cs @@ -20,13 +20,13 @@ namespace Content.Server.Atmos.Piping.Other.EntitySystems private void OnMinerUpdated(EntityUid uid, GasMinerComponent miner, AtmosDeviceUpdateEvent args) { - if (!CheckMinerOperation(args.Atmosphere, miner, out var tile) || !miner.Enabled || miner.SpawnGas <= Gas.Invalid || miner.SpawnAmount <= 0f) + if (!CheckMinerOperation(args.Atmosphere, miner, out var tile) || !miner.Enabled || !miner.SpawnGas.HasValue || miner.SpawnAmount <= 0f) return; // Time to mine some gas. var merger = new GasMixture(1) { Temperature = miner.SpawnTemperature }; - merger.SetMoles(miner.SpawnGas, miner.SpawnAmount); + merger.SetMoles(miner.SpawnGas.Value, miner.SpawnAmount); tile.AssumeAir(merger); } diff --git a/Content.Shared/Atmos/Atmospherics.cs b/Content.Shared/Atmos/Atmospherics.cs index f22d4ceb6b..c43ef7b441 100644 --- a/Content.Shared/Atmos/Atmospherics.cs +++ b/Content.Shared/Atmos/Atmospherics.cs @@ -266,7 +266,6 @@ namespace Content.Shared.Atmos [Serializable, NetSerializable] public enum Gas : sbyte { - Invalid = -1, Oxygen = 0, Nitrogen = 1, CarbonDioxide = 2,