* DoAfters * Compact Clone() * Fix mice and cuffables * Try generalize attempt events * moves climbabledoafter event to shared, fixes issue with climbable target * Fix merge (cuffing) * Make all events netserializable * handful of doafter events moved * moves the rest of the events to their respective shared folders * Changes all mentions of server doafter to shared * stop stripping cancellation * fix merge errors * draw paused doafters * handle unpausing * missing netserializable ref * removes break on stun reference * removes cuffing state reference * Fix tools * Fix door prying. * Fix construction * Fix dumping * Fix wielding assert * fix rev * Fix test * more test fixes --------- Co-authored-by: keronshb <keronshb@live.com>
46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
using Content.Shared.Construction.Prototypes;
|
|
using Content.Shared.DoAfter;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Construction.Components
|
|
{
|
|
[RegisterComponent, Access(typeof(ConstructionSystem))]
|
|
public sealed class ConstructionComponent : Component
|
|
{
|
|
[DataField("graph", required:true, customTypeSerializer:typeof(PrototypeIdSerializer<ConstructionGraphPrototype>))]
|
|
public string Graph { get; set; } = string.Empty;
|
|
|
|
[DataField("node", required:true)]
|
|
public string Node { get; set; } = default!;
|
|
|
|
[DataField("edge")]
|
|
public int? EdgeIndex { get; set; } = null;
|
|
|
|
[DataField("step")]
|
|
public int StepIndex { get; set; } = 0;
|
|
|
|
[DataField("containers")]
|
|
public HashSet<string> Containers { get; set; } = new();
|
|
|
|
[DataField("defaultTarget")]
|
|
public string? TargetNode { get; set; } = null;
|
|
|
|
[ViewVariables]
|
|
public int? TargetEdgeIndex { get; set; } = null;
|
|
|
|
[ViewVariables]
|
|
public Queue<string>? NodePathfinding { get; set; } = null;
|
|
|
|
[DataField("deconstructionTarget")]
|
|
public string? DeconstructionNode { get; set; } = "start";
|
|
|
|
[DataField("doAfter")]
|
|
public DoAfterId? DoAfter;
|
|
|
|
[ViewVariables]
|
|
// TODO Force flush interaction queue before serializing to YAML.
|
|
// Otherwise you can end up with entities stuck in invalid states (e.g., waiting for DoAfters).
|
|
public readonly Queue<object> InteractionQueue = new();
|
|
}
|
|
}
|