adds a few logitems & bumps bullethit to high/extreme, depending on if a player was hit
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Body.Components;
|
|||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -57,7 +58,8 @@ namespace Content.Server.Projectiles
|
|||||||
component.DamagedEntity = true;
|
component.DamagedEntity = true;
|
||||||
|
|
||||||
if (dmg is not null && EntityManager.EntityExists(component.Shooter))
|
if (dmg is not null && EntityManager.EntityExists(component.Shooter))
|
||||||
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
|
_adminLogSystem.Add(LogType.BulletHit,
|
||||||
|
HasComp<ActorComponent>(otherEntity) ? LogImpact.Extreme : LogImpact.High,
|
||||||
$"Projectile {ToPrettyString(component.Owner):projectile} shot by {ToPrettyString(component.Shooter):user} hit {ToPrettyString(otherEntity):target} and dealt {dmg.Total:damage} damage");
|
$"Projectile {ToPrettyString(component.Owner):projectile} shot by {ToPrettyString(component.Shooter):user} hit {ToPrettyString(otherEntity):target} and dealt {dmg.Total:damage} damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.Power.EntitySystems;
|
using Content.Server.Power.EntitySystems;
|
||||||
using Content.Server.Projectiles.Components;
|
using Content.Server.Projectiles.Components;
|
||||||
using Content.Server.Singularity.Components;
|
using Content.Server.Singularity.Components;
|
||||||
using Content.Server.Storage.Components;
|
using Content.Server.Storage.Components;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
|
using Content.Shared.Database;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Singularity.Components;
|
using Content.Shared.Singularity.Components;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -26,6 +29,7 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
public class EmitterSystem : EntitySystem
|
public class EmitterSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly AdminLogSystem _adminLog = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -56,6 +60,10 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
SwitchOff(component);
|
SwitchOff(component);
|
||||||
component.Owner.PopupMessage(args.User, Loc.GetString("comp-emitter-turned-off", ("target", component.Owner)));
|
component.Owner.PopupMessage(args.User, Loc.GetString("comp-emitter-turned-off", ("target", component.Owner)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_adminLog.Add(LogType.Emitter,
|
||||||
|
component.IsOn ? LogImpact.Medium : LogImpact.High,
|
||||||
|
$"{ToPrettyString(args.User):player} toggled {ToPrettyString(uid):emitter}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,4 +60,5 @@ public enum LogType
|
|||||||
AtmosVolumeChanged = 56,
|
AtmosVolumeChanged = 56,
|
||||||
AtmosFilterChanged = 57,
|
AtmosFilterChanged = 57,
|
||||||
AtmosRatioChanged = 58,
|
AtmosRatioChanged = 58,
|
||||||
|
Emitter = 59,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user