[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

@@ -2,6 +2,7 @@ using Content.Shared.Arcade;
using Robust.Server.GameObjects;
using Robust.Shared.Random;
using System.Linq;
using Content.Shared.White.Mood;
namespace Content.Server.Arcade.BlockGame;
@@ -82,6 +83,10 @@ public sealed partial class BlockGame
{
_highScorePlacement = _arcadeSystem.RegisterHighScore(meta.EntityName, Points);
SendHighscoreUpdate();
//WD start
var ev = new MoodEffectEvent("ArcadePlay");
_entityManager.EventBus.RaiseLocalEvent(meta.Owner, ev);
//WD end
}
SendMessage(new BlockGameMessages.BlockGameGameOverScreenMessage(Points, _highScorePlacement?.LocalPlacement, _highScorePlacement?.GlobalPlacement));
}

View File

@@ -1,5 +1,6 @@
using Content.Server.Power.Components;
using Content.Server.UserInterface;
using Content.Shared.White.Mood;
using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
@@ -73,6 +74,9 @@ public sealed partial class SpaceVillainArcadeSystem : EntitySystem
if (!TryComp<ApcPowerReceiverComponent>(uid, out var power) || !power.Powered)
return;
if (msg.Session.AttachedEntity != null)
RaiseLocalEvent(msg.Session.AttachedEntity.Value, new MoodEffectEvent("ArcadePlay")); //WD edit
switch (msg.PlayerAction)
{
case PlayerAction.Attack: