Add log for slipping

This commit is contained in:
DrSmugleaf
2021-11-22 20:36:50 +01:00
parent 86ce2aeb22
commit 57b6efa3fd
2 changed files with 6 additions and 1 deletions

View File

@@ -7,4 +7,5 @@ public enum LogType
// DamageChange = 1 // DamageChange = 1
Damaged = 2, Damaged = 2,
Healed = 3, Healed = 3,
Slip = 4,
} }

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.StatusEffect; using Content.Shared.StatusEffect;
using Content.Shared.Stunnable; using Content.Shared.Stunnable;
using JetBrains.Annotations; using JetBrains.Annotations;
@@ -16,10 +17,11 @@ namespace Content.Shared.Slippery
[UsedImplicitly] [UsedImplicitly]
public abstract class SharedSlipperySystem : EntitySystem public abstract class SharedSlipperySystem : EntitySystem
{ {
[Dependency] private readonly SharedAdminLogSystem _adminLog = default!;
[Dependency] private readonly SharedStunSystem _stunSystem = default!; [Dependency] private readonly SharedStunSystem _stunSystem = default!;
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
private List<SlipperyComponent> _slipped = new(); private readonly List<SlipperyComponent> _slipped = new();
public override void Initialize() public override void Initialize()
{ {
@@ -98,6 +100,8 @@ namespace Content.Shared.Slippery
PlaySound(component); PlaySound(component);
_adminLog.Add(LogType.Slip, $"{component.Owner} slipped on collision with {otherBody.Owner}");
return true; return true;
} }