Minor ReflectionSystem refactor (#37039)

* ReflectComponentLogicFix

Added bool InRightPlace and updated relevant system

* Using SlotFlags

* edits

* refactor

* add missing relay

---------

Co-authored-by: BIGZi0348 <svalker0348@gmail.com>
This commit is contained in:
slarticodefast
2025-04-30 16:10:54 +02:00
committed by GitHub
parent a8ff999b08
commit b068b5bb89
9 changed files with 143 additions and 147 deletions

View File

@@ -2,6 +2,8 @@ using Content.Shared.Atmos;
using Content.Shared.Camera;
using Content.Shared.Hands.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Projectiles;
using Content.Shared.Weapons.Ranged.Events;
namespace Content.Shared.Hands.EntitySystems;
@@ -15,6 +17,8 @@ public abstract partial class SharedHandsSystem
// By-ref events.
SubscribeLocalEvent<HandsComponent, ExtinguishEvent>(RefRelayEvent);
SubscribeLocalEvent<HandsComponent, ProjectileReflectAttemptEvent>(RefRelayEvent);
SubscribeLocalEvent<HandsComponent, HitScanReflectAttemptEvent>(RefRelayEvent);
}
private void RelayEvent<T>(Entity<HandsComponent> entity, ref T args) where T : EntityEventArgs