Refactor drone tool checks (#6643)

This commit is contained in:
Rane
2022-02-12 19:14:24 -05:00
committed by GitHub
parent d8127d4a94
commit be853b2529
4 changed files with 20 additions and 32 deletions

View File

@@ -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
{