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

@@ -100,11 +100,8 @@ namespace Content.Server.Light.Components
switch (CurrentState)
{
case ExpendableLightState.Lit:
if (LitSound.TryGetSound(out var litSound))
{
SoundSystem.Play(Filter.Pvs(Owner), litSound, Owner);
}
SoundSystem.Play(Filter.Pvs(Owner), LitSound.GetSound(), Owner);
if (IconStateLit != string.Empty)
{
sprite.LayerSetState(2, IconStateLit);
@@ -119,11 +116,7 @@ namespace Content.Server.Light.Components
default:
case ExpendableLightState.Dead:
if (DieSound.TryGetSound(out var dieSound))
{
SoundSystem.Play(Filter.Pvs(Owner), dieSound, Owner);
}
SoundSystem.Play(Filter.Pvs(Owner), DieSound.GetSound(), Owner);
sprite.LayerSetState(0, IconStateSpent);
sprite.LayerSetShader(0, "shaded");