Files
tbd-station-14/Content.Server/Administration/Logs/AdminLogSystem.cs
wrexbe 1e0babbd50 Make AdminLogsSystem an IoC manager (#8492)
* Make log not entity system

* Fixes
2022-05-28 23:41:17 -07:00

32 lines
842 B
C#

using Content.Server.GameTicking;
using Content.Server.GameTicking.Events;
namespace Content.Server.Administration.Logs;
/// <summary>
/// For system events that the manager needs to know about.
/// <see cref="IAdminLogManager"/> for admin log usage.
/// </summary>
public sealed class AdminLogSystem : EntitySystem
{
[Dependency] private readonly IAdminLogManager _adminLogs = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundStartingEvent>(ev => _adminLogs.RoundStarting(ev.Id));
SubscribeLocalEvent<GameRunLevelChangedEvent>(ev => _adminLogs.RunLevelChanged(ev.New));
}
public override void Update(float frameTime)
{
_adminLogs.Update();
}
public override void Shutdown()
{
_adminLogs.Shutdown();
}
}