Add log for slipping
This commit is contained in:
@@ -7,4 +7,5 @@ public enum LogType
|
|||||||
// DamageChange = 1
|
// DamageChange = 1
|
||||||
Damaged = 2,
|
Damaged = 2,
|
||||||
Healed = 3,
|
Healed = 3,
|
||||||
|
Slip = 4,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user