Allow sound to play at the start of anomaly supercritical animation (#36260)

* Add datafield to AnomalyComponent to play a sound when an anomaly enters supercriticality

* use Entity<T> pattern

* use implicit default for nullable

* don't forget to resolve the AnomalyComponent...

* Add comment for StartSupercriticalEvent "ent" parameter

* use implicit casts from Entity<T> to EntityUid

* StartSupercriticalEvent requires AnomalyComponent to resolve
This commit is contained in:
Quantum-cross
2025-04-08 05:11:32 -04:00
committed by GitHub
parent 5cc8b01e64
commit 716c0ef51f
3 changed files with 23 additions and 12 deletions

View File

@@ -129,6 +129,12 @@ public sealed partial class AnomalyComponent : Component
/// </summary>
[DataField]
public SoundSpecifier? SupercriticalSound = new SoundCollectionSpecifier("Explosion");
/// <summary>
/// The sound plays at the start of the animation when an anomaly goes supercritical
/// </summary>
[DataField]
public SoundSpecifier? SupercriticalSoundAtAnimationStart;
#endregion
/// <summary>