Space Station 13 - Modules - TypesVar Details - Proc Details

move_loop

Template class of the movement datums, handles the timing portion of the loops

Vars

controllerThe subsystem we're processing on
delayDelay between each move in deci-seconds
extra_infoAn extra reference we pass around It is on occasion useful to have a reference to some datum without storing it on the moving object Mostly comes up in high performance senarios where we care about things being singletons This feels horrible, but constantly making components seems worse
flagsBitfield of different things that affect how a loop operates
lifetimeTime till we stop processing in deci-seconds, defaults to forever
movingThe thing we're moving about
ownerThe movement packet that owns us
priorityDefines how different move loops override each other. Higher numbers beat lower numbers
runningIs this loop running or not
timerThe next time we should process Used primarially as a hint to be reasoned about by our [controller], and as the id of our bucket Should not be modified directly outside of [start_loop]

Procs

compare_loopscheck if this exact moveloop datum already exists (in terms of vars) so we can avoid creating a new one to overwrite the old duplicate
moveHandles the actual move, overriden by children Returns FALSE if nothing happen, TRUE otherwise
pause_forPauses the move loop for some passed in period This functionally means shifting its timer up, and clearing it from its current bucket
set_delayExists as a helper so outside code can modify delay in a sane way

Var Details

controller

The subsystem we're processing on

delay

Delay between each move in deci-seconds

extra_info

An extra reference we pass around It is on occasion useful to have a reference to some datum without storing it on the moving object Mostly comes up in high performance senarios where we care about things being singletons This feels horrible, but constantly making components seems worse

flags

Bitfield of different things that affect how a loop operates

lifetime

Time till we stop processing in deci-seconds, defaults to forever

moving

The thing we're moving about

owner

The movement packet that owns us

priority

Defines how different move loops override each other. Higher numbers beat lower numbers

running

Is this loop running or not

timer

The next time we should process Used primarially as a hint to be reasoned about by our [controller], and as the id of our bucket Should not be modified directly outside of [start_loop]

Proc Details

compare_loops

check if this exact moveloop datum already exists (in terms of vars) so we can avoid creating a new one to overwrite the old duplicate

move

Handles the actual move, overriden by children Returns FALSE if nothing happen, TRUE otherwise

pause_for

Pauses the move loop for some passed in period This functionally means shifting its timer up, and clearing it from its current bucket

set_delay

Exists as a helper so outside code can modify delay in a sane way