#nullable enable
using System;
using Content.Shared.Doors;
using Content.Shared.Interaction;
using Robust.Shared.GameObjects;
namespace Content.Server.Doors
{
///
/// Raised when the door's State variable is changed to a new variable that it was not equal to before.
///
public class DoorStateChangedEvent : EntityEventArgs
{
public SharedDoorComponent.DoorState State;
public DoorStateChangedEvent(SharedDoorComponent.DoorState state)
{
State = state;
}
}
///
/// Raised when the door is determining whether it is able to open.
/// Cancel to stop the door from being opened.
///
public class BeforeDoorOpenedEvent : CancellableEntityEventArgs
{
}
///
/// Raised when the door is successfully opened.
///
public class OnDoorOpenedEvent : HandledEntityEventArgs
{
}
///
/// Raised when the door is determining whether it is able to close.
/// Cancel to stop the door from being closed.
///
public class BeforeDoorClosedEvent : CancellableEntityEventArgs
{
}
///
/// Raised when the door is successfully closed.
///
public class OnDoorClosedEvent : HandledEntityEventArgs
{
}
///
/// Called when the door is determining whether it is able to deny.
/// Cancel to stop the door from being able to deny.
///
public class BeforeDoorDeniedEvent : CancellableEntityEventArgs
{
}
///
/// Raised when access to the door is denied.
///
public class OnDoorDeniedEvent : HandledEntityEventArgs
{
}
///
/// Raised to determine whether the door's safety is on.
/// Modify Safety to set the door's safety.
///
public class DoorSafetyEnabledEvent : HandledEntityEventArgs
{
public bool Safety = false;
}
///
/// Raised to determine whether the door should automatically close.
/// Cancel to stop it from automatically closing.
///
public class BeforeDoorAutoCloseEvent : CancellableEntityEventArgs
{
}
///
/// Raised to determine how long the door's pry time should be modified by.
/// Multiply PryTimeModifier by the desired amount.
///
public class DoorGetPryTimeModifierEvent : EntityEventArgs
{
public float PryTimeModifier = 1.0f;
}
///
/// Raised to determine how long the door's close time should be modified by.
/// Multiply CloseTimeModifier by the desired amount.
///
public class DoorGetCloseTimeModifierEvent : EntityEventArgs
{
public float CloseTimeModifier = 1.0f;
}
///
/// Raised to determine whether clicking the door should open/close it.
///
public class DoorClickShouldActivateEvent : HandledEntityEventArgs
{
public ActivateEventArgs Args;
public DoorClickShouldActivateEvent(ActivateEventArgs args)
{
Args = args;
}
}
///
/// Raised when an attempt to pry open the door is made.
/// Cancel to stop the door from being pried open.
///
public class BeforeDoorPryEvent : CancellableEntityEventArgs
{
public InteractUsingEventArgs Args;
public BeforeDoorPryEvent(InteractUsingEventArgs args)
{
Args = args;
}
}
///
/// Raised when a door is successfully pried open.
///
public class OnDoorPryEvent : EntityEventArgs
{
public InteractUsingEventArgs Args;
public OnDoorPryEvent(InteractUsingEventArgs args)
{
Args = args;
}
}
}