Files
tbd-station-14/Content.Shared/Construction/ConstructionGraphStep.cs
Víctor Aguilera Puerto 745401a41e Data-oriented Construction System (#2152)
- Powerful
- Data-oriented
- Approved by PJB
- Powered by node graphs and AI pathfinding
- Coded by the same nerd who brought you atmos

Co-authored-by: Exp <theexp111@gmail.com>
2020-10-08 17:41:23 +02:00

30 lines
984 B
C#

using System;
using System.Collections.Generic;
using Content.Shared.Interfaces;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Construction
{
[Serializable]
public abstract class ConstructionGraphStep : IExposeData
{
private List<IGraphAction> _completed;
public float DoAfter { get; private set; }
public IReadOnlyList<IGraphAction> Completed => _completed;
public virtual void ExposeData(ObjectSerializer serializer)
{
var moduleManager = IoCManager.Resolve<IModuleManager>();
serializer.DataField(this, x => x.DoAfter, "doAfter", 0f);
if (!moduleManager.IsServerModule) return;
serializer.DataField(ref _completed, "completed", new List<IGraphAction>());
}
public abstract void DoExamine(FormattedMessage message, bool inDetailsRange);
}
}