* ECS containmentfieldgeneratorcomponent * Fix tests and clean up one line * check for anchored in a better way * Fix dependency exception I'm not really happy with this solution, it's not very good but I'm not sure how to do it better without refactoring way more than I want to. Maybe I'm missing something. * review Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
28 lines
813 B
C#
28 lines
813 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;
|
|
|
|
}
|
|
}
|