Drones stop emoting challenge (#6735)

This commit is contained in:
mirrorcult
2022-02-15 21:00:36 -07:00
committed by GitHub
parent d5bcfbf9ff
commit 2e033b816e

View File

@@ -8,6 +8,7 @@ using Content.Server.Mind.Components;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Hands.Components;
using Content.Shared.Body.Components;
using Content.Shared.Emoting;
using Robust.Shared.Player;
using Content.Shared.Tag;
@@ -24,6 +25,7 @@ namespace Content.Server.Drone
SubscribeLocalEvent<DroneComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<DroneComponent, MindAddedMessage>(OnMindAdded);
SubscribeLocalEvent<DroneComponent, MindRemovedMessage>(OnMindRemoved);
SubscribeLocalEvent<DroneComponent, EmoteAttemptEvent>(OnEmoteAttempt);
}
private void OnExamined(EntityUid uid, DroneComponent component, ExaminedEvent args)
@@ -90,6 +92,12 @@ namespace Content.Server.Drone
EnsureComp<GhostTakeoverAvailableComponent>(uid);
}
private void OnEmoteAttempt(EntityUid uid, DroneComponent component, EmoteAttemptEvent args)
{
// No.
args.Cancel();
}
private void UpdateDroneAppearance(EntityUid uid, DroneStatus status)
{
if (TryComp<AppearanceComponent>(uid, out var appearance))