using Content.Shared.GameTicking;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server._Sunrise;
///
/// A small system that handles event-based cleanup for the NetTexturesManager.
/// Since NetTexturesManager is a standalone manager, it cannot safely subscribe to broadcast events.
///
public sealed class NetTexturesCleanupSystem : EntitySystem
{
[Dependency] private readonly NetTexturesManager _netTexturesManager = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent(OnRoundRestart);
}
private void OnRoundRestart(RoundRestartCleanupEvent ev)
{
_netTexturesManager.ClearDynamicResources();
}
}