Improve Gas Yaml Serialization (#40070)
* Make yaml gas serialization cleaner * fix exception * fix validation code * rudimentary test & permissive loading * change it a bit * Test fixes and adjustments
This commit is contained in:
85
Content.IntegrationTests/Tests/Atmos/GasArrayTest.cs
Normal file
85
Content.IntegrationTests/Tests/Atmos/GasArrayTest.cs
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Content.Shared.Atmos;
|
||||||
|
using Content.Shared.Atmos.Components;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
|
namespace Content.IntegrationTests.Tests.Atmos;
|
||||||
|
|
||||||
|
[TestFixture]
|
||||||
|
[TestOf(typeof(Atmospherics))]
|
||||||
|
public sealed class GasArrayTest
|
||||||
|
{
|
||||||
|
private const string GasTankTestDummyId = "GasTankTestDummy";
|
||||||
|
|
||||||
|
private const string GasTankLegacyTestDummyId = "GasTankLegacyTestDummy";
|
||||||
|
|
||||||
|
[TestPrototypes]
|
||||||
|
private const string Prototypes = $@"
|
||||||
|
- type: entity
|
||||||
|
id: {GasTankTestDummyId}
|
||||||
|
components:
|
||||||
|
- type: GasTank
|
||||||
|
air:
|
||||||
|
volume: 5
|
||||||
|
moles:
|
||||||
|
Frezon: 20
|
||||||
|
Oxygen: 10
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: {GasTankLegacyTestDummyId}
|
||||||
|
components:
|
||||||
|
- type: GasTank
|
||||||
|
air:
|
||||||
|
volume: 5
|
||||||
|
moles:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 10
|
||||||
|
";
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task TestGasArrayDeserialization()
|
||||||
|
{
|
||||||
|
await using var pair = await PoolManager.GetServerClient();
|
||||||
|
var server = pair.Server;
|
||||||
|
|
||||||
|
var compFactory = server.ResolveDependency<IComponentFactory>();
|
||||||
|
var prototypeManager = server.ResolveDependency<IPrototypeManager>();
|
||||||
|
|
||||||
|
await server.WaitAssertion(() =>
|
||||||
|
{
|
||||||
|
var gasTank = prototypeManager.Index(GasTankTestDummyId);
|
||||||
|
Assert.Multiple(() =>
|
||||||
|
{
|
||||||
|
Assert.That(gasTank.TryGetComponent<GasTankComponent>(out var gasTankComponent, compFactory));
|
||||||
|
|
||||||
|
Assert.That(gasTankComponent!.Air.GetMoles(Gas.Oxygen), Is.EqualTo(10));
|
||||||
|
Assert.That(gasTankComponent!.Air.GetMoles(Gas.Frezon), Is.EqualTo(20));
|
||||||
|
foreach (var gas in Enum.GetValues<Gas>().Where(p => p != Gas.Oxygen && p != Gas.Frezon))
|
||||||
|
{
|
||||||
|
Assert.That(gasTankComponent!.Air.GetMoles(gas), Is.EqualTo(0));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var legacyGasTank = prototypeManager.Index(GasTankLegacyTestDummyId);
|
||||||
|
Assert.Multiple(() =>
|
||||||
|
{
|
||||||
|
Assert.That(legacyGasTank.TryGetComponent<GasTankComponent>(out var gasTankComponent, compFactory));
|
||||||
|
|
||||||
|
Assert.That(gasTankComponent!.Air.GetMoles(3), Is.EqualTo(10));
|
||||||
|
|
||||||
|
// Iterate through all other gases: check for 0 values
|
||||||
|
for (var i = 0; i < Atmospherics.AdjustedNumberOfGases; i++)
|
||||||
|
{
|
||||||
|
if (i == 3) // our case with a value.
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Assert.That(gasTankComponent!.Air.GetMoles(i), Is.EqualTo(0));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
await pair.CleanReturnAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -458,11 +458,8 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var doReaction = true;
|
var doReaction = true;
|
||||||
for (var i = 0; i < prototype.MinimumRequirements.Length; i++)
|
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
|
||||||
{
|
{
|
||||||
if(i >= Atmospherics.TotalNumberOfGases)
|
|
||||||
throw new IndexOutOfRangeException("Reaction Gas Minimum Requirements Array Prototype exceeds total number of gases!");
|
|
||||||
|
|
||||||
var req = prototype.MinimumRequirements[i];
|
var req = prototype.MinimumRequirements[i];
|
||||||
|
|
||||||
if (!(mixture.GetMoles(i) < req))
|
if (!(mixture.GetMoles(i) < req))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Server.Atmos.Reactions
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Minimum gas amount requirements.
|
/// Minimum gas amount requirements.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("minimumRequirements")]
|
[DataField("minimumRequirements", customTypeSerializer: typeof(GasArraySerializer))]
|
||||||
public float[] MinimumRequirements { get; private set; } = new float[Atmospherics.TotalNumberOfGases];
|
public float[] MinimumRequirements { get; private set; } = new float[Atmospherics.TotalNumberOfGases];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
105
Content.Shared/Atmos/GasArraySerializer.cs
Normal file
105
Content.Shared/Atmos/GasArraySerializer.cs
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
using Robust.Shared.Serialization;
|
||||||
|
using Robust.Shared.Serialization.Manager;
|
||||||
|
using Robust.Shared.Serialization.Markdown;
|
||||||
|
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||||
|
using Robust.Shared.Serialization.Markdown.Sequence;
|
||||||
|
using Robust.Shared.Serialization.Markdown.Validation;
|
||||||
|
using Robust.Shared.Serialization.TypeSerializers.Interfaces;
|
||||||
|
|
||||||
|
namespace Content.Shared.Atmos;
|
||||||
|
|
||||||
|
public sealed class GasArraySerializer : ITypeSerializer<float[], SequenceDataNode>, ITypeSerializer<float[], MappingDataNode>
|
||||||
|
{
|
||||||
|
public ValidationNode Validate(ISerializationManager serializationManager,
|
||||||
|
SequenceDataNode node,
|
||||||
|
IDependencyCollection dependencies,
|
||||||
|
ISerializationContext? context = null)
|
||||||
|
{
|
||||||
|
var list = new List<ValidationNode>();
|
||||||
|
|
||||||
|
foreach (var elem in node.Sequence)
|
||||||
|
{
|
||||||
|
list.Add(serializationManager.ValidateNode<float>(elem, context));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ValidatedSequenceNode(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] Read(ISerializationManager serializationManager,
|
||||||
|
SequenceDataNode node,
|
||||||
|
IDependencyCollection dependencies,
|
||||||
|
SerializationHookContext hookCtx,
|
||||||
|
ISerializationContext? context = null,
|
||||||
|
ISerializationManager.InstantiationDelegate<float[]>? instanceProvider = null)
|
||||||
|
{
|
||||||
|
var list = instanceProvider != null ? instanceProvider() : new float[Atmospherics.AdjustedNumberOfGases];
|
||||||
|
|
||||||
|
for (var i = 0; i < node.Sequence.Count; i++)
|
||||||
|
{
|
||||||
|
list[i] = serializationManager.Read<float>(node.Sequence[i], hookCtx, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ValidationNode Validate(ISerializationManager serializationManager,
|
||||||
|
MappingDataNode node,
|
||||||
|
IDependencyCollection dependencies,
|
||||||
|
ISerializationContext? context = null)
|
||||||
|
{
|
||||||
|
var dict = new Dictionary<ValidationNode, ValidationNode>();
|
||||||
|
|
||||||
|
foreach (var (key, value) in node.Children)
|
||||||
|
{
|
||||||
|
ValidationNode keyNode = Enum.TryParse<Gas>(key, out _)
|
||||||
|
? new ValidatedValueNode(node.GetKeyNode(key))
|
||||||
|
: new ErrorNode(node.GetKeyNode(key), $"Failed to parse Gas: {key}");
|
||||||
|
|
||||||
|
dict.Add(keyNode, serializationManager.ValidateNode<float>(value, context));
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ValidatedMappingNode(dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] Read(ISerializationManager serializationManager,
|
||||||
|
MappingDataNode node,
|
||||||
|
IDependencyCollection dependencies,
|
||||||
|
SerializationHookContext hookCtx,
|
||||||
|
ISerializationContext? context = null,
|
||||||
|
ISerializationManager.InstantiationDelegate<float[]>? instanceProvider = null)
|
||||||
|
{
|
||||||
|
var list = instanceProvider != null ? instanceProvider() : new float[Atmospherics.AdjustedNumberOfGases];
|
||||||
|
|
||||||
|
foreach (var (gas, value) in node.Children)
|
||||||
|
{
|
||||||
|
// In the event that an invalid gas got serialized into something,
|
||||||
|
// we simply ignore it and continue reading.
|
||||||
|
// Errors should already be caught by Validate().
|
||||||
|
if (!Enum.TryParse<Gas>(gas, out var gasEnum))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
list[(int)gasEnum] = serializationManager.Read<float>(value, hookCtx, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataNode Write(ISerializationManager serializationManager,
|
||||||
|
float[] value,
|
||||||
|
IDependencyCollection dependencies,
|
||||||
|
bool alwaysWrite = false,
|
||||||
|
ISerializationContext? context = null)
|
||||||
|
{
|
||||||
|
var mapping = new MappingDataNode();
|
||||||
|
|
||||||
|
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
|
||||||
|
{
|
||||||
|
if (value[i] <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
mapping.Add(((Gas) i).ToString(), serializationManager.WriteValue(value[i], alwaysWrite, context));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mapping;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ namespace Content.Shared.Atmos
|
|||||||
|
|
||||||
// No access, to ensure immutable mixtures are never accidentally mutated.
|
// No access, to ensure immutable mixtures are never accidentally mutated.
|
||||||
[Access(typeof(SharedAtmosphereSystem), typeof(SharedAtmosDebugOverlaySystem), typeof(GasEnumerator), Other = AccessPermissions.None)]
|
[Access(typeof(SharedAtmosphereSystem), typeof(SharedAtmosDebugOverlaySystem), typeof(GasEnumerator), Other = AccessPermissions.None)]
|
||||||
[DataField]
|
[DataField(customTypeSerializer: typeof(GasArraySerializer))]
|
||||||
public float[] Moles = new float[Atmospherics.AdjustedNumberOfGases];
|
public float[] Moles = new float[Atmospherics.AdjustedNumberOfGases];
|
||||||
|
|
||||||
public float this[int gas] => Moles[gas];
|
public float this[int gas] => Moles[gas];
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
priority: -2
|
priority: -2
|
||||||
minimumTemperature: 373.149 # Same as Atmospherics.FireMinimumTemperatureToExist
|
minimumTemperature: 373.149 # Same as Atmospherics.FireMinimumTemperatureToExist
|
||||||
minimumRequirements: # In this case, same as minimum mole count.
|
minimumRequirements: # In this case, same as minimum mole count.
|
||||||
- 0.01 # oxygen
|
Oxygen: 0.01
|
||||||
- 0 # nitrogen
|
Plasma: 0.01
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 0.01 # plasma
|
|
||||||
effects:
|
effects:
|
||||||
- !type:PlasmaFireReaction {}
|
- !type:PlasmaFireReaction {}
|
||||||
|
|
||||||
@@ -15,11 +13,8 @@
|
|||||||
priority: -1
|
priority: -1
|
||||||
minimumTemperature: 373.149 # Same as Atmospherics.FireMinimumTemperatureToExist
|
minimumTemperature: 373.149 # Same as Atmospherics.FireMinimumTemperatureToExist
|
||||||
minimumRequirements: # In this case, same as minimum mole count.
|
minimumRequirements: # In this case, same as minimum mole count.
|
||||||
- 0.01 # oxygen
|
Oxygen: 0.01
|
||||||
- 0 # nitrogen
|
Tritium: 0.01
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 0 # plasma
|
|
||||||
- 0.01 # tritium
|
|
||||||
effects:
|
effects:
|
||||||
- !type:TritiumFireReaction {}
|
- !type:TritiumFireReaction {}
|
||||||
|
|
||||||
@@ -28,15 +23,8 @@
|
|||||||
priority: 1
|
priority: 1
|
||||||
minimumTemperature: 23.15
|
minimumTemperature: 23.15
|
||||||
minimumRequirements:
|
minimumRequirements:
|
||||||
- 0 # oxygen
|
Nitrogen: 0.01
|
||||||
- 0.01 # nitrogen
|
Frezon: 0.01
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 0 # plasma
|
|
||||||
- 0 # tritium
|
|
||||||
- 0 # vapor
|
|
||||||
- 0 # ammonia
|
|
||||||
- 0 # n2o
|
|
||||||
- 0.01 # frezon
|
|
||||||
effects:
|
effects:
|
||||||
- !type:FrezonCoolantReaction {}
|
- !type:FrezonCoolantReaction {}
|
||||||
|
|
||||||
@@ -45,15 +33,9 @@
|
|||||||
priority: 2
|
priority: 2
|
||||||
maximumTemperature: 73.15 # Cold tritium fire, basically.
|
maximumTemperature: 73.15 # Cold tritium fire, basically.
|
||||||
minimumRequirements:
|
minimumRequirements:
|
||||||
- 0.01 # oxygen
|
Oxygen: 0.01
|
||||||
- 0.01 # nitrogen
|
Nitrogen: 0.01
|
||||||
- 0 # carbon dioxide
|
Tritium: 0.01
|
||||||
- 0 # plasma
|
|
||||||
- 0.01 # tritium
|
|
||||||
- 0 # vapor
|
|
||||||
- 0 # ammonia
|
|
||||||
- 0 # n2o
|
|
||||||
- 0 # frezon
|
|
||||||
effects:
|
effects:
|
||||||
- !type:FrezonProductionReaction {}
|
- !type:FrezonProductionReaction {}
|
||||||
|
|
||||||
@@ -62,15 +44,8 @@
|
|||||||
priority: 2
|
priority: 2
|
||||||
minimumTemperature: 323.149
|
minimumTemperature: 323.149
|
||||||
minimumRequirements:
|
minimumRequirements:
|
||||||
- 0.01 # oxygen
|
Oxygen: 0.01
|
||||||
- 0 # nitrogen
|
Ammonia: 0.01
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 0 # plasma
|
|
||||||
- 0 # tritium
|
|
||||||
- 0 # vapor
|
|
||||||
- 0.01 # ammonia
|
|
||||||
- 0 # n2o
|
|
||||||
- 0 # frezon
|
|
||||||
effects:
|
effects:
|
||||||
- !type:AmmoniaOxygenReaction {}
|
- !type:AmmoniaOxygenReaction {}
|
||||||
|
|
||||||
@@ -79,15 +54,7 @@
|
|||||||
priority: 0
|
priority: 0
|
||||||
minimumTemperature: 850
|
minimumTemperature: 850
|
||||||
minimumRequirements:
|
minimumRequirements:
|
||||||
- 0 # oxygen
|
NitrousOxide: 0.01
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 0 # plasma
|
|
||||||
- 0 # tritium
|
|
||||||
- 0 # vapor
|
|
||||||
- 0 # ammonia
|
|
||||||
- 0.01 # n2o
|
|
||||||
- 0 # frezon
|
|
||||||
effects:
|
effects:
|
||||||
- !type:N2ODecompositionReaction {}
|
- !type:N2ODecompositionReaction {}
|
||||||
|
|
||||||
@@ -96,12 +63,7 @@
|
|||||||
# priority: 1
|
# priority: 1
|
||||||
# maximumTemperature: 373.13 # Boiling point of water.
|
# maximumTemperature: 373.13 # Boiling point of water.
|
||||||
# minimumRequirements: # In this case, same as minimum mole count.
|
# minimumRequirements: # In this case, same as minimum mole count.
|
||||||
# - 0 # oxygen
|
# WaterVapor: 1
|
||||||
# - 0 # nitrogen
|
|
||||||
# - 0 # carbon dioxide
|
|
||||||
# - 0 # plasma
|
|
||||||
# - 0 # tritium
|
|
||||||
# - 1 # water vapor
|
|
||||||
# effects:
|
# effects:
|
||||||
# - !type:WaterVaporReaction
|
# - !type:WaterVaporReaction
|
||||||
# gas: 5
|
# gas: 5
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
# 31 minutes
|
# 31 minutes
|
||||||
volume: 5
|
volume: 5
|
||||||
moles:
|
moles:
|
||||||
- 2.051379050 # oxygen
|
Oxygen: 2.051379050 # oxygen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
# 4 minutes
|
# 4 minutes
|
||||||
volume: 0.66
|
volume: 0.66
|
||||||
moles:
|
moles:
|
||||||
- 0.270782035 # oxygen
|
Oxygen: 0.270782035 # oxygen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -59,8 +59,7 @@
|
|||||||
# 4 minutes
|
# 4 minutes
|
||||||
volume: 0.66
|
volume: 0.66
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Nitrogen: 0.270782035 # nitrogen
|
||||||
- 0.270782035 # nitrogen
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +74,7 @@
|
|||||||
# 9 minutes
|
# 9 minutes
|
||||||
volume: 1.5
|
volume: 1.5
|
||||||
moles:
|
moles:
|
||||||
- 0.615413715 # oxygen
|
Oxygen: 0.615413715 # oxygen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -89,8 +88,7 @@
|
|||||||
# 9 minutes
|
# 9 minutes
|
||||||
volume: 1.5
|
volume: 1.5
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Nitrogen: 0.615413715 # nitrogen
|
||||||
- 0.615413715 # nitrogen
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
|
|
||||||
@@ -105,7 +103,7 @@
|
|||||||
# 15 minutes
|
# 15 minutes
|
||||||
volume: 2.5
|
volume: 2.5
|
||||||
moles:
|
moles:
|
||||||
- 1.025689525 # oxygen
|
Oxygen: 1.025689525 # oxygen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -119,8 +117,7 @@
|
|||||||
# 15 minutes
|
# 15 minutes
|
||||||
volume: 2.5
|
volume: 2.5
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Nitrogen: 1.025689525 # nitrogen
|
||||||
- 1.025689525 # nitrogen
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -134,15 +131,9 @@
|
|||||||
# 4 minutes
|
# 4 minutes
|
||||||
volume: 0.66
|
volume: 0.66
|
||||||
moles:
|
moles:
|
||||||
- 0.270782035 # 95% oxygen
|
Oxygen: 0.270782035 # 95% oxygen
|
||||||
- 0 # nitrogen
|
NitrousOxide: 0.014251686 # 5% N2O
|
||||||
- 0 # CO2
|
# 0.285033721 total
|
||||||
- 0 # plasma
|
|
||||||
- 0 # tritium
|
|
||||||
- 0 # water vapor
|
|
||||||
- 0 # ammonia
|
|
||||||
- 0.014251686 # 5% N2O
|
|
||||||
# 0.285033721 total
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -156,8 +147,8 @@
|
|||||||
# 6 minutes due to output pressure
|
# 6 minutes due to output pressure
|
||||||
volume: 5
|
volume: 5
|
||||||
moles:
|
moles:
|
||||||
- 0.451303391 # 22% oxygen
|
Oxygen: 0.451303391 # 22% oxygen
|
||||||
- 1.600075659 # 78% nitrogen
|
Nitrogen: 1.600075659 # 78% nitrogen
|
||||||
# 2.051379050 total
|
# 2.051379050 total
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
@@ -172,8 +163,7 @@
|
|||||||
# 31 minutes
|
# 31 minutes
|
||||||
volume: 5
|
volume: 5
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen not included
|
Nitrogen: 2.051379050 # nitrogen
|
||||||
- 2.051379050 # nitrogen
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -193,14 +183,8 @@
|
|||||||
# only 22 minutes due to pressure
|
# only 22 minutes due to pressure
|
||||||
volume: 5
|
volume: 5
|
||||||
moles:
|
moles:
|
||||||
- 1.435965335 # 70% oxygen
|
Oxygen: 1.435965335 # 70% oxygen
|
||||||
- 0 # nitrogen
|
NitrousOxide: 0.615413715 # 30% N2O
|
||||||
- 0 # CO2
|
|
||||||
- 0 # plasma
|
|
||||||
- 0 # tritium
|
|
||||||
- 0 # water vapor
|
|
||||||
- 0 # ammonia
|
|
||||||
- 0.615413715 # 30% N2O
|
|
||||||
# 2.051379050 total
|
# 2.051379050 total
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|
||||||
@@ -216,8 +200,5 @@
|
|||||||
# 6 minutes of agony
|
# 6 minutes of agony
|
||||||
volume: 5
|
volume: 5
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Plasma: 2.051379050
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 2.051379050 # plasma
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
|
|||||||
@@ -108,8 +108,8 @@
|
|||||||
volume: 0.75
|
volume: 0.75
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 0.153853429 # oxygen
|
Oxygen: 0.153853429 # oxygen
|
||||||
- 0.153853429 # nitrogen
|
Nitrogen: 0.153853429 # nitrogen
|
||||||
- type: Item
|
- type: Item
|
||||||
sprite: null
|
sprite: null
|
||||||
size: Normal
|
size: Normal
|
||||||
|
|||||||
@@ -77,9 +77,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1000
|
volume: 1000
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
CarbonDioxide: 340.5701689 # carbon dioxide
|
||||||
- 0 # nitrogen
|
|
||||||
- 340.5701689 # carbon dioxide
|
|
||||||
temperature: 373.15
|
temperature: 373.15
|
||||||
- type: Repairable
|
- type: Repairable
|
||||||
doAfterDelay: 30 # you can heal the mothership core, but it takes a while
|
doAfterDelay: 30 # you can heal the mothership core, but it takes a while
|
||||||
|
|||||||
@@ -108,8 +108,8 @@
|
|||||||
volume: 5
|
volume: 5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 1.025689525 # oxygen
|
Oxygen: 1.025689525 # oxygen
|
||||||
- 1.025689525 # nitrogen
|
Nitrogen: 1.025689525 # nitrogen
|
||||||
|
|
||||||
#Empty black
|
#Empty black
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -143,8 +143,8 @@
|
|||||||
volume: 5
|
volume: 5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 1.025689525 # oxygen
|
Oxygen: 1.025689525 # oxygen
|
||||||
- 1.025689525 # nitrogen
|
Nitrogen: 1.025689525 # nitrogen
|
||||||
|
|
||||||
#Empty captain
|
#Empty captain
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -183,8 +183,8 @@
|
|||||||
volume: 5
|
volume: 5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 1.025689525 # oxygen
|
Oxygen: 1.025689525 # oxygen
|
||||||
- 1.025689525 # nitrogen
|
Nitrogen: 1.025689525 # nitrogen
|
||||||
|
|
||||||
#Empty mini
|
#Empty mini
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -223,8 +223,8 @@
|
|||||||
volume: 1.5
|
volume: 1.5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 0.307706858 # oxygen
|
Oxygen: 0.307706858 # oxygen
|
||||||
- 0.307706858 # nitrogen
|
Nitrogen: 0.307706858 # nitrogen
|
||||||
|
|
||||||
#Empty security
|
#Empty security
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -255,8 +255,8 @@
|
|||||||
volume: 1.5
|
volume: 1.5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 0.307706858 # oxygen
|
Oxygen: 0.307706858 # oxygen
|
||||||
- 0.307706858 # nitrogen
|
Nitrogen: 0.307706858 # nitrogen
|
||||||
|
|
||||||
#Empty void
|
#Empty void
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -290,8 +290,8 @@
|
|||||||
volume: 5
|
volume: 5
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
moles:
|
moles:
|
||||||
- 1.025689525 # oxygen
|
Oxygen: 1.025689525 # oxygen
|
||||||
- 1.025689525 # nitrogen
|
Nitrogen: 1.025689525 # nitrogen
|
||||||
|
|
||||||
# Infinite jetpack
|
# Infinite jetpack
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -569,8 +569,8 @@
|
|||||||
air:
|
air:
|
||||||
volume: 1000
|
volume: 1000
|
||||||
moles: # Target is 3117.84 mols total for filling 30 tiles (goal is 101.325 kPa @ 20C)
|
moles: # Target is 3117.84 mols total for filling 30 tiles (goal is 101.325 kPa @ 20C)
|
||||||
- 654.7464 # oxygen
|
Oxygen: 654.7464 # oxygen
|
||||||
- 2463.0936 # nitrogen
|
Nitrogen: 2463.0936 # nitrogen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: StaticPrice
|
- type: StaticPrice
|
||||||
price: 350
|
price: 350
|
||||||
|
|||||||
@@ -121,9 +121,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1000
|
volume: 1000
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
CarbonDioxide: 340.5701689 # carbon dioxide
|
||||||
- 0 # nitrogen
|
|
||||||
- 340.5701689 # carbon dioxide
|
|
||||||
temperature: 373.15
|
temperature: 373.15
|
||||||
- type: Explosive
|
- type: Explosive
|
||||||
explosionType: Default
|
explosionType: Default
|
||||||
|
|||||||
@@ -128,16 +128,6 @@
|
|||||||
- type: GasCanister
|
- type: GasCanister
|
||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles: # List of gasses for easy reference
|
|
||||||
- 0 # oxygen
|
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 0 # Tritium
|
|
||||||
- 0 # Water vapor
|
|
||||||
- 0 # Ammonia
|
|
||||||
- 0 # N2O
|
|
||||||
- 0 # Frezon
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -178,8 +168,8 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 581.56 # oxygen 21%
|
Oxygen: 581.56 # oxygen 21%
|
||||||
- 2187.79 # nitrogen 79%
|
Nitrogen: 2187.79 # nitrogen 79%
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -218,7 +208,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 2769.36 # oxygen
|
Oxygen: 2769.36 # oxygen
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -254,7 +244,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 18710.71051 # oxygen
|
Oxygen: 18710.71051 # oxygen
|
||||||
temperature: 72
|
temperature: 72
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Atmospherics"]]
|
access: [["Atmospherics"]]
|
||||||
@@ -272,8 +262,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Nitrogen: 2769.36 # nitrogen
|
||||||
- 2769.36 # nitrogen
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -309,8 +298,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Nitrogen: 18710.71051 # nitrogen
|
||||||
- 18710.71051 # nitrogen
|
|
||||||
temperature: 72
|
temperature: 72
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Atmospherics"]]
|
access: [["Atmospherics"]]
|
||||||
@@ -328,9 +316,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
CarbonDioxide: 2769.36 # CO2
|
||||||
- 0 # nitrogen
|
|
||||||
- 2769.36 # CO2
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -368,9 +354,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
CarbonDioxide: 18710.71051 # CO2
|
||||||
- 0 # nitrogen
|
|
||||||
- 18710.71051 # CO2
|
|
||||||
temperature: 72
|
temperature: 72
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Atmospherics"]]
|
access: [["Atmospherics"]]
|
||||||
@@ -388,10 +372,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Plasma: 2769.36 # plasma
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # carbon dioxide
|
|
||||||
- 2769.36 # plasma
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -432,11 +413,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Tritium: 2769.36 # Tritium
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 2769.36 # Tritium
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -477,12 +454,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
WaterVapor: 2769.36 # Water vapor
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 0 # Tritium
|
|
||||||
- 2769.36 # Water vapor
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -521,13 +493,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Ammonia: 2769.36 # Ammonia
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 0 # Tritium
|
|
||||||
- 0 # Water vapor
|
|
||||||
- 2769.36 # Ammonia
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -568,14 +534,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
NitrousOxide: 2769.36 # N2O
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 0 # Tritium
|
|
||||||
- 0 # Water vapor
|
|
||||||
- 0 # Ammonia
|
|
||||||
- 2769.36 # N2O
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
@@ -616,15 +575,7 @@
|
|||||||
gasMixture:
|
gasMixture:
|
||||||
volume: 1500
|
volume: 1500
|
||||||
moles:
|
moles:
|
||||||
- 0 # oxygen
|
Frezon: 2769.36 # Frezon
|
||||||
- 0 # nitrogen
|
|
||||||
- 0 # CO2
|
|
||||||
- 0 # Plasma
|
|
||||||
- 0 # Tritium
|
|
||||||
- 0 # Water vapor
|
|
||||||
- 0 # Ammonia
|
|
||||||
- 0 # N2O
|
|
||||||
- 2769.36 # Frezon
|
|
||||||
temperature: 293.15
|
temperature: 293.15
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
|
|||||||
Reference in New Issue
Block a user