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:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user