Daedalus Dock - Modules - TypesVar Details - Proc Details

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_movementWhether this mech is allowed to move diagonally
bumpsmashWhether or not the mech destroys walls by running into it.
cabin_airInternal air mix datum
capacitorKeeps track of the mech's capacitor
cellKeeps track of the mech's cell
completely_disabledJust stop the mech from doing anything
component_damage_thresholddamage threshold above which we take component damage
connected_portThe connected air port, if we have one
construction_stateWhether the mechs maintenance protocols are on or off
defense_modeBool for energy shield on/off
destruction_sleep_durationTime you get slept for if you get forcible ejected by the mech exploding
dir_inWhat direction will the mech face when entered/powered on? Defaults to South.
dna_lockStores the DNA enzymes of a carbon so tht only they can access the mech
enclosedWhether outside viewers can see the pilot inside
equip_by_categoryassoc list: key-typepathlist before init, key-equipmentlist after
equipment_disabledif we cant use our equipment(such as due to EMP)
exit_delayTIme taken to leave the mech
facing_modifiersModifiers for directional damage reduction
flat_equipmentflat equipment for iteration
internal_damageBitflags for internal damage
internal_damage_probability% chance for internal damage to occur
internal_damage_thresholddamage amount above which we can take internal damages
internal_tankThe internal air tank obj of the mech
internal_tank_valveThe setting of the valve on the internal tank
internals_req_accessrequired access to change internal components
is_currently_ejectingCurrently ejecting, and unable to do things
leg_overload_coeffEnergy use modifier for leg overload
leg_overload_modeBool for leg overload on/off
lights_powerHow powerful our lights are
max_equip_by_categoryassoc list: max equips for non-arm modules key-count
mecha_flagsContains flags for the mecha
melee_cooldownCooldown duration between melee punches
melee_energy_drainHow much energy we drain each time we mechpunch someone
normal_step_energy_drainHow 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_accessrequired access level for mecha operation
overload_step_energy_drain_minThe minimum amount of energy charge consumed by leg overload
phase_stateicon_state for flick() when phazing
phasingcheck for phasing, if it is set to text (to describe how it is phasing: "flying", "phasing") it will let the mech walk through walls.
phasing_energy_drainPower we use every time we phaze through something
possible_int_damagelist of possibly dealt internal damage for this mech type
radioSpecial version of the radio, which is unsellable
scanmodKeeps track of the mech's scanning module
silbutton_icon_stateIn case theres a different iconstate for AI/MMI pilot(currently only used for ripley)
smashcooldownCooldown length between bumpsmashes
smoke_chargesRemaining smoke charges
smoke_cooldownCooldown between using smoke
spark_systemSpark effects are handled by this datum
step_energy_drainHow much energy the mech will consume each time it moves. this is the current active energy consumed
step_silentWhether our steps are silent due to no gravity
stepsoundSound played when the mech moves
strafeWether we are strafing
turnsoundSound played when the mech walks
ui_viewref to screen object that displays in the middle of the UI
ui_xUi size, so you can make the UI bigger if you let it load a lot of stuff
ui_yUi size, so you can make the UI bigger if you let it load a lot of stuff
use_internal_tank////////ATMOS Whether we are currrently drawing from the internal tank
wreckageTypepath for the wreckage it spawns when destroyed

Procs

