[Fix] Mood system fix (#439)

* mood back

* fix ready
This commit is contained in:
HitPanda
2023-09-25 01:44:44 +03:00
committed by Aviu00
parent c58225fc98
commit 2cd1656188
47 changed files with 1221 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.White.Mood;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;
@@ -58,7 +59,21 @@ public sealed class InteractionPopupSystem : EntitySystem
if (_random.Prob(component.SuccessChance))
{
if (component.InteractSuccessString != null)
{
msg = Loc.GetString(component.InteractSuccessString, ("target", Identity.Entity(uid, EntityManager))); // Success message (localized).
//WD start
if (component.InteractSuccessString == "hugging-success-generic")
{
var ev = new MoodEffectEvent("BeingHugged");
RaiseLocalEvent(uid, ev);
}
else if (component.InteractSuccessString.Contains("petting-success-"))
{
var ev = new MoodEffectEvent("PetAnimal");
RaiseLocalEvent(args.User, ev);
}
//WD end
}
if (component.InteractSuccessSound != null)
sfx = component.InteractSuccessSound;