replacing sound (collection) names with SoundSpecifier - part 1

This commit is contained in:
Galactic Chimp
2021-07-10 17:35:33 +02:00
parent 4500b66f28
commit ce3c59e0e6
131 changed files with 934 additions and 587 deletions

View File

@@ -106,9 +106,9 @@ namespace Content.Server.Light.Components
loopingSound.Play(LoopedSound, LoopedSoundParams);
}
if (LitSound != string.Empty)
if (LitSound.TryGetSound(out var litSound))
{
SoundSystem.Play(Filter.Pvs(Owner), LitSound, Owner);
SoundSystem.Play(Filter.Pvs(Owner), litSound, Owner);
}
if (IconStateLit != string.Empty)
@@ -126,9 +126,9 @@ namespace Content.Server.Light.Components
default:
case ExpendableLightState.Dead:
if (DieSound != string.Empty)
if (DieSound.TryGetSound(out var dieSound))
{
SoundSystem.Play(Filter.Pvs(Owner), DieSound, Owner);
SoundSystem.Play(Filter.Pvs(Owner), dieSound, Owner);
}
if (LoopedSound != string.Empty && Owner.TryGetComponent<LoopingLoopingSoundComponent>(out var loopSound))