add_capacitorAdds a capacitor, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
add_cellUpdates the values given by scanning module and capacitor tier, called when a part is removed or inserted.
add_scanmodAdds a scanning module, for use in Map-spawned mechs, Nuke Ops mechs, and admin-spawned mechs. Mechs built by hand will replace this.
ai_enter_mechHack and From Card interactions share some code, so leave that here for both to use.
aimob_enter_mechHandles an actual AI (simple_animal mecha pilot) entering the mech
aimob_exit_mechHandles an actual AI (simple_animal mecha pilot) exiting the mech
ammo_resupplyAmmo stuff
attack_aiAI piloting
diag_hud_set_mechtrackingShows tracking beacons on the mech
disconnect_airDisconnects air tank- air port connection on mecha move
display_speech_bubbleDisplays a special speech bubble when someone inside the mecha speaks
generate_action_typeMECHA ACTIONS
get_armour_facingreturns a number for the damage multiplier for this relative angle/dir
get_int_repair_fluff_endgets the successful finish balloon alert flufftext
get_int_repair_fluff_failgets the on-fail balloon alert flufftext
get_int_repair_fluff_startgets the starting balloon alert flufftext
has_chargePower stuff
on_light_eaterSpecial light eater handling
on_mouseclick// Action processing ////
operation_allowedAccess stuff
play_stepsound///// Movement procs ////////
remove_airAtmospheric stuff
returnPressurefetches pressure of the gas mixture we are using
return_temperaturefetches temp of the gas mixture we are using
setDirSets the direction of the mecha and all of its occcupents, required for FOV. Alternatively one could make a recursive contents registration and register topmost direction changes in the fov component
try_damage_componenttries to damage mech equipment depending on damage and where is being targetted
try_deal_internal_damagetries to deal internal damaget depending on the damage amount
try_repair_int_damage///// Internal damage ////////

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

component_damage_threshold

damage threshold above which we take component damage

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

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

enclosed

Whether outside viewers can see the pilot inside

equip_by_category

assoc list: key-typepathlist before init, key-equipmentlist after

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 damage reduction

flat_equipment

flat equipment for iteration

internal_damage

Bitflags for internal damage

internal_damage_probability

% chance for internal damage to occur

internal_damage_threshold

damage amount above which we can take internal damages

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

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_by_category

assoc list: max equips for non-arm modules key-count

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

check for phasing, if it is set to text (to describe how it is phasing: "flying", "phasing") it will let the mech walk through walls.

phasing_energy_drain

Power we use every time we phaze through something

possible_int_damage

list of possibly dealt internal damage for this mech type

radio

Special version of the radio, which is unsellable

scanmod

Keeps track of the mech's scanning module

silbutton_icon_state

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 due to no gravity

stepsound

Sound played when the mech moves

strafe

Wether we are strafing

turnsound

Sound played when the mech walks

ui_view

ref to screen object that displays in the middle of the UI

ui_x

Ui size, so you can make the UI bigger if you let it load a lot of stuff

ui_y

Ui size, so you can make the UI bigger if you let it load a lot of stuff

use_internal_tank

////////ATMOS Whether we are currrently drawing from the internal tank

wreckage

Typepath for the wreckage it spawns when destroyed

Proc Details

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

Updates the values given by scanning module and capacitor tier, called when a part is removed or inserted.

/// Helpers /////////

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.

ai_enter_mech

Hack and From Card interactions share some code, so leave that here for both to use.

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

diag_hud_set_mechtracking

Shows tracking beacons on the mech

disconnect_air

Disconnects air tank- air port connection on mecha move

display_speech_bubble

Displays a special speech bubble when someone inside the mecha speaks

generate_action_type

MECHA ACTIONS

get_armour_facing

returns a number for the damage multiplier for this relative angle/dir

get_int_repair_fluff_end

gets the successful finish balloon alert flufftext

get_int_repair_fluff_fail

gets the on-fail balloon alert flufftext

get_int_repair_fluff_start

gets the starting balloon alert flufftext

has_charge

Power stuff

on_light_eater

Special light eater handling

on_mouseclick

// Action processing ////

Called when a driver clicks somewhere. Handles everything like equipment, punches, etc.

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

returnPressure

fetches pressure of the gas mixture we are using

return_temperature

fetches temp of the gas mixture we are using

setDir

Sets the direction of the mecha and all of its occcupents, required for FOV. Alternatively one could make a recursive contents registration and register topmost direction changes in the fov component

try_damage_component

tries to damage mech equipment depending on damage and where is being targetted

try_deal_internal_damage

tries to deal internal damaget depending on the damage amount

try_repair_int_damage

///// Internal damage ////////

tries to repair any internal damage and plays fluff for it