[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

@@ -7,6 +7,7 @@ using Content.Shared.Database;
using Content.Shared.FixedPoint;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
using Content.Shared.White.Mood;
using Robust.Shared.Containers;
namespace Content.Server.Atmos.EntitySystems
@@ -203,6 +204,8 @@ namespace Content.Server.Atmos.EntitySystems
_adminLogger.Add(LogType.Barotrauma, $"{ToPrettyString(uid):entity} started taking low pressure damage");
}
RaiseLocalEvent(uid, new MoodEffectEvent("MobLowPressure")); // WD edit
if (pressure <= Atmospherics.HazardLowPressure)
{
_alertsSystem.ShowAlert(uid, AlertType.LowPressure, 2);
@@ -230,6 +233,8 @@ namespace Content.Server.Atmos.EntitySystems
_adminLogger.Add(LogType.Barotrauma, $"{ToPrettyString(uid):entity} started taking high pressure damage");
}
RaiseLocalEvent(uid, new MoodEffectEvent("MobHighPressure")); // WD edit
if (pressure >= Atmospherics.HazardHighPressure)
{
_alertsSystem.ShowAlert(uid, AlertType.HighPressure, 2);
@@ -247,6 +252,8 @@ namespace Content.Server.Atmos.EntitySystems
_adminLogger.Add(LogType.Barotrauma, $"{ToPrettyString(uid):entity} stopped taking pressure damage");
}
_alertsSystem.ClearAlertCategory(uid, AlertCategory.Pressure);
RaiseLocalEvent(uid, new MoodRemoveEffectEvent("MobLowPressure")); // WD edit
RaiseLocalEvent(uid, new MoodRemoveEffectEvent("MobHighPressure")); // WD edit
break;
}
}