Files
tbd-station-14/Content.Server/Singularity/Components/ContainmentFieldGeneratorComponent.cs
keronshb 4ecac09428 Adds anchor checks for containment fields (#8909)
* Adds anchor checks for containment fields

* norot

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-06-23 14:27:49 +10:00

34 lines
925 B
C#

using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Physics;
using Content.Shared.Singularity.Components;
using Robust.Server.GameObjects;
using Robust.Shared.Physics;
namespace Content.Server.Singularity.Components
{
[RegisterComponent]
[ComponentReference(typeof(SharedContainmentFieldGeneratorComponent))]
public sealed class ContainmentFieldGeneratorComponent : SharedContainmentFieldGeneratorComponent
{
private int _powerBuffer;
[ViewVariables]
public int PowerBuffer
{
get => _powerBuffer;
set => _powerBuffer = Math.Clamp(value, 0, 6);
}
public Tuple<Direction, ContainmentFieldConnection>? Connection1;
public Tuple<Direction, ContainmentFieldConnection>? Connection2;
[ViewVariables]
public bool Enabled;
[ViewVariables]
public bool IsConnected;
}
}