Files
tbd-station-14/Content.Shared/Interaction/Events/InteractionAttemptEvent.cs
nikthechampiongr 22e9d6562f Fix SCRAM implant not working while cuffed. Incidentally fix freedom implant working while dead/crit (#25978)
* Fix SCRAM implant not being usable while in cuffs. Also fix freedom implant from working while dead/crit as a side effect

* Move check up to apply to all actions and do thing I forgor to do before

* Change check into an ActionBlocker check that also checks whether the user is sleeping.

* Make checking for Consciousness the default for actions

Went through and chose what I believe to be sensible defaults for actions that had CheckCanInteract.

* Fix typos my beloved

I had an unbelievable skill issue

* Fix major skill issue
2024-03-18 23:35:46 +01:00

42 lines
1.3 KiB
C#

namespace Content.Shared.Interaction.Events
{
/// <summary>
/// Event raised directed at a user to see if they can perform a generic interaction.
/// </summary>
public sealed class InteractionAttemptEvent : CancellableEntityEventArgs
{
public InteractionAttemptEvent(EntityUid uid, EntityUid? target)
{
Uid = uid;
Target = target;
}
public EntityUid Uid { get; }
public EntityUid? Target { get; }
}
/// <summary>
/// Raised to determine whether an entity is conscious to perform an action.
/// </summary>
public sealed class ConsciousAttemptEvent(EntityUid Uid) : CancellableEntityEventArgs
{
public EntityUid Uid { get; } = Uid;
}
/// <summary>
/// Event raised directed at the target entity of an interaction to see if the user is allowed to perform some
/// generic interaction.
/// </summary>
public sealed class GettingInteractedWithAttemptEvent : CancellableEntityEventArgs
{
public GettingInteractedWithAttemptEvent(EntityUid uid, EntityUid? target)
{
Uid = uid;
Target = target;
}
public EntityUid Uid { get; }
public EntityUid? Target { get; }
}
}