Remove radiation & explosion damage logs. Add better explosion-trigger logs (#5689)

This commit is contained in:
Leon Friedrich
2021-12-05 15:34:32 +13:00
committed by GitHub
parent 8a236cdba8
commit ae65418c52
9 changed files with 62 additions and 83 deletions

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using Content.Shared.Acts;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Content.Shared.Radiation;
using Robust.Shared.Analyzers;
@@ -13,8 +12,6 @@ using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.ViewVariables;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
namespace Content.Shared.Damage
{
@@ -95,11 +92,7 @@ namespace Content.Shared.Damage
damage.DamageDict.Add(typeID, damageValue);
}
var actual = EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
// should logging be disabled during rad storms? a lot of entities are going to be damaged.
if (actual != null && !actual.Empty)
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Radiation, $"{Owner} took {actual.Total} radiation damage");
EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
}
// TODO EXPLOSION Remove this.
@@ -120,11 +113,7 @@ namespace Content.Shared.Damage
damage.DamageDict.Add(typeID, damageValue);
}
var actual = EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
// will logging handle nukes?
if (actual != null && !actual.Empty)
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Explosion, $"{Owner} took {actual.Total} explosion damage");
EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
}
}