module ![code/modules/mod/modules/_module.dm 2](git.png)
MOD Module - A special device installed in a MODsuit allowing the suit to do new stuff.
Vars | |
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? |
idle_power_cost | Power use when idle |
incompatible_modules | What modules are we incompatible with? |
mask_worn_overlay | If TRUE worn overlay will be masked with the suit, preventing any bits from poking out of its controur |
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 |
part_activated | Are all parts needed active- have we ran on_part_activation |
part_process | Do we need the parts to be extended to run process |
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. |
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 |
Procs | |
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() |
can_install | Additional checks for whenever a module can be installed into a suit or not |
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. |
get_configuration | Creates a list of configuring options for this module, possible configs include number, bool, color, list, button. |
has_required_parts | Looks through the MODsuit's parts to see if it has the parts required to support this module |
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_part_activation | Called when the MODsuit is activated |
on_part_deactivation | Called when the MODsuit is deactivated |
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_unequip | Called when the MODsuit is unequipped |
on_uninstall | Called from MODsuit's uninstall() proc, so when the module is uninstalled |
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 |
Var Details
active ![code/modules/mod/modules/_module.dm 11](git.png)
Is the module active
active_power_cost ![code/modules/mod/modules/_module.dm 17](git.png)
Power use when active
allow_flags ![code/modules/mod/modules/_module.dm 49](git.png)
flags that let the module ability be used in odd circumstances
complexity ![code/modules/mod/modules/_module.dm 13](git.png)
How much space it takes up in the MOD
cooldown_time ![code/modules/mod/modules/_module.dm 39](git.png)
Cooldown after use
cooldown_timer ![code/modules/mod/modules/_module.dm 55](git.png)
Timer for the cooldown
device ![code/modules/mod/modules/_module.dm 25](git.png)
If we're an active module, what item are we?
idle_power_cost ![code/modules/mod/modules/_module.dm 15](git.png)
Power use when idle
incompatible_modules ![code/modules/mod/modules/_module.dm 37](git.png)
What modules are we incompatible with?
mask_worn_overlay ![code/modules/mod/modules/_module.dm 53](git.png)
If TRUE worn overlay will be masked with the suit, preventing any bits from poking out of its controur
mod ![code/modules/mod/modules/_module.dm 23](git.png)
Linked MODsuit
module_type ![code/modules/mod/modules/_module.dm 9](git.png)
If it's passive, togglable, usable or active
overlay_icon_file ![code/modules/mod/modules/_module.dm 33](git.png)
Icon file for the overlay.
overlay_state_active ![code/modules/mod/modules/_module.dm 29](git.png)
Overlay given to the user when the module is active
overlay_state_inactive ![code/modules/mod/modules/_module.dm 27](git.png)
Overlay given to the user when the module is inactive
overlay_state_use ![code/modules/mod/modules/_module.dm 31](git.png)
Overlay given to the user when the module is used, lasts until cooldown finishes
part_activated ![code/modules/mod/modules/_module.dm 43](git.png)
Are all parts needed active- have we ran on_part_activation
part_process ![code/modules/mod/modules/_module.dm 45](git.png)
Do we need the parts to be extended to run process
pinned_to ![code/modules/mod/modules/_module.dm 47](git.png)
List of REF()s mobs we are pinned to, linked with their action buttons
removable ![code/modules/mod/modules/_module.dm 7](git.png)
If it can be removed
required_slots ![code/modules/mod/modules/_module.dm 51](git.png)
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.
tgui_id ![code/modules/mod/modules/_module.dm 21](git.png)
ID used by their TGUI
use_energy_cost ![code/modules/mod/modules/_module.dm 19](git.png)
Power use when used, we call it manually
use_mod_colors ![code/modules/mod/modules/_module.dm 35](git.png)
Does the overlay use the control unit's colors?
used_signal ![code/modules/mod/modules/_module.dm 41](git.png)
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()
can_install
Additional checks for whenever a module can be installed into a suit or not
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.
get_configuration
Creates a list of configuring options for this module, possible configs include number, bool, color, list, button.
has_required_parts
Looks through the MODsuit's parts to see if it has the parts required to support this module
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_part_activation
Called when the MODsuit is activated
on_part_deactivation
Called when the MODsuit is deactivated
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_unequip
Called when the MODsuit is unequipped
on_uninstall
Called from MODsuit's uninstall() proc, so when the module is uninstalled
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