Class DoAfterArgs
Inheritance
Namespace: Content.Shared.DoAfter
Assembly: Content.Shared.dll
Syntax
public sealed class DoAfterArgs : object
Constructors
| Improve this Doc View SourceDoAfterArgs(DoAfterArgs)
Declaration
public DoAfterArgs(DoAfterArgs other)
Parameters
Type | Name | Description |
---|---|---|
DoAfterArgs | other |
DoAfterArgs(IEntityManager, EntityUid, Single, DoAfterEvent, Nullable<EntityUid>, Nullable<EntityUid>, Nullable<EntityUid>)
Creates a new set of DoAfter arguments.
Declaration
public DoAfterArgs(IEntityManager entManager, EntityUid user, float seconds, DoAfterEvent event, EntityUid? eventTarget, EntityUid? target = null, EntityUid? used = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityManager | entManager | |
EntityUid | user | The user that will perform the DoAfter |
System.Single | seconds | The time it takes for the DoAfter to complete, in seconds |
DoAfterEvent | event | The event that will be raised when the DoAfter has ended (completed or cancelled). |
System.Nullable<EntityUid> | eventTarget | The entity at which the event will be directed. If null, the event will not be directed. |
System.Nullable<EntityUid> | target | The entity being targeted by the DoAfter. Not the same as EventTarget |
System.Nullable<EntityUid> | used | The entity being used during the DoAfter. E.g., a tool |
DoAfterArgs(IEntityManager, EntityUid, TimeSpan, DoAfterEvent, Nullable<EntityUid>, Nullable<EntityUid>, Nullable<EntityUid>)
Creates a new set of DoAfter arguments.
Declaration
public DoAfterArgs(IEntityManager entManager, EntityUid user, TimeSpan delay, DoAfterEvent event, EntityUid? eventTarget, EntityUid? target = null, EntityUid? used = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityManager | entManager | |
EntityUid | user | The user that will perform the DoAfter |
TimeSpan | delay | The time it takes for the DoAfter to complete |
DoAfterEvent | event | The event that will be raised when the DoAfter has ended (completed or cancelled). |
System.Nullable<EntityUid> | eventTarget | The entity at which the event will be directed. If null, the event will not be directed. |
System.Nullable<EntityUid> | target | The entity being targeted by the DoAFter. Not the same as EventTarget |
System.Nullable<EntityUid> | used | The entity being used during the DoAfter. E.g., a tool |
Fields
| Improve this Doc View SourceAttemptFrequency
This option determines how frequently the DoAfterAttempt event will get raised. Defaults to never raising the event.
Declaration
public AttemptFrequency AttemptFrequency
Field Value
Type | Description |
---|---|
AttemptFrequency |
BlockDuplicate
If true, this will prevent duplicate DoAfters from being started See also DuplicateConditions.
Declaration
public bool BlockDuplicate
Field Value
Type | Description |
---|---|
System.Boolean |
Remarks
Note that this will block even if the duplicate is cancelled because either DoAfter had CancelDuplicate enabled.
BreakOnDamage
Whether damage will cancel the DoAfter. See also DamageThreshold.
Declaration
public bool BreakOnDamage
Field Value
Type | Description |
---|---|
System.Boolean |
BreakOnHandChange
Whether we need to keep our active hand as is (i.e. can't change hand or change item). This also covers requiring the hand to be free (if applicable). This does nothing if NeedHand is false.
Declaration
public bool BreakOnHandChange
Field Value
Type | Description |
---|---|
System.Boolean |
BreakOnTargetMove
If do_after stops when the target moves (if there is a target)
Declaration
public bool BreakOnTargetMove
Field Value
Type | Description |
---|---|
System.Boolean |
BreakOnUserMove
If do_after stops when the user moves
Declaration
public bool BreakOnUserMove
Field Value
Type | Description |
---|---|
System.Boolean |
BreakOnWeightlessMove
If this is true then any movement, even when weightless, will break the doafter. When there is no gravity, BreakOnUserMove is ignored. If it is false to begin with nothing will change.
Declaration
public bool BreakOnWeightlessMove
Field Value
Type | Description |
---|---|
System.Boolean |
Broadcast
Should the DoAfter event broadcast? If this is false, then EventTarget should be a valid entity.
Declaration
public bool Broadcast
Field Value
Type | Description |
---|---|
System.Boolean |
CancelDuplicate
If true, this will cancel any duplicate DoAfters when attempting to add a new DoAfter. See also DuplicateConditions.
Declaration
public bool CancelDuplicate
Field Value
Type | Description |
---|---|
System.Boolean |
DamageThreshold
Threshold for user damage. This damage has to be dealt in a single event, not over time.
Declaration
public FixedPoint2 DamageThreshold
Field Value
Type | Description |
---|---|
FixedPoint2 |
Delay
How long does the do_after require to complete
Declaration
public TimeSpan Delay
Field Value
Type | Description |
---|---|
TimeSpan |
DistanceThreshold
Threshold for distance user from the used OR target entities.
Declaration
public float? DistanceThreshold
Field Value
Type | Description |
---|---|
System.Nullable<System.Single> |
DuplicateCondition
These flags determine what DoAfter properties are used to determine whether one DoAfter is a duplicate of another.
Declaration
public DuplicateConditions DuplicateCondition
Field Value
Type | Description |
---|---|
DuplicateConditions |
Remarks
Note that both DoAfters may have their own conditions, and they will be considered duplicated if either set of conditions is satisfied.
Event
The event that will get raised when the DoAfter has finished. If null, this will simply raise a SimpleDoAfterEvent
Declaration
public DoAfterEvent Event
Field Value
Type | Description |
---|---|
DoAfterEvent |
EventTarget
Entity which will receive the directed event. If null, no directed event will be raised.
Declaration
public EntityUid? EventTarget
Field Value
Type | Description |
---|---|
System.Nullable<EntityUid> |
ExtraCheck
Additional conditions that need to be met. Return false to cancel.
Declaration
public Func<bool>? ExtraCheck
Field Value
Type | Description |
---|---|
System.Nullable<Func<System.Boolean>> |
MovementThreshold
Threshold for user and target movement
Declaration
public float MovementThreshold
Field Value
Type | Description |
---|---|
System.Single |
NeedHand
Whether or not this do after requires the user to have hands.
Declaration
public bool NeedHand
Field Value
Type | Description |
---|---|
System.Boolean |
NetEventTarget
Declaration
public NetEntity? NetEventTarget
Field Value
Type | Description |
---|---|
System.Nullable<NetEntity> |
NetTarget
Declaration
public NetEntity? NetTarget
Field Value
Type | Description |
---|---|
System.Nullable<NetEntity> |
NetUsed
Declaration
public NetEntity? NetUsed
Field Value
Type | Description |
---|---|
System.Nullable<NetEntity> |
NetUser
Declaration
public NetEntity NetUser
Field Value
Type | Description |
---|---|
NetEntity |
RequireCanInteract
If true, this DoAfter will be canceled if the user can no longer interact with the target.
Declaration
public bool RequireCanInteract
Field Value
Type | Description |
---|---|
System.Boolean |
Target
Applicable target (if relevant)
Declaration
public EntityUid? Target
Field Value
Type | Description |
---|---|
System.Nullable<EntityUid> |
Used
Entity used by the User on the Target.
Declaration
public EntityUid? Used
Field Value
Type | Description |
---|---|
System.Nullable<EntityUid> |
User
The entity invoking do_after
Declaration
public EntityUid User
Field Value
Type | Description |
---|---|
EntityUid |