implant
Parent class for all implants
Vars | |
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 |
uses | how many times this can do something, only relevant for implants with limited uses |
Procs | |
get_data | Gets implant specifications for the implant pad |
get_management_console_buttons | Returns a list of "structs" that translate into buttons displayed on the implant management console |
get_management_console_data | Returns a list of information to show on the implant management console for this implant |
handle_management_console_action | Handles a button click on the implant management console |
implant | What does the implant do upon injection? |
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. |
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
uses
how many times this can do something, only relevant for implants with limited uses
Proc Details
get_data
Gets implant specifications 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:
- name - the name of the button, optional if button_icon is set
- icon - the icon of the button, optional if button_name is set
- color - the color of the button, optional
- tooltip - the tooltip of the button, optional
- action_key - the key that will be passed to handle_management_console_action when the button is clicked
- action_params - optional, additional params passed when the button is clicked
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
- user - the mob clicking the button
- params - the params passed to the button, as if this were a ui_act handler. See params["implant_action"] for the action key passed to the button (which should correspond to a button returned by get_management_console_buttons)
- console - the console the button was clicked on
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:
- mob/living/target - mob being implanted
- mob/user - mob doing the implanting
- silent - unused here
- force - if true, implantation will not fail if can_be_implanted_in returns false
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:
- mob/living/source - What the implant is being removed from
- silent - unused here
- special - Set to true if removed by admin panel, should bypass any side effects