using Content.Shared.Actions;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Ghost;
///
/// Represents an observer ghost.
/// Handles limiting interactions, using ghost abilities, ghost visibility, and ghost warping.
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGhostSystem))]
[AutoGenerateComponentState(true), AutoGenerateComponentPause]
public sealed partial class GhostComponent : Component
{
// Actions
[DataField]
public EntProtoId ToggleLightingAction = "ActionToggleLighting";
[DataField, AutoNetworkedField]
public EntityUid? ToggleLightingActionEntity;
[DataField]
public EntProtoId ToggleFoVAction = "ActionToggleFov";
[DataField, AutoNetworkedField]
public EntityUid? ToggleFoVActionEntity;
[DataField]
public EntProtoId ToggleGhostsAction = "ActionToggleGhosts";
[DataField, AutoNetworkedField]
public EntityUid? ToggleGhostsActionEntity;
[DataField]
public EntProtoId ToggleGhostHearingAction = "ActionToggleGhostHearing";
[DataField]
public EntityUid? ToggleGhostHearingActionEntity;
[DataField]
public EntProtoId BooAction = "ActionGhostBoo";
[DataField, AutoNetworkedField]
public EntityUid? BooActionEntity;
// End actions
///
/// Time at which the player died and created this ghost.
/// Used to determine votekick eligibility.
///
///
/// May not reflect actual time of death if this entity has been paused,
/// but will give an accurate length of time since death.
///
[DataField, AutoPausedField]
public TimeSpan TimeOfDeath = TimeSpan.Zero;
///
/// Range of the Boo action.
///
[DataField]
public float BooRadius = 3;
///
/// Maximum number of entities that can affected by the Boo action.
///
[DataField]
public int BooMaxTargets = 3;
///
/// Is this ghost allowed to interact with entities?
///
///
/// Used to allow admins ghosts to interact with the world.
/// Changed by .
///
[DataField("canInteract"), AutoNetworkedField]
public bool CanGhostInteract;
///
/// Is this ghost player allowed to return to their original body?
///
///
/// Changed by .
///
[DataField, AutoNetworkedField]
public bool CanReturnToBody;
///
/// Ghost color
///
/// Used to allow admins to change ghost colors. Should be removed if the capability to edit existing sprite colors is ever added back.
[DataField, AutoNetworkedField]
public Color Color = Color.White;
}
public sealed partial class ToggleFoVActionEvent : InstantActionEvent { }
public sealed partial class ToggleGhostsActionEvent : InstantActionEvent { }
public sealed partial class ToggleLightingActionEvent : InstantActionEvent { }
public sealed partial class ToggleGhostHearingActionEvent : InstantActionEvent { }
public sealed partial class ToggleGhostVisibilityToAllEvent : InstantActionEvent { }
public sealed partial class BooActionEvent : InstantActionEvent { }