* Add test that puts all components on an entity and checks for no exceptions Also fix all the exceptions that happened because of this * Add comments to the test * Fix nullable errors * Fix more nullable errors * More nullable error fixes * Unignore basic actor component * Fix more nullable errors * NULLABLE ERROR * Add string interpolation * Merge if checks * Remove redundant pragma warning disable 649 * Address reviews * Remove null wrappers around TryGetComponent * Merge conflict fixes * APC battery component error fix * Fix power test * Fix atmos mapgrid usages
27 lines
745 B
C#
27 lines
745 B
C#
using Content.Server.Atmos;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Content.Server.GameObjects.Components.Atmos
|
|
{
|
|
[RegisterComponent]
|
|
public class GasMixtureHolderComponent : Component
|
|
{
|
|
public override string Name => "GasMixtureHolder";
|
|
|
|
[ViewVariables] public GasMixture GasMixture { get; set; } = new GasMixture();
|
|
|
|
public override void ExposeData(ObjectSerializer serializer)
|
|
{
|
|
base.ExposeData(serializer);
|
|
|
|
serializer.DataReadWriteFunction(
|
|
"volume",
|
|
0f,
|
|
vol => GasMixture.Volume = vol,
|
|
() => GasMixture.Volume);
|
|
}
|
|
}
|
|
}
|