using Content.Shared.Ghost.Components;
namespace Content.Server.Ghost;
///
/// A targeted event raised to cause spooky events (e.g. flickering lights).
///
///
/// Most frequently used by ghosts to haunt an area, hence the name.
///
[ByRefEvent]
public struct GhostBooEvent(GhostBooIntensity allowedIntensity)
{
///
/// The maximum level of intensity that the caller will allow.
///
public readonly GhostBooIntensity AllowedIntensity = allowedIntensity;
///
/// The type of action that was performed, if any.
/// Should only be set by handling entities if something happened.
///
public GhostBooIntensity ResponseIntensity { get; private set; } = GhostBooIntensity.None;
///
/// Whether or not the event has been handled already.
///
public bool Handled { get; private set; }
///
/// Sets both the handled status of this event and the intensity of its response.
///
public void SetResponseIntensity(GhostBooIntensity intensity)
{
Handled = true;
ResponseIntensity = intensity;
}
}