Refactor drone tool checks (#6643)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Drone.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent]
|
||||
public sealed class DroneToolComponent : Component {}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Containers;
|
||||
using Content.Shared.Drone.Components;
|
||||
|
||||
namespace Content.Shared.Drone
|
||||
{
|
||||
public abstract class SharedDroneSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<DroneToolComponent, ContainerGettingRemovedAttemptEvent>(OnRemoveAttempt);
|
||||
}
|
||||
|
||||
private void OnRemoveAttempt(EntityUid uid, DroneToolComponent tool, ContainerGettingRemovedAttemptEvent args)
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum DroneVisuals : byte
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user