leash 
The leash's line, blank while the ends are out of reach. It leaves the outer edge of the holding hand, with offsets read off the human body sprite. West mirrors east.
Vars | |
| held_index | The holding hand's index. Hands past the first pair draw held items shifted, so the line shifts too. |
|---|---|
| stale | TRUE while a redraw is waiting for a later move or catch_up(). |
| stepping | TRUE while an end steps with the other end's move, which draws the line once done. |
Procs | |
| Draw | Draws only while the ends are on one z-level and in reach. Skips CheckToolReach(), whose dummy object would fall into a chasm under the line. |
| add_extra_hand_offset | Extra hands, like a moth's chest arms, shift held items, so the line shifts with them. |
| catch_up | Draws a waiting redraw that no move picked up, gliding over the step or ERP_LEASH_TURN_GLIDE for a turn. |
| handle_dir_change | Turning moves the hand, so the line is redrawn from it this tick. |
| redrawing | Draws the line once a tick, after the last end has moved. A step with the other end's move, or a diagonal's first half, waits for the next move or catch_up(). Blank while an end is inside something or on another z-level, where a normal beam would delete itself. |
| set_hand | Moves the line to another of the holder's hands. |
| update_offsets | A leash on the floor draws its line from itself, not a hand. |
Var Details
held_index 
The holding hand's index. Hands past the first pair draw held items shifted, so the line shifts too.
stale 
TRUE while a redraw is waiting for a later move or catch_up().
stepping 
TRUE while an end steps with the other end's move, which draws the line once done.
Proc Details
Draw
Draws only while the ends are on one z-level and in reach. Skips CheckToolReach(), whose dummy object would fall into a chasm under the line.
add_extra_hand_offset
Extra hands, like a moth's chest arms, shift held items, so the line shifts with them.
catch_up
Draws a waiting redraw that no move picked up, gliding over the step or ERP_LEASH_TURN_GLIDE for a turn.
handle_dir_change
Turning moves the hand, so the line is redrawn from it this tick.
redrawing
Draws the line once a tick, after the last end has moved. A step with the other end's move, or a diagonal's first half, waits for the next move or catch_up(). Blank while an end is inside something or on another z-level, where a normal beam would delete itself.
set_hand
Moves the line to another of the holder's hands.
update_offsets
A leash on the floor draws its line from itself, not a hand.