ECS CablePlacer (#6371)

This commit is contained in:
metalgearsloth
2022-01-29 22:45:57 +11:00
committed by GitHub
parent 803d6056d8
commit b5f816c815
3 changed files with 63 additions and 57 deletions

View File

@@ -1,21 +1,29 @@
using Content.Server.Electrocution;
using Content.Server.Power.Components;
using Content.Server.Stack;
using Content.Server.Tools;
using Content.Shared.ActionBlocker;
using Content.Shared.Interaction;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Content.Server.Power.EntitySystems;
public class CableSystem : EntitySystem
public sealed partial class CableSystem : EntitySystem
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ITileDefinitionManager _tileManager = default!;
[Dependency] private readonly ToolSystem _toolSystem = default!;
[Dependency] private readonly StackSystem _stack = default!;
[Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!;
public override void Initialize()
{
base.Initialize();
InitializeCablePlacer();
SubscribeLocalEvent<CableComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<CableComponent, CuttingFinishedEvent>(OnCableCut);
SubscribeLocalEvent<CableComponent, AnchorStateChangedEvent>(OnAnchorChanged);