move_loop ![code/controllers/subsystem/movement/movement_types.dm 2](git.png)
Template class of the movement datums, handles the timing portion of the loops
Vars | |
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] |
Procs | |
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 |
Var Details
controller ![code/controllers/subsystem/movement/movement_types.dm 6](git.png)
The subsystem we're processing on
delay ![code/controllers/subsystem/movement/movement_types.dm 21](git.png)
Delay between each move in deci-seconds
extra_info ![code/controllers/subsystem/movement/movement_types.dm 11](git.png)
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 ![code/controllers/subsystem/movement/movement_types.dm 17](git.png)
Bitfield of different things that affect how a loop operates
lifetime ![code/controllers/subsystem/movement/movement_types.dm 19](git.png)
Time till we stop processing in deci-seconds, defaults to forever
moving ![code/controllers/subsystem/movement/movement_types.dm 13](git.png)
The thing we're moving about
owner ![code/controllers/subsystem/movement/movement_types.dm 4](git.png)
The movement packet that owns us
priority ![code/controllers/subsystem/movement/movement_types.dm 15](git.png)
Defines how different move loops override each other. Higher numbers beat lower numbers
running ![code/controllers/subsystem/movement/movement_types.dm 27](git.png)
Is this loop running or not
timer ![code/controllers/subsystem/movement/movement_types.dm 25](git.png)
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