CatStation/Content.Client/Wall/Systems/WallMountTreeSystem.cs
B_Kirill c17429daa4
Directional visibility for wall-mounted entities (#43476)
* Directional visibility for wall-mounted entities

* Fix cache

* Revert

* InteractionIgnoreAnchoredInTileComponent + yml

* Main system

* Move it

* Directional arrow

* Add fade

* retry

* Split "Directional arrow"

* fix

* small thing

* Split "InteractionIgnoreAnchoredInTileComponent"

* correct description

* I hate the online editor

* retry

* ...

* Apply suggestions from code review

Co-authored-by: Jessica M <jessica@jessicamaybe.com>

* Additional comment

* cleanup

---------

Co-authored-by: Jessica M <jessica@jessicamaybe.com>
Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
2026-07-19 04:42:51 +00:00

22 lines
804 B
C#

using System.Numerics;
using Content.Client.Wall.Components;
using Content.Shared.Wall;
using Robust.Client.GameObjects;
using Robust.Shared.ComponentTrees;
using Robust.Shared.Physics;
namespace Content.Client.Wall.Systems;
public sealed partial class WallMountTreeSystem : ComponentTreeSystem<WallMountTreeComponent, WallMountComponent>
{
[Dependency] private SpriteSystem _sprite = default!;
protected override bool DoFrameUpdate => true;
protected override bool DoTickUpdate => false;
protected override bool Recursive => false;
protected override Box2 ExtractAabb(in ComponentTreeEntry<WallMountComponent> entry, Vector2 pos, Angle rot)
{
return _sprite.CalculateBounds((entry.Uid, Comp<SpriteComponent>(entry.Uid)), pos, rot, default).CalcBoundingBox();
}
}