Files
wwdpublic/Content.Client/DeltaV/Overlays/UltraVisionOverlay.cs
VMSolidus 1f3128c6ea Harpy Visual Rework (#677)
* It begins

* Delete error.txt

* Patch by Debug

* HIDING WINGS NOW WORKS

* Runs smoother from Shared

* Delete HarpyVisualsSystem.cs

* The entire clientside script is no longer needed, and the visuals now work correctly. Helmetbug is gone.

* Update HarpyVisualsSystem.cs

* First completed Harpy Hardsuit

* Captain and Atmos tech birdsuits

* Update hardsuit-helmets.yml

* And more content

* Adding new finch tail <3

* whoops

* guh

* I swear the tail works now, I just need the adhd meds to kick in

* birb juggsuit

* More stuff

* Nukie hardsuits

* fixing clipping issues on birb juggsuit

* Update meta.json

* aaaaaaaaa

* two more

* Ton of extra harpy sprites

* Create equipped-INNERCLOTHING-harpy.png

* Harpy Ultravision trait

TODO: Optional trait that disables it

* Trait that removes Ultravision

* Code optimizations

* Adding hueshift maps to all harpy markings

* No more jumpsuits

* 1984 the harpy jumpsuits, they are no longer needed

* last 2

* final QA pass

* shennanigans related to an earlier merge conflict

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
2024-02-12 22:25:02 +00:00

45 lines
1.5 KiB
C#

using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Content.Shared.Abilities;
namespace Content.Client.DeltaV.Overlays;
public sealed partial class UltraVisionOverlay : Overlay
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] IEntityManager _entityManager = default!;
public override bool RequestScreenTexture => true;
public override OverlaySpace Space => OverlaySpace.WorldSpace;
private readonly ShaderInstance _ultraVisionShader;
public UltraVisionOverlay()
{
IoCManager.InjectDependencies(this);
_ultraVisionShader = _prototypeManager.Index<ShaderPrototype>("UltraVision").Instance().Duplicate();
}
protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;
if (_playerManager.LocalPlayer?.ControlledEntity is not {Valid: true} player)
return;
if (!_entityManager.HasComponent<UltraVisionComponent>(player))
return;
_ultraVisionShader?.SetParameter("SCREEN_TEXTURE", ScreenTexture);
var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.UseShader(_ultraVisionShader);
worldHandle.DrawRect(viewport, Color.White);
}
}