Fix welder making unwanted sounds (#1536)

* Fix Welding making sounds if not actually welded something

* Fix Sound Error

* -Hardcode bad
-Removed duplicate sound on suicide
This commit is contained in:
Exp
2020-07-29 15:14:04 +02:00
committed by GitHub
parent c1e328bf43
commit a7b2a1ad2f
3 changed files with 28 additions and 7 deletions

View File

@@ -108,11 +108,18 @@ namespace Content.Server.GameObjects.Components.Interactable
public void PlayUseSound(float volume=-5f)
{
if(string.IsNullOrEmpty(UseSoundCollection))
EntitySystem.Get<AudioSystem>()
.PlayFromEntity(UseSound, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
if (string.IsNullOrEmpty(UseSoundCollection))
{
if (!string.IsNullOrEmpty(UseSound))
{
EntitySystem.Get<AudioSystem>()
.PlayFromEntity(UseSound, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
}
}
else
{
PlaySoundCollection(UseSoundCollection, volume);
}
}
}
}