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

implant

Parent class for all implants

Vars

allow_multipleif false, upon implantation of a duplicate implant, an attempt to combine the new implant's uses with the old one's uses will be made, deleting the new implant if successful or stopping the implantation if not
hud_icon_statewhat icon state will we represent ourselves with on the hud?
imp_inthe mob that's implanted with this
implant_colorimplant color, used for selecting either the "b" version or the "r" version of the implant case sprite when the implant is in a case.
implant_flagsour implant flags
implant_infoWhat's the most important info that we really, really care about, e.g. name, lifespan-after-death, utility?
implant_loreWhat's the extended lore for this implant that we might not care that much about, e.g. descriptions, flavortext?
useshow many times this can do something, only relevant for implants with limited uses

Procs

get_dataGets the implant's info, for the implant pad.
get_loreGets the implant's lore info, also for the implant pad.
get_management_console_buttonsReturns a list of "structs" that translate into buttons displayed on the implant management console
get_management_console_dataReturns a list of information to show on the implant management console for this implant
handle_management_console_actionHandles a button click on the implant management console
implantWhat does the implant do upon injection?
is_shown_on_consoleDetermines if the implant is visible on the implant management console. Note that this would only ever be called on implants currently inserted into a mob.
removedRemove implant from mob.

Var Details

allow_multiple

if false, upon implantation of a duplicate implant, an attempt to combine the new implant's uses with the old one's uses will be made, deleting the new implant if successful or stopping the implantation if not

hud_icon_state

what icon state will we represent ourselves with on the hud?

imp_in

the mob that's implanted with this

implant_color

implant color, used for selecting either the "b" version or the "r" version of the implant case sprite when the implant is in a case.

implant_flags

our implant flags

implant_info

What's the most important info that we really, really care about, e.g. name, lifespan-after-death, utility?

implant_lore

What's the extended lore for this implant that we might not care that much about, e.g. descriptions, flavortext?

uses

how many times this can do something, only relevant for implants with limited uses

Proc Details

get_data

Gets the implant's info, for the implant pad.

get_lore

Gets the implant's lore info, also for the implant pad.

get_management_console_buttons

Returns a list of "structs" that translate into buttons displayed on the implant management console

The struct should have the following keys:

get_management_console_data

Returns a list of information to show on the implant management console for this implant

Unlike normal UI data, the keys of the list are shown on the UI itself, so they should be human readable.

handle_management_console_action

Handles a button click on the implant management console

implant

What does the implant do upon injection?

return true if the implant injects return false if there is no room for implant / it fails Arguments:

is_shown_on_console

Determines if the implant is visible on the implant management console. Note that this would only ever be called on implants currently inserted into a mob.

removed

Remove implant from mob.

This removes the effects of the implant and moves it out of the mob and into nullspace. Arguments: