clown mimimi sleeping sound (#18127)

* clown mimimi sleeping sound

* make its own component

* different sound (with attribution)

* oopsie

* back to mimimi (with attribution)
This commit is contained in:
Slava0135
2023-07-19 11:55:50 +03:00
committed by GitHub
parent 31ae0d332c
commit 2eb6689834
7 changed files with 56 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Content.Shared.Interaction.Components;
namespace Content.Server.Bed.Sleep
{
@@ -62,13 +63,14 @@ namespace Content.Server.Bed.Sleep
EnsureComp<StunnedComponent>(uid);
EnsureComp<KnockedDownComponent>(uid);
var emitSound = EnsureComp<SpamEmitSoundComponent>(uid);
// TODO WTF is this, these should a data fields and not hard-coded.
emitSound.Sound = new SoundCollectionSpecifier("Snores", AudioParams.Default.WithVariation(0.2f));
emitSound.PlayChance = 0.33f;
emitSound.RollInterval = 5f;
emitSound.PopUp = "sleep-onomatopoeia";
if (TryComp<SleepEmitSoundComponent>(uid, out var sleepSound))
{
var emitSound = EnsureComp<SpamEmitSoundComponent>(uid);
emitSound.Sound = sleepSound.Snore;
emitSound.PlayChance = sleepSound.Chance;
emitSound.RollInterval = sleepSound.Interval;
emitSound.PopUp = sleepSound.PopUp;
}
if (wakeAction != null)
{