mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
will do map refactor tomorrow, for now, planet lighting 🆑 * add: Ported planet lighting for indoor / outdoor areas. * add: Ported day-night cycle functionality. * add: Ported some Storage UI v2 fixes. --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: DoutorWhite <thedoctorwhite@gmail.com> Co-authored-by: Janet Blackquill <uhhadd@gmail.com> (cherry picked from commit 4efb0b3b328dd4eba3095cc3f0a95fad88b49661)
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Robust.Client.Graphics;
|
|
|
|
namespace Content.Client.Light.EntitySystems;
|
|
|
|
public sealed class PlanetLightSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly IOverlayManager _overlayMan = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<GetClearColorEvent>(OnClearColor);
|
|
|
|
_overlayMan.AddOverlay(new BeforeLightTargetOverlay());
|
|
_overlayMan.AddOverlay(new RoofOverlay(EntityManager));
|
|
_overlayMan.AddOverlay(new TileEmissionOverlay(EntityManager));
|
|
_overlayMan.AddOverlay(new LightBlurOverlay());
|
|
_overlayMan.AddOverlay(new AfterLightTargetOverlay());
|
|
}
|
|
|
|
private void OnClearColor(ref GetClearColorEvent ev)
|
|
{
|
|
ev.Color = Color.Transparent;
|
|
}
|
|
|
|
public override void Shutdown()
|
|
{
|
|
base.Shutdown();
|
|
_overlayMan.RemoveOverlay<BeforeLightTargetOverlay>();
|
|
_overlayMan.RemoveOverlay<RoofOverlay>();
|
|
_overlayMan.RemoveOverlay<TileEmissionOverlay>();
|
|
_overlayMan.RemoveOverlay<LightBlurOverlay>();
|
|
_overlayMan.RemoveOverlay<AfterLightTargetOverlay>();
|
|
}
|
|
}
|