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

linear

Base transport structure. A single tile that can form a modular set with neighbouring tiles This type holds elevators and trams

Vars

changed_glidersmovables 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_lethalitydamage multiplier if a mob is hit by the lift while it is moving horizontally
create_modular_setif TRUE, this platform will late initialize and then expand to become a multitile object across all other linked platforms on this z level
current_operatorsA lazylist of REFs to all mobs which have a radial open currently
elevator_vertical_speedHow long does it take for the elevator to move vertically?
glide_size_overridewhat glide_size we set our moving contents to.
heighthow many tiles this platform extends on the y axis (north-south not up-down, that would be the z axis)
initial_contentsweakrefs 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_floorsif true, the elevator works through floors
radial_travelWe use a radial to travel primarily, instead of a button / ui
speed_limiterdecisecond 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_contentswhat movables on our platform that we are moving
transport_controller_datummaster 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_typewhat 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_idID used to determine what transport types we can merge with
violent_landingif 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_movementDoes our elevator warn people (with visual effects) when moving down?
widthhow many tiles this platform extends on the x axis

Procs

add_initial_contentsadds everything on our tile that can be added to our transport_contents and initial_contents lists when we're created
can_open_lift_radiallist of resolve()'d initial_contents that are still in transport_contents list of objects we consider foreign according to the given arguments Callback / general proc to check if the lift is usable by the passed mob.
check_menuProc to ensure that the radial menu closes when it should. Arguments:
create_modular_setmake 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_movemove 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_adjacencylist of turfs we dont go over. if for whatever reason we encounter an already multitile lift platform we add all of its locs to this list so we dont add that lift platform multiple times as we iterate through its locs 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_sizesignal 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_radialOpens the radial for the lift, allowing the user to move it around.
register_collisionhandles any special interactions objects could have with the lift/tram, handled on the item itself potentially finds a spot to throw the victim at for daring to be hit by a tram. is null if we havent found anything to throw handles any special interactions objects could have with the lift/tram, handled on the item itself
reset_contentsreset 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_registrationsset the movement registrations to our current turf(s) so contents moving out of our tile(s) are removed from our movement lists
show_fluff_messageShows a message indicating that the lift has moved up or down. Arguments:
travelmain 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_registrationsunset our movement registrations from turfs that no longer contain us (or every loc if turfs_to_unset is unspecified)

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

list of resolve()'d initial_contents that are still in transport_contents list of objects we consider foreign according to the given arguments 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:

Returns:

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

list of turfs we dont go over. if for whatever reason we encounter an already multitile lift platform we add all of its locs to this list so we dont add that lift platform multiple times as we iterate through its locs 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.

register_collision

handles any special interactions objects could have with the lift/tram, handled on the item itself potentially finds a spot to throw the victim at for daring to be hit by a tram. is null if we havent found anything to throw handles any special interactions objects could have with the lift/tram, handled on the item itself

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:

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)