using System.Numerics; using Content.Shared.Inventory; using Content.Shared.Movement.Systems; namespace Content.Shared.Camera; /// /// Raised directed by-ref when is called. /// Should be subscribed to by any systems that want to modify an entity's eye offset, /// so that they do not override each other. /// /// /// The total offset to apply. /// /// /// Note that in most cases should be incremented or decremented by subscribers, not set. /// Otherwise, any offsets applied by previous subscribing systems will be overridden. /// [ByRefEvent] public record struct GetEyeOffsetEvent(Vector2 Offset); /// /// Raised before the and , to check if any of the subscribed /// systems want to cancel offset changes. /// [ByRefEvent] public record struct GetEyeOffsetAttemptEvent(bool Cancelled); /// /// Raised on any equipped and in-hand items that may modify the eye offset. /// Pockets and suitstorage are excluded. /// [ByRefEvent] public sealed class GetEyeOffsetRelayedEvent : EntityEventArgs, IInventoryRelayEvent { public SlotFlags TargetSlots { get; } = ~(SlotFlags.POCKET & SlotFlags.SUITSTORAGE); public Vector2 Offset; }