Fix dead mobs sneezing and coughing (#12919)
* Fix dead mobs sneezing and coughing * SneezeCough update * Streamlined Event code, moved dead-check * cleanup * I can has merge? * Shared event for SharedMobStateSystem
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using Content.Server.Disease;
|
||||
using Content.Shared.Audio;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
@@ -14,7 +10,6 @@ public sealed class UncontrollableSnoughSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly DiseaseSystem _diseaseSystem = default!;
|
||||
[Dependency] private readonly AudioSystem _audioSystem = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
@@ -43,10 +38,7 @@ public sealed class UncontrollableSnoughSystem : EntitySystem
|
||||
snough.NextIncidentTime +=
|
||||
_random.NextFloat(snough.TimeBetweenIncidents.X, snough.TimeBetweenIncidents.Y);
|
||||
|
||||
if (snough.SnoughSound != null)
|
||||
_audioSystem.PlayPvs(snough.SnoughSound, snough.Owner);
|
||||
|
||||
_diseaseSystem.SneezeCough(snough.Owner, null, snough.SnoughMessage, false);
|
||||
_diseaseSystem.SneezeCough(snough.Owner, null, snough.SnoughMessage, snough.SnoughSound, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user