Modify damage logging. (#5579)

This commit is contained in:
Leon Friedrich
2021-11-29 02:34:44 +13:00
committed by GitHub
parent b807250021
commit 0de4b7bc9f
28 changed files with 265 additions and 62 deletions

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using Content.Server.Administration.Logs;
using Content.Server.Alert;
using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.MobState.Components;
@@ -203,6 +205,11 @@ namespace Content.Server.Nutrition.Components
// _trySound(calculatedThreshold);
if (calculatedHungerThreshold != _currentHungerThreshold)
{
if (_currentHungerThreshold == HungerThreshold.Dead)
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{Owner} has stopped starving");
else if (calculatedHungerThreshold == HungerThreshold.Dead)
EntitySystem.Get<AdminLogSystem>().Add(LogType.Hunger, $"{Owner} has started starving");
_currentHungerThreshold = calculatedHungerThreshold;
HungerThresholdEffect();
Dirty();