Show / Hide Table of Contents

Class DoAfterArgs

Inheritance
System.Object
DoAfterArgs
Namespace: Content.Shared.DoAfter
Assembly: Content.Shared.dll
Syntax
public sealed class DoAfterArgs : object

Constructors

| Improve this Doc View Source

DoAfterArgs(DoAfterArgs)

Declaration
public DoAfterArgs(DoAfterArgs other)
Parameters
Type Name Description
DoAfterArgs other
| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

AttemptFrequency

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

BreakOnDamage

Whether damage will cancel the DoAfter. See also DamageThreshold.

Declaration
public bool BreakOnDamage
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

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
| Improve this Doc View Source

BreakOnTargetMove

If do_after stops when the target moves (if there is a target)

Declaration
public bool BreakOnTargetMove
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

BreakOnUserMove

If do_after stops when the user moves

Declaration
public bool BreakOnUserMove
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

Delay

How long does the do_after require to complete

Declaration
public TimeSpan Delay
Field Value
Type Description
TimeSpan
| Improve this Doc View Source

DistanceThreshold

Threshold for distance user from the used OR target entities.

Declaration
public float? DistanceThreshold
Field Value
Type Description
System.Nullable<System.Single>
| Improve this Doc View Source

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>>
| Improve this Doc View Source

MovementThreshold

Threshold for user and target movement

Declaration
public float MovementThreshold
Field Value
Type Description
System.Single
| Improve this Doc View Source

NeedHand

Whether or not this do after requires the user to have hands.

Declaration
public bool NeedHand
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

NetEventTarget

Declaration
public NetEntity? NetEventTarget
Field Value
Type Description
System.Nullable<NetEntity>
| Improve this Doc View Source

NetTarget

Declaration
public NetEntity? NetTarget
Field Value
Type Description
System.Nullable<NetEntity>
| Improve this Doc View Source

NetUsed

Declaration
public NetEntity? NetUsed
Field Value
Type Description
System.Nullable<NetEntity>
| Improve this Doc View Source

NetUser

Declaration
public NetEntity NetUser
Field Value
Type Description
NetEntity
| Improve this Doc View Source

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
| Improve this Doc View Source

Target

Applicable target (if relevant)

Declaration
public EntityUid? Target
Field Value
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

Used

Entity used by the User on the Target.

Declaration
public EntityUid? Used
Field Value
Type Description
System.Nullable<EntityUid>
| Improve this Doc View Source

User

The entity invoking do_after

Declaration
public EntityUid User
Field Value
Type Description
EntityUid
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