Content audio (#20862)

This commit is contained in:
metalgearsloth
2023-10-29 14:58:23 +11:00
committed by GitHub
parent cd280eef6b
commit 9b1b3e03ed
326 changed files with 890 additions and 436 deletions

View File

@@ -33,6 +33,8 @@ public sealed partial class EmaggableMedibotComponent : Component
/// <summary>
/// Sound to play when the bot has been emagged
/// </summary>
[DataField("sparkSound")]
public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks");
[DataField("sparkSound")] public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks")
{
Params = AudioParams.Default.WithVolume(8f),
};
}

View File

@@ -1,5 +1,6 @@
using Content.Shared.Emag.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
namespace Content.Shared.Silicons.Bots;
@@ -22,7 +23,7 @@ public sealed class MedibotSystem : EntitySystem
if (!TryComp<MedibotComponent>(uid, out var medibot))
return;
_audio.PlayPredicted(comp.SparkSound, uid, args.UserUid, AudioParams.Default.WithVolume(8));
_audio.PlayPredicted(comp.SparkSound, uid, args.UserUid);
medibot.StandardMed = comp.StandardMed;
medibot.StandardMedAmount = comp.StandardMedAmount;