robot_module
Vars | |
basic_modules | A list of module-specific, non-emag modules the borg will gain when this module is chosen. |
---|---|
channels | Radio channels the module owner has access to. |
custom_removals | Special items that are able to be removed from the robot owner via crowbar. |
emag_modules | A list of modules the robot gets when emagged. |
emag_override_modules | A list of modules the robot gets when either emagged or Safety Overridden. |
malf_modules | A list of modules that the robot gets when malf AI buys it. |
malfhacked | Has the AI hacked the borg module, allowing access to the malf AI exclusive item. |
material_storages | A list of all "material stacks", i.e. metal, glass, and reinforced glass |
module_actions | Special actions this module will gain when chosen such as meson vision, or thermal vision. |
module_type | For icon usage. |
modules | A list of all currently usable and created modules the robot currently has access too. |
override_modules | A list of modules the robot gets when Safety Overridden. |
special_rechargables | A list of modules that require special recharge handling. Examples include things like flashes, sprays and welding tools. |
storages | A list of all "energy stacks", i.e cables, brute kits, splints, etc. |
subsystems | Available tools given in the verb tab such as a crew monitor, or power monitor. |
Procs | |
add_armor | Adds armor to a cyborg. Normaly resets it to 0 across the board, unless the module has an armor defined. |
add_languages | Adds all of the languages this module is suppose to know and/or speak. |
add_module | Adds the item I to our modules list, and sets up an /datum/robot_storage/energy if its a stack. |
add_subsystems_and_actions | Adds anything in subsystems to the robot's verbs, and grants any actions that are in module_actions . |
get_or_create_estorage | Returns a robot_energy_strage datum of type storage_type . If one already exists, it returns that one, otherwise it create a new one. |
handle_death | Overriden for specific modules if they have storage items. These should have their contents emptied out onto the floor. |
rebuild_modules | Builds the usable module list from the modules we have in basic_modules , override_modules , emag_modules , emag_override_modules and malf_modules |
recharge_consumables | Handles the recharging of all borg stack items and any items which are in the special_rechargables list. |
remove_item_from_lists | Searches through the various module lists for the given item_type , deletes and removes the item from all supplied lists, if the item is found. |
remove_subsystems_and_actions | Removes any verbs from the robot that are in subsystems , and removes any actions that are in module_actions . |
unemag | Called when the robot owner of this module has the unemag() proc called on them, which is only via admin means. |
update_cells | Called when the robot owner of this module has their power cell replaced. |
Var Details
basic_modules
A list of module-specific, non-emag modules the borg will gain when this module is chosen.
channels
Radio channels the module owner has access to.
custom_removals
Special items that are able to be removed from the robot owner via crowbar.
emag_modules
A list of modules the robot gets when emagged.
emag_override_modules
A list of modules the robot gets when either emagged or Safety Overridden.
malf_modules
A list of modules that the robot gets when malf AI buys it.
malfhacked
Has the AI hacked the borg module, allowing access to the malf AI exclusive item.
material_storages
A list of all "material stacks", i.e. metal, glass, and reinforced glass
module_actions
Special actions this module will gain when chosen such as meson vision, or thermal vision.
module_type
For icon usage.
modules
A list of all currently usable and created modules the robot currently has access too.
override_modules
A list of modules the robot gets when Safety Overridden.
special_rechargables
A list of modules that require special recharge handling. Examples include things like flashes, sprays and welding tools.
storages
A list of all "energy stacks", i.e cables, brute kits, splints, etc.
subsystems
Available tools given in the verb tab such as a crew monitor, or power monitor.
Proc Details
add_armor
Adds armor to a cyborg. Normaly resets it to 0 across the board, unless the module has an armor defined.
add_languages
Adds all of the languages this module is suppose to know and/or speak.
Arugments:
- R - the owner of this module.
add_module
Adds the item I
to our modules
list, and sets up an /datum/robot_storage/energy
if its a stack.
Arugments:
- I - the item to add to our modules.
- requires_rebuild - if adding this item requires
rebuild_modules()
to be called.
add_subsystems_and_actions
Adds anything in subsystems
to the robot's verbs, and grants any actions that are in module_actions
.
get_or_create_estorage
Returns a robot_energy_strage
datum of type storage_type
. If one already exists, it returns that one, otherwise it create a new one.
Arguments:
- storage_type - the subtype of
datum/robot_storage
to fetch or create.
handle_death
Overriden for specific modules if they have storage items. These should have their contents emptied out onto the floor.
rebuild_modules
Builds the usable module list from the modules we have in basic_modules
, override_modules
, emag_modules
, emag_override_modules
and malf_modules
recharge_consumables
Handles the recharging of all borg stack items and any items which are in the special_rechargables
list.
Arguments:
- R - the owner of this module.
- coeff - a coefficient which can be used to modify the recharge rate of consumables.
remove_item_from_lists
Searches through the various module lists for the given item_type
, deletes and removes the item from all supplied lists, if the item is found.
NOTE: be careful with using this proc, as it irreversibly removes entries from a borg's module list. This is safe to do with upgrades because the only way to revert upgrades currently is either to rebuild the borg or use a reset module, which allows the lists to regenerate.
Arugments:
- item_type - the type of item to search for. Also accepts objects themselves.
remove_subsystems_and_actions
Removes any verbs from the robot that are in subsystems
, and removes any actions that are in module_actions
.
unemag
Called when the robot owner of this module has the unemag()
proc called on them, which is only via admin means.
Deletes this module's emag items, and recreates them.
update_cells
Called when the robot owner of this module has their power cell replaced.
Changes the linked power cell for module items to the newly inserted cell, or to null
.
Arguments:
- unlink_cell - If TRUE, set the item's power cell variable to
null
rather than linking it to a new one.