Stop drones from throwing (#6818)

This commit is contained in:
Rane
2022-02-20 01:02:05 -05:00
committed by GitHub
parent 6ed77509c1
commit e99694362f

View File

@@ -14,6 +14,7 @@ using Content.Server.UserInterface;
using Content.Shared.Emoting;
using Robust.Shared.Player;
using Content.Shared.Tag;
using Content.Shared.Throwing;
namespace Content.Server.Drone
{
@@ -31,6 +32,7 @@ namespace Content.Server.Drone
SubscribeLocalEvent<DroneComponent, MindAddedMessage>(OnMindAdded);
SubscribeLocalEvent<DroneComponent, MindRemovedMessage>(OnMindRemoved);
SubscribeLocalEvent<DroneComponent, EmoteAttemptEvent>(OnEmoteAttempt);
SubscribeLocalEvent<DroneComponent, ThrowAttemptEvent>(OnThrowAttempt);
}
private void OnInteractionAttempt(EntityUid uid, DroneComponent component, InteractionAttemptEvent args)
@@ -116,6 +118,11 @@ namespace Content.Server.Drone
args.Cancel();
}
private void OnThrowAttempt(EntityUid uid, DroneComponent drone, ThrowAttemptEvent args)
{
args.Cancel();
}
private void UpdateDroneAppearance(EntityUid uid, DroneStatus status)
{
if (TryComp<AppearanceComponent>(uid, out var appearance))