/datum/action
Vars | |
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. |
Procs | |
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 |
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