Snore is a trait now (#26322)

This commit is contained in:
lzk
2024-03-22 08:00:57 +01:00
committed by GitHub
parent 4f816b4b2f
commit 3b3b874dd9
4 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
namespace Content.Server.Bed.Sleep;
/// <summary>
/// This is used for the snoring trait.
/// </summary>
[RegisterComponent]
public sealed partial class SnoringComponent : Component
{
}

View File

@@ -67,7 +67,10 @@ namespace Content.Server.Bed.Sleep
if (TryComp<SleepEmitSoundComponent>(uid, out var sleepSound))
{
var emitSound = EnsureComp<SpamEmitSoundComponent>(uid);
emitSound.Sound = sleepSound.Snore;
if (HasComp<SnoringComponent>(uid))
{
emitSound.Sound = sleepSound.Snore;
}
emitSound.PlayChance = sleepSound.Chance;
emitSound.RollInterval = sleepSound.Interval;
emitSound.PopUp = sleepSound.PopUp;

View File

@@ -32,3 +32,6 @@ trait-frontal-lisp-desc = You thpeak with a lithp
trait-socialanxiety-name = Social Anxiety
trait-socialanxiety-desc = You are anxious when you speak and stutter.
trait-snoring-name = Snoring
trait-snoring-desc = You will snore while sleeping.

View File

@@ -60,3 +60,10 @@
description: trait-frontal-lisp-desc
components:
- type: FrontalLisp
- type: trait
id: Snoring
name: trait-snoring-name
description: trait-snoring-desc
components:
- type: Snoring