Fix missing sounds (#4466)

* Fix missing sounds

* Make SoundHitSpecies fallback to SoundHit

* Fix crayon YAML

* Update PlaySoundBehavior YAML

* Fix required
This commit is contained in:
ShadowCommander
2021-08-13 21:31:37 -07:00
committed by GitHub
parent e938234e8c
commit b8e6a996d4
29 changed files with 104 additions and 45 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Content.Server.Storage.Components;
using Content.Shared.Notification.Managers;
using Content.Shared.Sound;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
@@ -25,7 +26,7 @@ namespace Content.Server.Light.Components
{
public override string Name => "LightReplacer";
[DataField("sound")] private string _sound = "/Audio/Weapons/click.ogg";
[DataField("sound")] private SoundSpecifier _sound = new SoundPathSpecifier("/Audio/Weapons/click.ogg");
// bulbs that were inside light replacer when it spawned
[DataField("contents")] private List<LightReplacerEntity> _contents = new();
@@ -82,8 +83,8 @@ namespace Content.Server.Light.Components
var wasReplaced = fixture.ReplaceBulb(bulb);
if (wasReplaced)
{
EntitySystem.Get<AudioSystem>().Play(Filter.Broadcast(), _sound,
Owner, AudioParams.Default.WithVolume(-4f));
SoundSystem.Play(Filter.Pvs(Owner), _sound.GetSound(), Owner,
AudioParams.Default.WithVolume(-4f));
}