Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/action

Vars

durationHow long does this action take in ticks.
idID for this action. If null, will be autogenerated in New() (by default, to the typepath of the action). Don't override this without a good reason.
interrupt_flagsWhen and how this action is interrupted.
interrupt_startWhen the action was interrupted. Used to calculate interrupt_time
interrupt_timeHow long the action spent interrupted. Used to calculate the remaining time when resuming.
ownerObject that owns this action.
promisePromise that will be fulfilled when the action is finished or deleted. Finished = fulfilled with the action, deleted = fulfilled with null.
startedTIME this action was started at
stateCurrent state of the action.

Procs

canRunCheckRan before onStart, onUpdate, onResume and in onRestart. Call interrupt here to stop the action from starting.
interruptThis is called by the default interrupt actions
loopStartCalled after restarting. Meant to cotain code from -and be called from- onStart()
onDeleteCalled when the action is complete and about to be deleted. Usable for cleanup and such.
onEndCalled when the action succesfully ends.
onInterruptCalled when the action fails / is interrupted.
onRestartCalled when the action restarts (for example: automenders)
onResumeCalled when the action resumes - likely from almost ending. Arg is the action which would have cancelled this.
onStartCalled when the action begins
onUpdateCalled every tick this action is running. If you absolutely(!!!) have to you can do manual interrupt checking in here. Otherwise this is mostly used for drawing progress bars and shit.
updateBarUpdates the animations

Var Details

duration

How long does this action take in ticks.

id

ID for this action. If null, will be autogenerated in New() (by default, to the typepath of the action). Don't override this without a good reason.

interrupt_flags

When and how this action is interrupted.

interrupt_start

When the action was interrupted. Used to calculate interrupt_time

interrupt_time

How long the action spent interrupted. Used to calculate the remaining time when resuming.

owner

Object that owns this action.

promise

Promise that will be fulfilled when the action is finished or deleted. Finished = fulfilled with the action, deleted = fulfilled with null.

started

TIME this action was started at

state

Current state of the action.

Proc Details

canRunCheck

Ran before onStart, onUpdate, onResume and in onRestart. Call interrupt here to stop the action from starting.

interrupt

This is called by the default interrupt actions

loopStart

Called after restarting. Meant to cotain code from -and be called from- onStart()

onDelete

Called when the action is complete and about to be deleted. Usable for cleanup and such.

onEnd

Called when the action succesfully ends.

onInterrupt

Called when the action fails / is interrupted.

onRestart

Called when the action restarts (for example: automenders)

onResume

Called when the action resumes - likely from almost ending. Arg is the action which would have cancelled this.

onStart

Called when the action begins

onUpdate

Called every tick this action is running. If you absolutely(!!!) have to you can do manual interrupt checking in here. Otherwise this is mostly used for drawing progress bars and shit.

updateBar

Updates the animations