NullAction

Null action that does nothing.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open val requirements: Set<Any>

The action's requirements (optional). It is up to the action queue to resolve requirements.

Functions

Link copied to clipboard

Returns a new action that waits dt before executing this action.

Link copied to clipboard
open fun interruptible(onInterruption: Action): Interruptible
open fun interruptible(onInterruption: InstantFunction): Interruptible
open fun interruptible(onInterruption: () -> Action): Interruptible

Returns an interruptible copy of this action, with onInterruption occurring on interrupt.

Link copied to clipboard
open fun preview(fieldOverlay: Canvas)

Draws a preview of the action on canvas fieldOverlay.

Link copied to clipboard
open fun race(a: Action): RaceAction
open fun race(a: () -> Action): RaceAction

Returns a new action that executes this action in parallel with a, but stops both actions when one finishes first.

Returns a new action that executes this action in parallel with f, but stops both actions when one finishes first.

Link copied to clipboard
open override fun run(p: TelemetryPacket): Boolean

Runs a single uninterruptible block. Returns true if the action should run again and false if it has completed. A telemetry packet p is provided to record any information on the action's progress.

Link copied to clipboard
open fun then(a: () -> Action): SequentialAction

Returns a new action that executes this action followed by a.

Returns a new action that executes this action followed by f.

Link copied to clipboard
open fun with(a: Action): ParallelAction
open fun with(a: () -> Action): ParallelAction

Returns a new action that executes this action in parallel with a.

Returns a new action that executes this action in parallel with f.

Link copied to clipboard
open fun withPreview(preview: Consumer<Canvas>): Action
open fun withPreview(preview: (Canvas) -> Unit): Action

Returns a copy of this with dashboard preview preview.

Link copied to clipboard
open fun withRequirements(vararg reqs: Any): Action
open fun withRequirements(reqs: Set<Any>): Action

Returns a copy of this with requirements reqs.