Skip to content

Commit

Permalink
Fix Moods
Browse files Browse the repository at this point in the history
  • Loading branch information
Roudenn committed Jan 12, 2025
1 parent 27d6e22 commit 1fa771b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Content.Server/Backmen/Mood/MoodSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,15 @@ private void OnAlertClicked(EntityUid uid, MoodComponent component, MoodCheckAle

foreach (var (_, protoId) in component.CategorisedEffects)
{
if (!_prototypeManager.TryIndex<MoodEffectPrototype>(protoId, out var proto)
|| proto.Hidden)
if (!_prototypeManager.TryIndex<MoodEffectPrototype>(protoId, out var proto))
continue;

SendDescToChat(proto, session);
}

foreach (var (protoId, _) in component.UncategorisedEffects)
{
if (!_prototypeManager.TryIndex<MoodEffectPrototype>(protoId, out var proto)
|| proto.Hidden)
if (!_prototypeManager.TryIndex<MoodEffectPrototype>(protoId, out var proto))
continue;

SendDescToChat(proto, session);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Backmen/Mood/MoodEffectPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class MoodEffectPrototype : IPrototype
public int Timeout;

/// <summary>
/// Should this moodlet be hidden from the player? EG: No popups or chat messages.
/// Should this moodlet be hidden from the player? EG: No popups.
/// </summary>
[DataField]
public bool Hidden;
Expand Down
8 changes: 8 additions & 0 deletions Resources/Prototypes/_Backmen/Mood/drugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
timeout: 900 #15 minutes
moodletOnEnd: LotoEnthrallment
category: "LotophagoiAddiction"
hidden: true

- type: moodEffect
id: LotoEnthrallment
moodChange: -30
timeout: 3600 #1 hour
category: "LotophagoiAddiction"
hidden: true

- type: moodCategory
id: LotophagoiAddiction
Expand All @@ -24,11 +26,13 @@
timeout: 600 #10 minutes
moodletOnEnd: NicotineWithdrawal
category: "NicotineAddiction"
hidden: true

- type: moodEffect
id: NicotineWithdrawal
moodChange: -7 #No timeout
category: "NicotineAddiction"
hidden: true

- type: moodCategory
id: NicotineAddiction
Expand All @@ -40,12 +44,14 @@
timeout: 480 #6 minutes
moodletOnEnd: SpaceDrugsWithdrawal
category: "SpaceDrugsAddiction"
hidden: true

- type: moodEffect
id: SpaceDrugsWithdrawal
moodChange: -20
category: "SpaceDrugsAddiction"
timeout: 1200 #20 minutes
hidden: true

- type: moodCategory
id: SpaceDrugsAddiction
Expand All @@ -57,12 +63,14 @@
timeout: 300 #5 minutes
moodletOnEnd: HappinessWithdrawal
category: "HappinessAddiction"
hidden: true

- type: moodEffect
id: HappinessWithdrawal
moodChange: -20
category: "HappinessAddiction"
timeout: 600 #10 minutes
hidden: true

- type: moodCategory
id: HappinessAddiction
17 changes: 15 additions & 2 deletions Resources/Prototypes/_Backmen/Mood/genericNeeds.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,81 @@
# Hunger
- type: moodEffect
id: HungerOverfed
moodChange: -10
moodChange: 10
category: "Hunger"
hidden: true

- type: moodEffect
id: HungerOkay
moodChange: 7
category: "Hunger"
hidden: true

- type: moodEffect
id: HungerPeckish
moodChange: -3
category: "Hunger"
hidden: true

- type: moodEffect
id: HungerStarving
moodChange: -7
category: "Hunger"
hidden: true

# Thirst
- type: moodEffect
id: ThirstOverHydrated
moodChange: -3
moodChange: 10
category: "Thirst"
hidden: true

- type: moodEffect
id: ThirstOkay
moodChange: 7
category: "Thirst"
hidden: true

- type: moodEffect
id: ThirstThirsty
moodChange: -3
category: "Thirst"
hidden: true

- type: moodEffect
id: ThirstParched
moodChange: -7
category: "Thirst"
hidden: true

# Health
- type: moodEffect
id: HealthNoDamage
moodChange: 0
hidden: true
category: "Health"
hidden: true

- type: moodEffect
id: HealthLightDamage
moodChange: -3
category: "Health"
hidden: true

- type: moodEffect
id: HealthOkayDamage
moodChange: -7
category: "Health"
hidden: true

- type: moodEffect
id: HealthSevereDamage
moodChange: -12
category: "Health"
hidden: true

- type: moodEffect
id: HealthHeavyDamage
moodChange: -20
category: "Health"
hidden: true
9 changes: 9 additions & 0 deletions Resources/Prototypes/_Backmen/Mood/genericNegativeEffects.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
- type: moodEffect
id: Handcuffed
moodChange: -3
hidden: true

- type: moodEffect
id: Suffocating
moodChange: -7
timeout: 6
hidden: true

- type: moodEffect
id: OnFire
moodChange: -10
timeout: 180
hidden: true

- type: moodEffect
id: Creampied
moodChange: -3
timeout: 180
hidden: true

- type: moodEffect
id: MobSlipped
moodChange: -3
timeout: 30
hidden: true

- type: moodEffect
id: MobVomit
moodChange: -5
timeout: 300
hidden: true

- type: moodEffect
id: MobLowPressure
Expand All @@ -36,14 +42,17 @@
id: MobHighPressure
moodChange: -7
timeout: 10
hidden: true

- type: moodEffect
id: TraitSaturnine
moodChange: -20
hidden: true

- type: moodEffect
id: TraitFortitude
moodChange: -10
hidden: true

- type: moodEffect
id: Dead
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/_Backmen/Mood/genericPositiveEffects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,24 @@
- type: moodEffect
id: TraitorFocused # Used for traitors to boost their goals completion.
moodChange: 7
hidden: true

- type: moodEffect
id: NukeopsFocused # Used for nukies
moodChange: 10
hidden: true

- type: moodEffect
id: RevolutionFocused # Used for revolution
moodChange: 7
hidden: true

- type: moodEffect
id: CultFocused
moodChange: 10
hidden: true

- type: moodEffect
id: TraitSanguine # Happi! Also used for Clown
moodChange: 15
hidden: true

0 comments on commit 1fa771b

Please sign in to comment.