]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
add clumsy deletion logs (#14172)
authorChief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
Sun, 19 Feb 2023 05:38:38 +0000 (23:38 -0600)
committerGitHub <noreply@github.com>
Sun, 19 Feb 2023 05:38:38 +0000 (23:38 -0600)
Content.Server/Weapons/Ranged/Systems/GunSystem.cs

index 3443534a5ed5fd3152ae7d51a424df3f499485c9..cf4d6c7f8b548ab96e65c4d411ff9eb88ae4baf2 100644 (file)
@@ -1,4 +1,5 @@
 using System.Linq;
+using Content.Server.Administration.Logs;
 using Content.Server.Cargo.Systems;
 using Content.Server.Examine;
 using Content.Server.Interaction;
@@ -35,6 +36,7 @@ public sealed partial class GunSystem : SharedGunSystem
     [Dependency] private readonly PricingSystem _pricing = default!;
     [Dependency] private readonly StaminaSystem _stamina = default!;
     [Dependency] private readonly StunSystem _stun = default!;
+    [Dependency] private readonly IAdminLogManager _adminLogger = default!;
 
     public const float DamagePitchVariation = MeleeWeaponSystem.DamagePitchVariation;
     public const float GunClumsyChance = 0.5f;
@@ -79,6 +81,7 @@ public sealed partial class GunSystem : SharedGunSystem
                     Audio.PlayPvs(new SoundPathSpecifier("/Audio/Items/bikehorn.ogg"), gun.Owner);
 
                     PopupSystem.PopupEntity(Loc.GetString("gun-clumsy"), user.Value);
+                    _adminLogger.Add(LogType.EntityDelete, LogImpact.Medium, $"Clumsy fire by {ToPrettyString(user.Value)} deleted {ToPrettyString(gun.Owner)}");
                     Del(gun.Owner);
                     return;
                 }