Moony z level hack (#15031)

* save work

* Adds Z levels

* a

* ladders + parallax scroll

* zoom out not in

* oops, sandbox

* oops i broke the law

* run ci

* fuck

---------

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
Moony
2023-03-31 21:49:10 -05:00
committed by GitHub
parent 56b1628e58
commit 1f6663912b
17 changed files with 665 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using Content.Client.Parallax.Managers;
using Content.Shared._Afterlight.ThirdDimension;
using Content.Shared.CCVar;
using Content.Shared.Parallax.Biomes;
using Robust.Client.Graphics;
@@ -19,6 +20,7 @@ public sealed class ParallaxOverlay : Overlay
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IParallaxManager _manager = default!;
private readonly ParallaxSystem _parallax;
private readonly SharedZLevelSystem _zlevel = default!;
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowWorld;
@@ -27,11 +29,12 @@ public sealed class ParallaxOverlay : Overlay
ZIndex = ParallaxSystem.ParallaxZIndex;
IoCManager.InjectDependencies(this);
_parallax = _entManager.System<ParallaxSystem>();
_zlevel = _entManager.System<SharedZLevelSystem>();
}
protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (args.MapId == MapId.Nullspace || _entManager.HasComponent<BiomeComponent>(_mapManager.GetMapEntityId(args.MapId)))
if (args.MapId == MapId.Nullspace || _entManager.HasComponent<BiomeComponent>(_mapManager.GetMapEntityId(args.MapId)) || _zlevel.MapBelow[(int)args.MapId] != null)
return false;
return true;