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:
@@ -19,6 +19,7 @@ using Robust.Shared.Player;
|
|||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
using Content.Shared.Interaction.Components;
|
||||||
|
|
||||||
namespace Content.Server.Bed.Sleep
|
namespace Content.Server.Bed.Sleep
|
||||||
{
|
{
|
||||||
@@ -62,13 +63,14 @@ namespace Content.Server.Bed.Sleep
|
|||||||
EnsureComp<StunnedComponent>(uid);
|
EnsureComp<StunnedComponent>(uid);
|
||||||
EnsureComp<KnockedDownComponent>(uid);
|
EnsureComp<KnockedDownComponent>(uid);
|
||||||
|
|
||||||
var emitSound = EnsureComp<SpamEmitSoundComponent>(uid);
|
if (TryComp<SleepEmitSoundComponent>(uid, out var sleepSound))
|
||||||
|
{
|
||||||
// TODO WTF is this, these should a data fields and not hard-coded.
|
var emitSound = EnsureComp<SpamEmitSoundComponent>(uid);
|
||||||
emitSound.Sound = new SoundCollectionSpecifier("Snores", AudioParams.Default.WithVariation(0.2f));
|
emitSound.Sound = sleepSound.Snore;
|
||||||
emitSound.PlayChance = 0.33f;
|
emitSound.PlayChance = sleepSound.Chance;
|
||||||
emitSound.RollInterval = 5f;
|
emitSound.RollInterval = sleepSound.Interval;
|
||||||
emitSound.PopUp = "sleep-onomatopoeia";
|
emitSound.PopUp = sleepSound.PopUp;
|
||||||
|
}
|
||||||
|
|
||||||
if (wakeAction != null)
|
if (wakeAction != null)
|
||||||
{
|
{
|
||||||
|
|||||||
31
Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs
Normal file
31
Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Robust.Shared.Audio;
|
||||||
|
|
||||||
|
namespace Content.Shared.Bed.Sleep;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed class SleepEmitSoundComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sound to play when sleeping
|
||||||
|
/// </summary>
|
||||||
|
[DataField("snore"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public SoundSpecifier Snore = new SoundCollectionSpecifier("Snores", AudioParams.Default.WithVariation(0.2f));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interval between snore attempts in seconds
|
||||||
|
/// </summary>
|
||||||
|
[DataField("interval"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public float Interval = 5f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chance for snore attempt to succeed
|
||||||
|
/// </summary>
|
||||||
|
[DataField("chance"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public float Chance = 0.33f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Popup for snore (e.g. Zzz...)
|
||||||
|
/// </summary>
|
||||||
|
[DataField("popUp"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public string PopUp = "sleep-onomatopoeia";
|
||||||
|
}
|
||||||
@@ -6,3 +6,13 @@
|
|||||||
license: "CC-BY-SA-3.0"
|
license: "CC-BY-SA-3.0"
|
||||||
copyright: "Taken from tgstation"
|
copyright: "Taken from tgstation"
|
||||||
source: "https://github.com/tgstation/tgstation/tree/ae9767664701396501af5dcef8e34c4b5add3d47/sound/ambience"
|
source: "https://github.com/tgstation/tgstation/tree/ae9767664701396501af5dcef8e34c4b5add3d47/sound/ambience"
|
||||||
|
|
||||||
|
- files: ["cute_snore.ogg"]
|
||||||
|
license: "CC-BY-4.0"
|
||||||
|
copyright: "Created by Trogg, converted to mono and ogg by slava0135"
|
||||||
|
source: "https://freesound.org/people/Trogg/sounds/489478/"
|
||||||
|
|
||||||
|
- files: ["silly_snore.ogg"]
|
||||||
|
license: "CC0-1.0"
|
||||||
|
copyright: "Created by Snore Man, converted to mono and ogg by slava0135"
|
||||||
|
source: "https://soundbible.com/1683-Silly-Snoring.html"
|
||||||
|
|||||||
BIN
Resources/Audio/Voice/Misc/cute_snore.ogg
Normal file
BIN
Resources/Audio/Voice/Misc/cute_snore.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Voice/Misc/silly_snore.ogg
Normal file
BIN
Resources/Audio/Voice/Misc/silly_snore.ogg
Normal file
Binary file not shown.
@@ -302,6 +302,7 @@
|
|||||||
price: 1500 # Kidnapping a living person and selling them for cred is a good move.
|
price: 1500 # Kidnapping a living person and selling them for cred is a good move.
|
||||||
deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less.
|
deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less.
|
||||||
- type: ContentEye
|
- type: ContentEye
|
||||||
|
- type: SleepEmitSound
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
save: false
|
save: false
|
||||||
|
|||||||
@@ -19,6 +19,10 @@
|
|||||||
Piercing: 4
|
Piercing: 4
|
||||||
groups:
|
groups:
|
||||||
Burn: 3
|
Burn: 3
|
||||||
|
- type: SleepEmitSound
|
||||||
|
snore: /Audio/Voice/Misc/silly_snore.ogg
|
||||||
|
interval: 10
|
||||||
|
chance: 1.0
|
||||||
- !type:AddImplantSpecial
|
- !type:AddImplantSpecial
|
||||||
implants: [ SadTromboneImplant ]
|
implants: [ SadTromboneImplant ]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user