Use chat emotes for disease (#15134)

* Use chat emote system for disease

* Use chat emotes in prototypes

* Fix sound path

* Fix prototype ids

* Update Content.Server/Disease/DiseaseSystem.cs

Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>

---------

Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
This commit is contained in:
Morb
2023-04-07 16:17:30 -07:00
committed by GitHub
parent a9c4867c59
commit 3c06b87572
26 changed files with 150 additions and 110 deletions

View File

@@ -27,7 +27,8 @@ public sealed class UncontrollableSnoughSystem : EntitySystem
{
base.Update(frameTime);
foreach (var snough in EntityQuery<UncontrollableSnoughComponent>())
var query = EntityQueryEnumerator<UncontrollableSnoughComponent>();
while (query.MoveNext(out var ent, out var snough))
{
snough.NextIncidentTime -= frameTime;
@@ -38,7 +39,7 @@ public sealed class UncontrollableSnoughSystem : EntitySystem
snough.NextIncidentTime +=
_random.NextFloat(snough.TimeBetweenIncidents.X, snough.TimeBetweenIncidents.Y);
_diseaseSystem.SneezeCough(snough.Owner, null, snough.SnoughMessage, snough.SnoughSound, false);
_diseaseSystem.SneezeCough(ent, null, snough.EmoteId, false);
}
}
}