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

module

MOD Module - A special device installed in a MODsuit allowing the suit to do new stuff.

Vars

activeIs the module active
active_power_costPower use when active
allow_flagsflags that let the module ability be used in odd circumstances
complexityHow much space it takes up in the MOD
cooldown_timeCooldown after use
cooldown_timerTimer for the cooldown
deviceIf we're an active module, what item are we?
has_head_spriteDoes this module have a separate head sprite? Useful for muzzled sprites
head_only_when_activeIs the module's visuals head-only when active? Useful for visors and such, to avoid multiplying the amount of overlay with empty images
head_only_when_inactiveIs the module's visuals head-only when inactive? Useful for visors and such, to avoid multiplying the amount of overlay with empty images
idle_power_costPower use when idle
incompatible_modulesWhat modules are we incompatible with?
modLinked MODsuit
module_typeIf it's passive, togglable, usable or active
overlay_icon_fileIcon file for the overlay.
overlay_state_activeOverlay given to the user when the module is active
overlay_state_inactiveOverlay given to the user when the module is inactive
overlay_state_useOverlay given to the user when the module is used, lasts until cooldown finishes
pinned_toList of REF()s mobs we are pinned to, linked with their action buttons
removableIf it can be removed
required_slotsA list of slots required in the suit to work. Formatted like list(x|y, z, ...) where either x or y are required and z is required.
retracts_intoWhich part of the modsuit this module is 'attached' to, for purposes of hiding them when retracting the part. Null means it won't get hidden.
suit_supports_variations_flagsThe suit's supports_variations_flags, currently only for the chestplate and the helmet parts of the MODsuit.
tgui_idID used by their TGUI
use_energy_costPower use when used, we call it manually
use_mod_colorsDoes the overlay use the control unit's colors?
used_signalThe mouse button needed to use this module

Procs

activateCalled when the module is activated
add_module_overlayAdds the worn overlays to the suit.
add_ui_configurationGenerates an element of the get_configuration list with a display name, type and value
add_ui_dataAdds additional things to the MODsuit ui_data()
check_powerChecks if there is enough power in the suit
configure_editReceives configure edits from the TGUI and edits the vars
deactivateCalled when the module is deactivated
drain_powerDrains power from the suit charge
dropkeyOn drop key, concels a device item.
generate_worn_overlayGenerates an icon to be used for the suit's worn overlays
get_configurationCreates a list of configuring options for this module
handle_module_iconProc that handles the mutable_appearances of the module on the MODsuits
has_required_partsLooks through the MODsuit's parts to see if it has the parts required to support this module
is_module_hiddenCheck whether or not the mod's overlay is hidden.
on_activationCalled from the module's activate()
on_active_processCalled on the MODsuit's process if it is an active module
on_deactivationCalled from the module's deactivate()
on_device_deletionCalled when the device gets deleted on active modules
on_equipCalled when the MODsuit is equipped
on_exitCalled when the device moves to a different place on active modules
on_installCalled from MODsuit's install() proc, so when the module is installed
on_processCalled on the MODsuit's process
on_selectCalled when the module is selected from the TGUI, radial or the action button
on_select_useCalled when an activated module without a device is used
on_special_clickCalled when an activated module without a device is active and the user alt/middle-clicks
on_suit_activationCalled when the MODsuit is activated
on_suit_deactivationCalled when the MODsuit is deactivated
on_unequipCalled when the MODsuit is unequipped
on_useCalled from the module's used()
pinPins the module to the user's action buttons
start_cooldownApply a cooldown until this item can be used again
update_signalUpdates the signal used by active modules to be activated
usedCalled when the module is used

Var Details

active

Is the module active

active_power_cost

Power use when active

allow_flags

flags that let the module ability be used in odd circumstances

complexity

How much space it takes up in the MOD

cooldown_time

Cooldown after use

cooldown_timer

Timer for the cooldown

device

If we're an active module, what item are we?

has_head_sprite

Does this module have a separate head sprite? Useful for muzzled sprites

head_only_when_active

Is the module's visuals head-only when active? Useful for visors and such, to avoid multiplying the amount of overlay with empty images

head_only_when_inactive

Is the module's visuals head-only when inactive? Useful for visors and such, to avoid multiplying the amount of overlay with empty images

idle_power_cost

Power use when idle

incompatible_modules

What modules are we incompatible with?

mod

Linked MODsuit

module_type

If it's passive, togglable, usable or active

overlay_icon_file

Icon file for the overlay.

overlay_state_active

Overlay given to the user when the module is active

overlay_state_inactive

Overlay given to the user when the module is inactive

overlay_state_use

Overlay given to the user when the module is used, lasts until cooldown finishes

pinned_to

List of REF()s mobs we are pinned to, linked with their action buttons

removable

If it can be removed

required_slots

A list of slots required in the suit to work. Formatted like list(x|y, z, ...) where either x or y are required and z is required.

retracts_into

Which part of the modsuit this module is 'attached' to, for purposes of hiding them when retracting the part. Null means it won't get hidden.

suit_supports_variations_flags

The suit's supports_variations_flags, currently only for the chestplate and the helmet parts of the MODsuit.

tgui_id

ID used by their TGUI

use_energy_cost

Power use when used, we call it manually

use_mod_colors

Does the overlay use the control unit's colors?

used_signal

The mouse button needed to use this module

Proc Details

activate

Called when the module is activated

add_module_overlay

Adds the worn overlays to the suit.

add_ui_configuration

Generates an element of the get_configuration list with a display name, type and value

add_ui_data

Adds additional things to the MODsuit ui_data()

check_power

Checks if there is enough power in the suit

configure_edit

Receives configure edits from the TGUI and edits the vars

deactivate

Called when the module is deactivated

drain_power

Drains power from the suit charge

dropkey

On drop key, concels a device item.

generate_worn_overlay

Generates an icon to be used for the suit's worn overlays

get_configuration

Creates a list of configuring options for this module

handle_module_icon

Proc that handles the mutable_appearances of the module on the MODsuits

Arguments:

has_required_parts

Looks through the MODsuit's parts to see if it has the parts required to support this module

is_module_hidden

Check whether or not the mod's overlay is hidden.

Returns TRUE or FALSE based on whether the module is able to be hidden when the part it is attached to is retracted. By default, will return FALSE for every mod unless 'retracts_into' is set for that mod.

on_activation

Called from the module's activate()

on_active_process

Called on the MODsuit's process if it is an active module

on_deactivation

Called from the module's deactivate()

on_device_deletion

Called when the device gets deleted on active modules

on_equip

Called when the MODsuit is equipped

on_exit

Called when the device moves to a different place on active modules

on_install

Called from MODsuit's install() proc, so when the module is installed

on_process

Called on the MODsuit's process

on_select

Called when the module is selected from the TGUI, radial or the action button

on_select_use

Called when an activated module without a device is used

on_special_click

Called when an activated module without a device is active and the user alt/middle-clicks

on_suit_activation

Called when the MODsuit is activated

on_suit_deactivation

Called when the MODsuit is deactivated

on_unequip

Called when the MODsuit is unequipped

on_use

Called from the module's used()

pin

Pins the module to the user's action buttons

start_cooldown

Apply a cooldown until this item can be used again

update_signal

Updates the signal used by active modules to be activated

used

Called when the module is used