linear
Base transport structure. A single tile that can form a modular set with neighbouring tiles This type holds elevators and trams
Vars | |
changed_gliders | movables inside transport_contents who had their glide_size changed since our last movement. used so that we dont have to change the glide_size of every object every movement, which scales to cost more than you'd think |
---|---|
collision_lethality | damage multiplier if a mob is hit by the lift while it is moving horizontally |
create_modular_set | if TRUE, this platform will late initialize and then expand to become a multitile object across all other linked platforms on this z level |
current_operators | A lazylist of REFs to all mobs which have a radial open currently |
elevator_vertical_speed | How long does it take for the elevator to move vertically? |
glide_size_override | what glide_size we set our moving contents to. |
height | how many tiles this platform extends on the y axis (north-south not up-down, that would be the z axis) |
initial_contents | weakrefs to the contents we have when we're first created. stored so that admins can clear the tram to its initial state if someone put a bunch of stuff onto it. |
pass_through_floors | if true, the elevator works through floors |
radial_travel | We use a radial to travel primarily, instead of a button / ui |
speed_limiter | decisecond delay between horizontal movements. cannot make the tram move faster than 1 movement per world.tick_lag. only used to give to the transport_controller |
transport_contents | what movables on our platform that we are moving |
transport_controller_datum | master datum that controls our movement. in general /transport/linear subtypes control moving themselves, and /datum/transport_controller instances control moving the entire tram and any behavior associated with that. |
transport_controller_type | what subtype of /datum/transport_controller to create for itself if no other platform on this tram has created one yet. very important for some behaviors since |
transport_id | ID used to determine what transport types we can merge with |
violent_landing | if TRUE, we will gib anyone we land on top of. if FALSE, we will just apply damage with a serious wound penalty. |
warns_on_down_movement | Does our elevator warn people (with visual effects) when moving down? |
width | how many tiles this platform extends on the x axis |
Procs | |
add_initial_contents | adds everything on our tile that can be added to our transport_contents and initial_contents lists when we're created |
can_open_lift_radial | Callback / general proc to check if the lift is usable by the passed mob. |
check_menu | Proc to ensure that the radial menu closes when it should. Arguments: |
create_modular_set | make this tram platform multitile, expanding to cover all the tram platforms adjacent to us and deleting them. makes movement more efficient. the platform becoming multitile should be in the lower left corner since thats assumed to be the loc of multitile objects |
group_move | move the movers list of movables on our tile to destination if we successfully move there first. this is like calling forceMove() on everything in movers and ourselves, except nothing in movers has destination.Entered() and origin.Exited() called on them, as only our movement can be perceived. none of the movers are able to react to the movement of any other mover, saving a lot of needless processing cost and is more sensible. without this, if you and a banana are on the same platform, when that platform moves you will slip on the banana even if youre not moving relative to it. |
module_adjacency | returns an unordered list of all lift platforms adjacent to us. used so our transport_controller_datum can control all connected platforms. includes platforms directly above or below us as well. only includes platforms with an identical transport_id to our own. |
on_changed_glide_size | signal handler for COMSIG_MOVABLE_UPDATE_GLIDE_SIZE: when a movable in transport_contents changes its glide_size independently. adds that movable to a lazy list, movables in that list have their glide_size updated when the tram next moves |
open_lift_radial | Opens the radial for the lift, allowing the user to move it around. |
reset_contents | reset the contents of this lift platform to its original state in case someone put too much shit on it. everything that is considered foreign is deleted, you can configure what is considered foreign. |
set_movement_registrations | set the movement registrations to our current turf(s) so contents moving out of our tile(s) are removed from our movement lists |
show_fluff_message | Shows a message indicating that the lift has moved up or down. Arguments: |
travel | main proc for moving the lift in the direction [travel_direction]. handles horizontal and/or vertical movement for multi platformed lifts and multitile lifts. |
unset_movement_registrations | unset our movement registrations from turfs that no longer contain us (or every loc if turfs_to_unset is unspecified) |
verify_transport_contents | verify the movables in our list of contents are actually on our loc |
Var Details
changed_gliders
movables inside transport_contents who had their glide_size changed since our last movement. used so that we dont have to change the glide_size of every object every movement, which scales to cost more than you'd think
collision_lethality
damage multiplier if a mob is hit by the lift while it is moving horizontally
create_modular_set
if TRUE, this platform will late initialize and then expand to become a multitile object across all other linked platforms on this z level
current_operators
A lazylist of REFs to all mobs which have a radial open currently
elevator_vertical_speed
How long does it take for the elevator to move vertically?
glide_size_override
what glide_size we set our moving contents to.
height
how many tiles this platform extends on the y axis (north-south not up-down, that would be the z axis)
initial_contents
weakrefs to the contents we have when we're first created. stored so that admins can clear the tram to its initial state if someone put a bunch of stuff onto it.
pass_through_floors
if true, the elevator works through floors
radial_travel
We use a radial to travel primarily, instead of a button / ui
speed_limiter
decisecond delay between horizontal movements. cannot make the tram move faster than 1 movement per world.tick_lag. only used to give to the transport_controller
transport_contents
what movables on our platform that we are moving
transport_controller_datum
master datum that controls our movement. in general /transport/linear subtypes control moving themselves, and /datum/transport_controller instances control moving the entire tram and any behavior associated with that.
transport_controller_type
what subtype of /datum/transport_controller to create for itself if no other platform on this tram has created one yet. very important for some behaviors since
transport_id
ID used to determine what transport types we can merge with
violent_landing
if TRUE, we will gib anyone we land on top of. if FALSE, we will just apply damage with a serious wound penalty.
warns_on_down_movement
Does our elevator warn people (with visual effects) when moving down?
width
how many tiles this platform extends on the x axis
Proc Details
add_initial_contents
adds everything on our tile that can be added to our transport_contents and initial_contents lists when we're created
can_open_lift_radial
Callback / general proc to check if the lift is usable by the passed mob.
check_menu
Proc to ensure that the radial menu closes when it should. Arguments:
- user - The person that opened the menu.
- starting_loc - The location of the lift when the menu was opened, used to prevent the menu from being interacted with after the lift was moved by someone else.
Returns:
- boolean, FALSE if the menu should be closed, TRUE if the menu is clear to stay opened.
create_modular_set
make this tram platform multitile, expanding to cover all the tram platforms adjacent to us and deleting them. makes movement more efficient. the platform becoming multitile should be in the lower left corner since thats assumed to be the loc of multitile objects
group_move
move the movers list of movables on our tile to destination if we successfully move there first. this is like calling forceMove() on everything in movers and ourselves, except nothing in movers has destination.Entered() and origin.Exited() called on them, as only our movement can be perceived. none of the movers are able to react to the movement of any other mover, saving a lot of needless processing cost and is more sensible. without this, if you and a banana are on the same platform, when that platform moves you will slip on the banana even if youre not moving relative to it.
module_adjacency
returns an unordered list of all lift platforms adjacent to us. used so our transport_controller_datum can control all connected platforms. includes platforms directly above or below us as well. only includes platforms with an identical transport_id to our own.
on_changed_glide_size
signal handler for COMSIG_MOVABLE_UPDATE_GLIDE_SIZE: when a movable in transport_contents changes its glide_size independently. adds that movable to a lazy list, movables in that list have their glide_size updated when the tram next moves
open_lift_radial
Opens the radial for the lift, allowing the user to move it around.
reset_contents
reset the contents of this lift platform to its original state in case someone put too much shit on it. everything that is considered foreign is deleted, you can configure what is considered foreign.
used by an admin via calling reset_lift_contents() on our transport_controller_datum.
Arguments:
- consider_anything_past - number. if > 0 this platform will only handle foreign contents that exceed this number on each of our locs
- foreign_objects - bool. if true this platform will consider /atom/movable's that arent mobs as part of foreign contents
- foreign_non_player_mobs - bool. if true we consider mobs that dont have a mind to be foreign
- consider_player_mobs - bool. if true we consider player mobs to be foreign. only works if foreign_non_player_mobs is true as well
set_movement_registrations
set the movement registrations to our current turf(s) so contents moving out of our tile(s) are removed from our movement lists
show_fluff_message
Shows a message indicating that the lift has moved up or down. Arguments:
- direction - What direction are we going
- user - The mob that caused the lift to move, for the visible message.
travel
main proc for moving the lift in the direction [travel_direction]. handles horizontal and/or vertical movement for multi platformed lifts and multitile lifts.
unset_movement_registrations
unset our movement registrations from turfs that no longer contain us (or every loc if turfs_to_unset is unspecified)
verify_transport_contents
verify the movables in our list of contents are actually on our loc