Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/component/riding

This is the riding component, which is applied to a movable atom by the ridable element when a mob is successfully buckled to said movable.

This component lives for as long as at least one mob is buckled to the parent. Once all mobs are unbuckled, the component is deleted, until another mob is buckled in and we make a new riding component, so on and so forth until the sun explodes.

Vars

allowed_turf_typecacheallow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
can_force_unbucklecan anyone other than the rider unbuckle the rider?
directional_vehicle_layers["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.
directional_vehicle_offsetssame as above but instead of layer you have a list(px, py)
forbid_turf_typecacheallow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
keytypeIf the driver needs a certain item in hand (or inserted, for vehicles) to drive this. For vehicles, this must be duplicated on the actual vehicle object in their [/obj/vehicle/var/key_type] variable because the vehicle objects still have a few special checks/functions of their own I'm not porting over to the riding component quite yet. Make sure if you define it on the vehicle, you define it here too.
message_cooldownFor telling someone they can't drive
override_allow_spacemoveWe don't need roads where we're going if this is TRUE, allow normal movement in space tiles
ride_check_flagsRide check flags defined for the specific riding component types, so we know if we need arms, legs, or whatever. Takes additional flags from the ridable element and the buckle proc (buckle_mob_flags) for riding cyborgs/humans in case we need to reserve arms
riding_offsetsposition_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.
vehicle_move_cooldownFor telling someone they can't drive
vehicle_move_delaytick delay between movements, lower = faster, higher = slower

Procs

handle_vehicle_layerSome ridable atoms may want to only show on top of the rider in certain directions, like wheelchairs
riding_can_z_moveExtra checks before buckled.can_z_move can be called in mob/living/can_z_move()

Var Details

allowed_turf_typecache

allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.

can_force_unbuckle

can anyone other than the rider unbuckle the rider?

directional_vehicle_layers

["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.

directional_vehicle_offsets

same as above but instead of layer you have a list(px, py)

forbid_turf_typecache

allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.

keytype

If the driver needs a certain item in hand (or inserted, for vehicles) to drive this. For vehicles, this must be duplicated on the actual vehicle object in their [/obj/vehicle/var/key_type] variable because the vehicle objects still have a few special checks/functions of their own I'm not porting over to the riding component quite yet. Make sure if you define it on the vehicle, you define it here too.

message_cooldown

For telling someone they can't drive

override_allow_spacemove

We don't need roads where we're going if this is TRUE, allow normal movement in space tiles

ride_check_flags

Ride check flags defined for the specific riding component types, so we know if we need arms, legs, or whatever. Takes additional flags from the ridable element and the buckle proc (buckle_mob_flags) for riding cyborgs/humans in case we need to reserve arms

riding_offsets

position_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.

vehicle_move_cooldown

For telling someone they can't drive

vehicle_move_delay

tick delay between movements, lower = faster, higher = slower

Proc Details

handle_vehicle_layer

Some ridable atoms may want to only show on top of the rider in certain directions, like wheelchairs

riding_can_z_move

Extra checks before buckled.can_z_move can be called in mob/living/can_z_move()