Files
tbd-station-14/Content.Shared/ProximityDetection/ProximityDetectionEvents.cs
Winkarst 078814ce41 Refactor: ProximityDetectionSystem (#35133)
* Refactor: ProximityDetectionSystem

* Update

* Update

* Update

* Yikes

* Update

* Dirty

* Update

* Update

* Lil cleanup

* Update

* Update
2025-05-12 00:33:35 +10:00

28 lines
1.0 KiB
C#

using Content.Shared.ProximityDetection.Components;
namespace Content.Shared.ProximityDetection;
/// <summary>
/// Raised to determine if proximity sensor can detect an entity.
/// </summary>
[ByRefEvent]
public struct ProximityDetectionAttemptEvent(float distance, Entity<ProximityDetectorComponent> detector, EntityUid target)
{
public bool Cancelled;
public readonly float Distance = distance;
public readonly Entity<ProximityDetectorComponent> Detector = detector;
public readonly EntityUid Target = target;
}
/// <summary>
/// Raised when distance from proximity sensor to the target was updated.
/// </summary>
[ByRefEvent]
public readonly record struct ProximityTargetUpdatedEvent(float Distance, Entity<ProximityDetectorComponent> Detector, EntityUid? Target = null);
/// <summary>
/// Raised when proximity sensor got new target.
/// </summary>
[ByRefEvent]
public readonly record struct NewProximityTargetEvent(float Distance, Entity<ProximityDetectorComponent> Detector, EntityUid? Target = null);