Renames IEdgeCondition to IGraphCondition
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Content.Server.Construction.Completions
|
|||||||
{
|
{
|
||||||
[field: DataField("passUser")] public bool PassUser { get; } = false;
|
[field: DataField("passUser")] public bool PassUser { get; } = false;
|
||||||
|
|
||||||
[field: DataField("condition", required:true)] public IEdgeCondition? Condition { get; } = null;
|
[field: DataField("condition", required:true)] public IGraphCondition? Condition { get; } = null;
|
||||||
|
|
||||||
[field: DataField("action", required:true)] public IGraphAction? Action { get; } = null;
|
[field: DataField("action", required:true)] public IGraphAction? Action { get; } = null;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class AirlockBolted : IEdgeCondition
|
public class AirlockBolted : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("value")]
|
[DataField("value")]
|
||||||
public bool Value { get; private set; } = true;
|
public bool Value { get; private set; } = true;
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class AllConditions : IEdgeCondition
|
public class AllConditions : IGraphCondition
|
||||||
{
|
{
|
||||||
[field: DataField("conditions")]
|
[field: DataField("conditions")]
|
||||||
public IEdgeCondition[] Conditions { get; } = Array.Empty<IEdgeCondition>();
|
public IGraphCondition[] Conditions { get; } = Array.Empty<IGraphCondition>();
|
||||||
|
|
||||||
public async Task<bool> Condition(IEntity entity)
|
public async Task<bool> Condition(IEntity entity)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class AllWiresCut : IEdgeCondition
|
public class AllWiresCut : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("value")] public bool Value { get; private set; } = true;
|
[DataField("value")] public bool Value { get; private set; } = true;
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class AnyConditions : IEdgeCondition
|
public class AnyConditions : IGraphCondition
|
||||||
{
|
{
|
||||||
[field: DataField("conditions")]
|
[field: DataField("conditions")]
|
||||||
public IEdgeCondition[] Conditions { get; } = Array.Empty<IEdgeCondition>();
|
public IGraphCondition[] Conditions { get; } = Array.Empty<IGraphCondition>();
|
||||||
|
|
||||||
public async Task<bool> Condition(IEntity entity)
|
public async Task<bool> Condition(IEntity entity)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class ComponentInTile : IEdgeCondition
|
public class ComponentInTile : IGraphCondition
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class ContainerEmpty : IEdgeCondition
|
public class ContainerEmpty : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("container")] public string Container { get; private set; } = string.Empty;
|
[DataField("container")] public string Container { get; private set; } = string.Empty;
|
||||||
[DataField("text")] public string Text { get; private set; } = string.Empty;
|
[DataField("text")] public string Text { get; private set; } = string.Empty;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class ContainerNotEmpty : IEdgeCondition
|
public class ContainerNotEmpty : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("container")] public string Container { get; private set; } = string.Empty;
|
[DataField("container")] public string Container { get; private set; } = string.Empty;
|
||||||
[DataField("text")] public string Text { get; private set; } = string.Empty;
|
[DataField("text")] public string Text { get; private set; } = string.Empty;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class DoorWelded : IEdgeCondition
|
public class DoorWelded : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("welded")]
|
[DataField("welded")]
|
||||||
public bool Welded { get; private set; } = true;
|
public bool Welded { get; private set; } = true;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class EntityAnchored : IEdgeCondition
|
public class EntityAnchored : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("anchored")] public bool Anchored { get; private set; } = true;
|
[DataField("anchored")] public bool Anchored { get; private set; } = true;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class MachineFrameComplete : IEdgeCondition
|
public class MachineFrameComplete : IGraphCondition
|
||||||
{
|
{
|
||||||
public async Task<bool> Condition(IEntity entity)
|
public async Task<bool> Condition(IEntity entity)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class ToiletLidClosed : IEdgeCondition
|
public class ToiletLidClosed : IGraphCondition
|
||||||
{
|
{
|
||||||
public async Task<bool> Condition(IEntity entity)
|
public async Task<bool> Condition(IEntity entity)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.Construction.Conditions
|
|||||||
{
|
{
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
[DataDefinition]
|
[DataDefinition]
|
||||||
public class WirePanel : IEdgeCondition
|
public class WirePanel : IGraphCondition
|
||||||
{
|
{
|
||||||
[DataField("open")] public bool Open { get; private set; } = true;
|
[DataField("open")] public bool Open { get; private set; } = true;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Shared.Construction
|
|||||||
private List<ConstructionGraphStep> _steps = new();
|
private List<ConstructionGraphStep> _steps = new();
|
||||||
|
|
||||||
[DataField("conditions", serverOnly: true)]
|
[DataField("conditions", serverOnly: true)]
|
||||||
private List<IEdgeCondition> _conditions = new();
|
private List<IGraphCondition> _conditions = new();
|
||||||
|
|
||||||
[DataField("completed", serverOnly: true)]
|
[DataField("completed", serverOnly: true)]
|
||||||
private List<IGraphAction> _completed = new();
|
private List<IGraphAction> _completed = new();
|
||||||
@@ -24,7 +24,7 @@ namespace Content.Shared.Construction
|
|||||||
public string Target { get; private set; } = string.Empty;
|
public string Target { get; private set; } = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public IReadOnlyList<IEdgeCondition> Conditions => _conditions;
|
public IReadOnlyList<IGraphCondition> Conditions => _conditions;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public IReadOnlyList<IGraphAction> Completed => _completed;
|
public IReadOnlyList<IGraphAction> Completed => _completed;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using Robust.Shared.Utility;
|
|||||||
|
|
||||||
namespace Content.Shared.Construction
|
namespace Content.Shared.Construction
|
||||||
{
|
{
|
||||||
public interface IEdgeCondition
|
public interface IGraphCondition
|
||||||
{
|
{
|
||||||
Task<bool> Condition(IEntity entity);
|
Task<bool> Condition(IEntity entity);
|
||||||
bool DoExamine(IEntity entity, FormattedMessage message, bool inExamineRange) { return false; }
|
bool DoExamine(IEntity entity, FormattedMessage message, bool inExamineRange) { return false; }
|
||||||
Reference in New Issue
Block a user