removed TryGetSound + made some SoundSpecifier datafields required

This commit is contained in:
Galactic Chimp
2021-07-31 19:52:33 +02:00
parent 8ff703c338
commit 57016d14b4
114 changed files with 519 additions and 785 deletions

View File

@@ -89,9 +89,8 @@ namespace Content.Server.Singularity.Components
audioParams.Loop = true;
audioParams.MaxDistance = 20f;
audioParams.Volume = 5;
if(_singularityFormingSound.TryGetSound(out var singuloFormingSound))
SoundSystem.Play(Filter.Pvs(Owner), singuloFormingSound, Owner);
Timer.Spawn(5200,() => _playingSound = SoundSystem.Play(Filter.Pvs(Owner), _singularitySound.GetSound(), Owner, audioParams));
SoundSystem.Play(Filter.Pvs(Owner), _singularityFormingSound.GetSound(), Owner);
Timer.Spawn(5200, () => _playingSound = SoundSystem.Play(Filter.Pvs(Owner), _singularitySound.GetSound(), Owner, audioParams));
_singularitySystem.ChangeSingularityLevel(this, 1);
}
@@ -104,8 +103,7 @@ namespace Content.Server.Singularity.Components
protected override void OnRemove()
{
_playingSound?.Stop();
if(_singularityCollapsingSound.TryGetSound(out var singuloCollapseSound))
SoundSystem.Play(Filter.Pvs(Owner), singuloCollapseSound, Owner.Transform.Coordinates);
SoundSystem.Play(Filter.Pvs(Owner), _singularityCollapsingSound.GetSound(), Owner.Transform.Coordinates);
base.OnRemove();
}
}