mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +00:00
22 lines
618 B
C#
22 lines
618 B
C#
using Content.Shared.Movement;
|
|
using Content.Shared.Shuttles.Components;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Shared.Shuttles
|
|
{
|
|
public abstract class SharedShuttleConsoleSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<PilotComponent, MovementAttemptEvent>(HandleMovementBlock);
|
|
}
|
|
|
|
private void HandleMovementBlock(EntityUid uid, PilotComponent component, MovementAttemptEvent args)
|
|
{
|
|
if (component.Console == null) return;
|
|
args.Cancel();
|
|
}
|
|
}
|
|
}
|