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

@@ -4,6 +4,7 @@ using Content.Shared.Damage;
using Content.Shared.DoAfter;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Mobs.Components;
using Content.Shared.Throwing;
using Robust.Shared.Audio.Systems;
@@ -238,7 +239,10 @@ public sealed class ImpactEffectEvent : EntityEventArgs
/// Raised when an entity is just about to be hit with a projectile but can reflect it
/// </summary>
[ByRefEvent]
public record struct ProjectileReflectAttemptEvent(EntityUid ProjUid, ProjectileComponent Component, bool Cancelled);
public record struct ProjectileReflectAttemptEvent(EntityUid ProjUid, ProjectileComponent Component, bool Cancelled) : IInventoryRelayEvent
{
SlotFlags IInventoryRelayEvent.TargetSlots => SlotFlags.WITHOUT_POCKET;
}
/// <summary>
/// Raised when a projectile hits an entity