Change from using obsolete method in ExplosionOverlay (#30550)

* Change from obsolete method in ExplosionOverlay

* Send AppearanceSystem through constructor
This commit is contained in:
SlamBamActionman
2024-08-09 18:17:31 +01:00
committed by deltanedas
parent e6e95b635e
commit b1a606aee8
2 changed files with 8 additions and 6 deletions
@@ -20,6 +20,7 @@ public sealed class ExplosionOverlaySystem : EntitySystem
[Dependency] private readonly IOverlayManager _overlayMan = default!;
[Dependency] private readonly SharedPointLightSystem _lights = default!;
[Dependency] private readonly IMapManager _mapMan = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public override void Initialize()
{
@@ -28,7 +29,7 @@ public sealed class ExplosionOverlaySystem : EntitySystem
SubscribeLocalEvent<ExplosionVisualsComponent, ComponentInit>(OnExplosionInit);
SubscribeLocalEvent<ExplosionVisualsComponent, ComponentRemove>(OnCompRemove);
SubscribeLocalEvent<ExplosionVisualsComponent, ComponentHandleState>(OnExplosionHandleState);
_overlayMan.AddOverlay(new ExplosionOverlay());
_overlayMan.AddOverlay(new ExplosionOverlay(_appearance));
}
private void OnExplosionHandleState(EntityUid uid, ExplosionVisualsComponent component, ref ComponentHandleState args)