mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
This PR significantly reworks some parts of the mood system, namely by completely restoring and reworking the saturation scale shader so that its not completely terrible. Additionally, I've added numerous new instances and locations where Moodlets can be found in the game, particularly when it comes to food and drugs, as well as a new Mood interaction with the Deep Fryer. Chef gameplay is significantly expanded via the introduction of flavor related moodlets, as well as the almighty deep fryer giving a unique, moderately strong, and long lasting moodlet to anyone who eats whatever you deep fry. Go ahead, give someone a deep fried stick of salted butter coated in chocolate. You'll make their day. The big differences with the Saturation Scale are that its now variable, with smooth transitions, with the scale scaling with your character's mood. The more depressed you are, the more desaturated the world becomes. Whereas if you have entirely too many positive mood bonuses, the world becomes incredibly vibrant. <details><summary><h1>Media</h1></summary> <p> Shoukou's Bar as seen by someone with the Sanguine trait(and no other moodlets)  Max mood  Saturnine trait:  Minimum mood(dead)  Smooth transitions for shader tone. https://github.com/user-attachments/assets/3ab55da1-eca6-4cc5-9489-f4ad13ed0f27 </p> </details> 🆑 - add: Re-enabled the "Mood shader" after significantly reworking it. Mood visual effects now scale with your character's mood, instead of only ever being near-greyscale. Being high life now makes the world more colorful and saturated. - add: A huge variety of medicines, drugs, and even food items(based on flavor!) now have mood effects. Reaching for the packet of salt now actually makes food provide a better mood buff. - add: Being Tear-gassed causes a massive mood penalty. - add: Deep frying food provides a strong mood bonus. - add: Added new Manic, Mercurial, and Dead Emotions traits. Signed-off-by: VMSolidus <evilexecutive@gmail.com>
46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using Content.Server.Mood;
|
|
using Content.Shared.EntityEffects;
|
|
using Content.Shared.Mood;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.EntityEffects.Effects;
|
|
|
|
/// <summary>
|
|
/// Removes all non-categorized moodlets from an entity(anything not "Static" like hunger & thirst).
|
|
/// </summary>
|
|
[UsedImplicitly]
|
|
public sealed partial class ChemPurgeMoodlets : EntityEffect
|
|
{
|
|
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
|
|
Loc.GetString("reagent-effect-guidebook-purge-moodlets");
|
|
|
|
[DataField]
|
|
public bool RemovePermanentMoodlets;
|
|
|
|
public override void Effect(EntityEffectBaseArgs args)
|
|
{
|
|
if (args is not EntityEffectReagentArgs _)
|
|
return;
|
|
|
|
var entityManager = IoCManager.Resolve<EntityManager>();
|
|
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
|
|
|
if (!entityManager.TryGetComponent(args.TargetEntity, out MoodComponent? moodComponent))
|
|
return;
|
|
|
|
var moodletList = new List<string>();
|
|
foreach (var moodlet in moodComponent.UncategorisedEffects)
|
|
{
|
|
if (!protoMan.TryIndex(moodlet.Key, out MoodEffectPrototype? moodProto)
|
|
|| moodProto.Timeout == 0 && !RemovePermanentMoodlets)
|
|
continue;
|
|
|
|
moodletList.Add(moodlet.Key);
|
|
}
|
|
|
|
foreach (var moodId in moodletList)
|
|
entityManager.EventBus.RaiseLocalEvent(args.TargetEntity, new MoodRemoveEffectEvent(moodId));
|
|
}
|
|
}
|