ChatManager murder (#7337)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Threading;
|
||||
using Content.Server.Chat;
|
||||
using Content.Shared.Disease;
|
||||
using Content.Shared.Disease.Components;
|
||||
using Content.Server.Disease.Components;
|
||||
@@ -40,6 +41,7 @@ namespace Content.Server.Disease
|
||||
SubscribeLocalEvent<DiseaseCarrierComponent, CureDiseaseAttemptEvent>(OnTryCureDisease);
|
||||
SubscribeLocalEvent<DiseasedComponent, InteractHandEvent>(OnInteractDiseasedHand);
|
||||
SubscribeLocalEvent<DiseasedComponent, InteractUsingEvent>(OnInteractDiseasedUsing);
|
||||
SubscribeLocalEvent<DiseasedComponent, EntitySpokeEvent>(OnEntitySpeak);
|
||||
SubscribeLocalEvent<DiseaseProtectionComponent, GotEquippedEvent>(OnEquipped);
|
||||
SubscribeLocalEvent<DiseaseProtectionComponent, GotUnequippedEvent>(OnUnequipped);
|
||||
SubscribeLocalEvent<DiseaseVaccineComponent, AfterInteractEvent>(OnAfterInteract);
|
||||
@@ -204,6 +206,14 @@ namespace Content.Server.Disease
|
||||
InteractWithDiseased(args.Target, args.User);
|
||||
}
|
||||
|
||||
private void OnEntitySpeak(EntityUid uid, DiseasedComponent component, EntitySpokeEvent args)
|
||||
{
|
||||
if (TryComp<DiseaseCarrierComponent>(uid, out var carrier))
|
||||
{
|
||||
SneezeCough(uid, _random.Pick(carrier.Diseases), string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a vaccine is used on someone
|
||||
/// to handle the vaccination doafter
|
||||
|
||||
Reference in New Issue
Block a user