#nullable enable
using Content.Shared.GameObjects.Components.Doors;
using Content.Shared.Interfaces.GameObjects.Components;
using System;
namespace Content.Server.Interfaces.GameObjects.Components.Doors
{
public interface IDoorCheck
{
///
/// Called when the door's State variable is changed to a new variable that it was not equal to before.
///
void OnStateChange(SharedDoorComponent.DoorState doorState) { }
///
/// Called when the door is determining whether it is able to open.
///
/// True if the door should open, false if it should not.
bool OpenCheck() => true;
///
/// Called when the door is determining whether it is able to close.
///
/// True if the door should close, false if it should not.
bool CloseCheck() => true;
///
/// Called when the door is determining whether it is able to deny.
///
/// True if the door should deny, false if it should not.
bool DenyCheck() => true;
///
/// Whether the door's safety is on.
///
/// True if safety is on, false if it is not.
bool SafetyCheck() => false;
///
/// Whether the door should close automatically.
///
/// True if the door should close automatically, false if it should not.
bool AutoCloseCheck() => false;
///
/// Gets an override for the amount of time to pry open the door, or null if there is no override.
///
/// Float if there is an override, null otherwise.
float? GetPryTime() => null;
///
/// Gets an override for the amount of time before the door automatically closes, or null if there is no override.
///
/// TimeSpan if there is an override, null otherwise.
TimeSpan? GetCloseSpeed() => null;
///
/// A check to determine whether or not a click on the door should interact with it with the intent to open/close.
///
/// True if the door's IActivate should not run, false otherwise.
bool BlockActivate(ActivateEventArgs eventArgs) => false;
///
/// Called when somebody begins to pry open the door.
///
/// The eventArgs of the InteractUsing method that called this function.
void OnStartPry(InteractUsingEventArgs eventArgs) { }
///
/// Check representing whether or not the door can be pried open.
///
/// The eventArgs of the InteractUsing method that called this function.
/// True if the door can be pried open, false if it cannot.
bool CanPryCheck(InteractUsingEventArgs eventArgs) => true;
}
}