/tg/ Station 13 - Modules - TypesVar Details - Proc Details

tram

Vars

base_horizontal_speedversion of horizontal_speed that gets set in init and is considered our base speed if our lift gets slowed down
collision_lethalitymultiplier on how much damage/force the tram imparts on things it hits
from_wherereference to the destination landmark we consider ourselves "at". since we potentially span multiple z levels we dont actually know where on us this platform is. as long as we know THAT its on us we can just move the distance and direction between this and the destination landmark.
horizontal_speeddecisecond delay between horizontal movement. cannot make the tram move faster than 1 movement per world.tick_lag. this var is poorly named its actually horizontal movement delay but whatever.
next_movethe world.time we should next move at. in case our speed is set to less than 1 movement per tick
slowed_downwhether we have been slowed down automatically
times_belowhow many times we moved while costing less than 0.5 * SStramprocess.max_time milliseconds per movement
times_exceededhow many times we moved while costing more than SStramprocess.max_time milliseconds per movement. if this exceeds SStramprocess.max_exceeding_moves
travel_directionif we're travelling, what direction are we going
travel_distanceif we're travelling, how far do we have to go
travellingwhether this tram is traveling across vertical and/or horizontal axis for some distance. not all lifts use this

Procs

gracefully_breakSignal for when the tram runs into a field of which it cannot go through. Stops the train's travel fully, sends a message, and destroys the train. Arguments: bumped_atom - The atom this tram bumped into
tram_travelHandles moving the tram
unlock_controlsHandles unlocking the tram controls for use after moving

Var Details

base_horizontal_speed

version of horizontal_speed that gets set in init and is considered our base speed if our lift gets slowed down

collision_lethality

multiplier on how much damage/force the tram imparts on things it hits

from_where

reference to the destination landmark we consider ourselves "at". since we potentially span multiple z levels we dont actually know where on us this platform is. as long as we know THAT its on us we can just move the distance and direction between this and the destination landmark.

horizontal_speed

decisecond delay between horizontal movement. cannot make the tram move faster than 1 movement per world.tick_lag. this var is poorly named its actually horizontal movement delay but whatever.

next_move

the world.time we should next move at. in case our speed is set to less than 1 movement per tick

slowed_down

whether we have been slowed down automatically

times_below

how many times we moved while costing less than 0.5 * SStramprocess.max_time milliseconds per movement

times_exceeded

how many times we moved while costing more than SStramprocess.max_time milliseconds per movement. if this exceeds SStramprocess.max_exceeding_moves

travel_direction

if we're travelling, what direction are we going

travel_distance

if we're travelling, how far do we have to go

travelling

whether this tram is traveling across vertical and/or horizontal axis for some distance. not all lifts use this

Proc Details

gracefully_break

Signal for when the tram runs into a field of which it cannot go through. Stops the train's travel fully, sends a message, and destroys the train. Arguments: bumped_atom - The atom this tram bumped into

tram_travel

Handles moving the tram

Tells the individual tram parts where to actually go and has an extra safety check incase multiple inputs get through, preventing conflicting directions and the tram literally ripping itself apart. all of the actual movement is handled by SStramprocess

unlock_controls

Handles unlocking the tram controls for use after moving

More safety checks to make sure the tram has actually docked properly at a location before users are allowed to interact with the tram console again. Tram finds its location at this point before fully unlocking controls to the user.