vehicle

Vars | |
autogrant_actions_controller | assoc list "[bitflag]" = list(typepaths) |
---|---|
autogrant_actions_passenger | plain list of typepaths |
canmove | Whether the vehicle is currently able to move |
hitbox | multitile hitbox, set to a hitbox type to make this vehicle multitile. |
inserted_key | The inserted key, needed on some vehicles to start the engine |
key_type | If the driver needs a certain item in hand (or inserted, for vehicles) to drive this. For vehicles, this must be duplicated on their riding component subtype /datum/component/riding/var/keytype variable because only a few specific checks are handled here with this var, and the majority of it is on the riding component Eventually the remaining checks should be moved to the component and this var removed. |
max_drivers | Maximum amount of drivers |
max_occupants | Maximum amount of passengers plus drivers |
occupant_actions | assoc list mob = list(type = action datum assigned to mob) |
occupants | mob = bitflags of their control level. |
trailer | This vehicle will follow us when we move (like atrailer duh) |
trigger_gargoyle | Whether this vehicle triggers gargoyles |
Procs | |
add_control_flags | Adds control flags and any associated changes to a mob |
add_desant | Any special behavior when a desant is added |
destroy_controller_action_type | |
destroy_passenger_action_type | |
generate_action_type | |
generate_actions | |
grant_action_type_to_mob | |
grant_passenger_actions | |
initialize_controller_action_type | |
initialize_passenger_action_type | |
is_equipment_controller | Is the passed mob an equipment controller? |
remove_action_type_from_mob | |
remove_control_flags | Removes control flags and any associated changes to a mob |
remove_desant | Any special behavior when a desant is removed |
remove_passenger_actions | |
shuttleRotate | Machine rotate procs |
Var Details
autogrant_actions_controller

assoc list "[bitflag]" = list(typepaths)
autogrant_actions_passenger

plain list of typepaths
canmove

Whether the vehicle is currently able to move
hitbox

multitile hitbox, set to a hitbox type to make this vehicle multitile.
inserted_key

The inserted key, needed on some vehicles to start the engine
key_type

If the driver needs a certain item in hand (or inserted, for vehicles) to drive this. For vehicles, this must be duplicated on their riding component subtype /datum/component/riding/var/keytype variable because only a few specific checks are handled here with this var, and the majority of it is on the riding component Eventually the remaining checks should be moved to the component and this var removed.
max_drivers

Maximum amount of drivers
max_occupants

Maximum amount of passengers plus drivers
occupant_actions

assoc list mob = list(type = action datum assigned to mob)
occupants

mob = bitflags of their control level.
trailer

This vehicle will follow us when we move (like atrailer duh)
trigger_gargoyle

Whether this vehicle triggers gargoyles
Proc Details
add_control_flags
Adds control flags and any associated changes to a mob
add_desant
Any special behavior when a desant is added
destroy_controller_action_type
As the name implies, removes the actiontype from autogrant and removes it from all occupants args:
- actiontype: typepath of the action you want to remove from occupants and autogrant.
destroy_passenger_action_type
Removes this action type from all occupants and stops autogranting it args:
- actiontype: typepath of the action you want to remove from occupants and the autogrant list.
generate_action_type
A small proc to properly set up each action path. args:
- actiontype: typepath of the action the proc sets up. returns created and set up action instance
generate_actions
You override this with initialize_passenger_action_type and initialize_controller_action_type calls To give passengers actions when they enter the vehicle. Read the documentation on the aforementioned procs to learn the difference
grant_action_type_to_mob
As on the tin, it does all the annoying small stuff and sanity needed to GRANT an action to a mob. args:
- actiontype: typepath of the action you want to give to grant_to.
- grant_to: the mob we're giving actiontype to returns TRUE if successfully granted
grant_passenger_actions
Called on every passenger that enters the vehicle, goes through the list of actions it needs to give... and does that. args:
- grant_to: mob that needs to get every action the vehicle grants
initialize_controller_action_type
Gives any passenger that enters the vehicle this action... IF they have the correct vehicle control flag. This is used so passengers cannot press buttons only drivers should have, for example. args:
- actiontype: typepath of the action you want to give occupants.
initialize_passenger_action_type
Gives any passenger that enters the mech this action. They will lose it when they disembark. args:
- actiontype: typepath of the action you want to give occupants.
is_equipment_controller
Is the passed mob an equipment controller?
remove_action_type_from_mob
As on the tin, it does all the annoying small stuff and sanity needed to REMOVE an action to a mob. args:
- actiontype: typepath of the action you want to give to grant_to.
- take_from: the mob we're taking actiontype to returns TRUE if successfully removed
remove_control_flags
Removes control flags and any associated changes to a mob
remove_desant
Any special behavior when a desant is removed
remove_passenger_actions
Called on every passenger that exits the vehicle, goes through the list of actions it needs to remove... and does that. args:
- take_from: mob that needs to get every action the vehicle grants
shuttleRotate
Machine rotate procs