mecha 
WELCOME TO MECHA.DM, ENJOY YOUR STAY
Mechs are now (finally) vehicles, this means you can make them multicrew They can also grant select ability buttons based on occupant bitflags
Movement is handled through vehicle_move() which is called by relaymove Clicking is done by way of signals registering to the entering mob NOTE: MMIS are NOT mobs but instead contain a brain that is, so you need special checks AI also has special checks becaus it gets in and out of the mech differently Always call remove_occupant(mob) when leaving the mech so the mob is removed properly
For multi-crew, you need to set how the occupants recieve ability bitflags corresponding to their status on the vehicle(i.e: driver, gunner etc) Abilities can then be set to only apply for certain bitflags and are assigned as such automatically
Clicks are wither translated into mech_melee_attack (see mech_melee_attack.dm) Or are used to call action() on equipped gear Cooldown for gear is on the mech because exploits
Vars | |
active_thrusters | /Action vars Ref to any active thrusters we might have |
---|---|
allow_diagonal_movement | Whether this mech is allowed to move diagonally |
bumpsmash | Whether or not the mech destroys walls by running into it. |
cabin_air | Internal air mix datum |
capacitor | Keeps track of the mech's capacitor |
cell | Keeps track of the mech's cell |
completely_disabled | Just stop the mech from doing anything |
connected_port | The connected air port, if we have one |
construction_state | Whether the mechs maintenance protocols are on or off |
defense_mode | Bool for energy shield on/off |
deflect_chance | chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. |
destruction_sleep_duration | Time you get slept for if you get forcible ejected by the mech exploding |
dir_in | What direction will the mech face when entered/powered on? Defaults to South. |
dna_lock | Stores the DNA enzymes of a carbon so tht only they can access the mech |
equipment_disabled | if we cant use our equipment(such as due to EMP) |
exit_delay | TIme taken to leave the mech |
facing_modifiers | Modifiers for directional armor |
internal_damage | Bitflags for internal damage |
internal_damage_threshold | health percentage below which internal damage is possible |
internal_tank | The internal air tank obj of the mech |
internal_tank_valve | The setting of the valve on the internal tank |
internals_req_access | required access to change internal components |
is_currently_ejecting | Currently ejecting, and unable to do things |
lavaland_only | Bool for whether this mech can only be used on lavaland |
leg_overload_coeff | Energy use modifier for leg overload |
leg_overload_mode | Bool for leg overload on/off |
lights_power | How powerful our lights are |
max_equip | Maximum amount of equipment we can have |
mecha_flags | Contains flags for the mecha |
melee_cooldown | Cooldown duration between melee punches |
melee_energy_drain | How much energy we drain each time we mechpunch someone |
normal_step_energy_drain | How much energy the mech will consume each time it moves. This variable is a backup for when leg actuators affect the energy drain. |
operation_req_access | required access level for mecha operation |
overload_step_energy_drain_min | The minimum amount of energy charge consumed by leg overload |
phase_state | icon_state for flick() when phazing |
phasing | Bool for if the mech is currently phasing |
phasing_energy_drain | Power we use every time we phaze through something |
radio | Special version of the radio, which is unsellable |
scanmod | Keeps track of the mech's scanning module |
selected | Current active equipment |
silicon_icon_state | Whether outside viewers can see the pilot inside In case theres a different iconstate for AI/MMI pilot(currently only used for ripley) |
smashcooldown | Cooldown length between bumpsmashes |
smoke_charges | Remaining smoke charges |
smoke_cooldown | Cooldown between using smoke |
spark_system | Spark effects are handled by this datum |
step_energy_drain | How much energy the mech will consume each time it moves. this is the current active energy consumed |
step_silent | Whether our steps are silent, for example in zero-G |
stepsound | Sound played when the mech moves |
strafe | Wether we are strafing |
turnsound | Sound played when the mech walks |
use_internal_tank | ////////ATMOS Whether we are currrently drawing from the internal tank |
wreckage | Typepath for the wreckage it spawns when destroyed |
Procs | |
Topic | Topic |
add_airtank | Helpers |
add_capacitor | Adds a capacitor, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this. |
add_cell | Adds a cell, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this. |
add_scanmod | Adds a scanning module, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this. |
aimob_enter_mech | Handles an actual AI (simple_animal mecha pilot) entering the mech |
aimob_exit_mech | Handles an actual AI (simple_animal mecha pilot) exiting the mech |
ammo_resupply | Ammo stuff |
attack_ai | AI piloting |
check_for_internal_damage | Internal damage |
generate_action_type | MECHA ACTIONS |
get_actions | Returns HTML for mech actions. Ideally, this proc would be empty for the base mecha. Segmented for easy refactoring. |
get_commands | HTML for commands. |
get_equipment_list | HTML for list of equipment. |
get_stats_html | Rendering stats window |
get_stats_part | Returns the status of the mech. |
has_charge | Power stuff |
on_mouseclick | Action processing |
operation_allowed | Access stuff |
play_stepsound | ///// Movement procs //////// |
remove_air | Atmospheric stuff |
report_internal_damage | HTML for internal damage. |
stationary_repair | Repairs internal damage if the mech hasn't moved. |
Var Details
active_thrusters 
/Action vars Ref to any active thrusters we might have
allow_diagonal_movement 
Whether this mech is allowed to move diagonally
bumpsmash 
Whether or not the mech destroys walls by running into it.
cabin_air 
Internal air mix datum
capacitor 
Keeps track of the mech's capacitor
cell 
Keeps track of the mech's cell
completely_disabled 
Just stop the mech from doing anything
connected_port 
The connected air port, if we have one
construction_state 
Whether the mechs maintenance protocols are on or off
defense_mode 
Bool for energy shield on/off
deflect_chance 
chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
destruction_sleep_duration 
Time you get slept for if you get forcible ejected by the mech exploding
dir_in 
What direction will the mech face when entered/powered on? Defaults to South.
dna_lock 
Stores the DNA enzymes of a carbon so tht only they can access the mech
equipment_disabled 
if we cant use our equipment(such as due to EMP)
exit_delay 
TIme taken to leave the mech
facing_modifiers 
Modifiers for directional armor
internal_damage 
Bitflags for internal damage
internal_damage_threshold 
health percentage below which internal damage is possible
internal_tank 
The internal air tank obj of the mech
internal_tank_valve 
The setting of the valve on the internal tank
internals_req_access 
required access to change internal components
is_currently_ejecting 
Currently ejecting, and unable to do things
lavaland_only 
Bool for whether this mech can only be used on lavaland
leg_overload_coeff 
Energy use modifier for leg overload
leg_overload_mode 
Bool for leg overload on/off
lights_power 
How powerful our lights are
max_equip 
Maximum amount of equipment we can have
mecha_flags 
Contains flags for the mecha
melee_cooldown 
Cooldown duration between melee punches
melee_energy_drain 
How much energy we drain each time we mechpunch someone
normal_step_energy_drain 
How much energy the mech will consume each time it moves. This variable is a backup for when leg actuators affect the energy drain.
operation_req_access 
required access level for mecha operation
overload_step_energy_drain_min 
The minimum amount of energy charge consumed by leg overload
phase_state 
icon_state for flick() when phazing
phasing 
Bool for if the mech is currently phasing
phasing_energy_drain 
Power we use every time we phaze through something
radio 
Special version of the radio, which is unsellable
scanmod 
Keeps track of the mech's scanning module
selected 
Current active equipment
silicon_icon_state 
Whether outside viewers can see the pilot inside In case theres a different iconstate for AI/MMI pilot(currently only used for ripley)
smashcooldown 
Cooldown length between bumpsmashes
smoke_charges 
Remaining smoke charges
smoke_cooldown 
Cooldown between using smoke
spark_system 
Spark effects are handled by this datum
step_energy_drain 
How much energy the mech will consume each time it moves. this is the current active energy consumed
step_silent 
Whether our steps are silent, for example in zero-G
stepsound 
Sound played when the mech moves
strafe 
Wether we are strafing
turnsound 
Sound played when the mech walks
use_internal_tank 
////////ATMOS Whether we are currrently drawing from the internal tank
wreckage 
Typepath for the wreckage it spawns when destroyed
Proc Details
Topic
Topic
add_airtank
Helpers
add_capacitor
Adds a capacitor, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
add_cell
Adds a cell, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
add_scanmod
Adds a scanning module, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
aimob_enter_mech
Handles an actual AI (simple_animal mecha pilot) entering the mech
aimob_exit_mech
Handles an actual AI (simple_animal mecha pilot) exiting the mech
ammo_resupply
Ammo stuff
attack_ai
AI piloting
check_for_internal_damage
Internal damage
generate_action_type
MECHA ACTIONS
get_actions
Returns HTML for mech actions. Ideally, this proc would be empty for the base mecha. Segmented for easy refactoring.
get_commands
HTML for commands.
get_equipment_list
HTML for list of equipment.
get_stats_html
Rendering stats window
get_stats_part
Returns the status of the mech.
has_charge
Power stuff
on_mouseclick
Action processing
operation_allowed
Access stuff
play_stepsound
///// Movement procs ////////
Plays the mech step sound effect. Split from movement procs so that other mechs (HONK) can override this one specific part.
remove_air
Atmospheric stuff
report_internal_damage
HTML for internal damage.
stationary_repair
Repairs internal damage if the mech hasn't moved.