Moves ExamineSystem to Shared & adds next step info to construction examine (#1567)

This commit is contained in:
Exp
2020-08-01 17:37:12 +02:00
committed by GitHub
parent 7f0c379e87
commit c61e6d541b
21 changed files with 159 additions and 83 deletions

View File

@@ -1,6 +1,12 @@
using Content.Shared.Construction;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Shared.Construction;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Construction
@@ -9,8 +15,11 @@ namespace Content.Server.GameObjects.Components.Construction
/// Holds data about an entity that is in the process of being constructed or destructed.
/// </summary>
[RegisterComponent]
public class ConstructionComponent : Component
public class ConstructionComponent : Component, IExamine
{
#pragma warning disable 649
[Dependency] private readonly ILocalizationManager _loc;
#pragma warning restore 649
/// <inheritdoc />
public override string Name => "Construction";
@@ -37,5 +46,10 @@ namespace Content.Server.GameObjects.Components.Construction
serializer.DataReadWriteFunction("stage", 0,
value => Stage = value, () => Stage);
}
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
{
EntitySystem.Get<SharedConstructionSystem>().DoExamine(message, Prototype, Stage, inDetailsRange);
}
}
}