Implants 
Code for implants that can be inserted into a person and have some sort of passive or triggered action.
Vars | |
activated | How the implant is activated. |
---|---|
allow_multiple | Whether multiple implants of this same type can be inserted into someone. |
has_triggered_on_death | Whether this implant has already triggered on death or not, to prevent it firing multiple times. |
imp_in | Who the implant is inside of. |
implant_data | the implant_fluff datum attached to this implant, purely cosmetic "lore" information |
implant_state | Which implant overlay should be used for implant cases. This should point to a state in implants.dmi |
implanted | Whether the implant is currently implanted (BIOCHIP_IMPLANTED ), was implanted previously (BIOCHIP_USED ) or if its new and intact (BIOCHIP_NEW ). |
trigger_causes | What type of action will trigger this emote. Bitfield of IMPLANT_EMOTE_* defines. |
trigger_emotes | List of emote keys that activate this implant when used. |
uses | Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted. |
Procs | |
can_implant | Check that we can actually implant this before implanting it |
implant | Try to implant ourselves into a mob. |
removed | Clean up when an implant is removed. |
set_trigger | Set the emote that will trigger the implant. |
update_button | Updates button name and description. |
Var Details
activated 
How the implant is activated.
allow_multiple 
Whether multiple implants of this same type can be inserted into someone.
has_triggered_on_death 
Whether this implant has already triggered on death or not, to prevent it firing multiple times.
imp_in 
Who the implant is inside of.
implant_data 
the implant_fluff datum attached to this implant, purely cosmetic "lore" information
implant_state 
Which implant overlay should be used for implant cases. This should point to a state in implants.dmi
implanted 
Whether the implant is currently implanted (BIOCHIP_IMPLANTED
), was implanted previously (BIOCHIP_USED
) or if its new and intact (BIOCHIP_NEW
).
trigger_causes 
What type of action will trigger this emote. Bitfield of IMPLANT_EMOTE_* defines.
trigger_emotes 
List of emote keys that activate this implant when used.
uses 
Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted.
Proc Details
can_implant
Check that we can actually implant this before implanting it
- source - The person being implanted
- user - The person doing the implanting
Returns:
TRUE
- I could care less, implant it, maybe don't. I don't care.
FALSE
- Don't implant!
implant
Try to implant ourselves into a mob.
Arguments:
- source - The person the implant is being administered to.
- user - The person who is doing the implanting.
- force - If
TRUE
bypasses all checks in [/obj/item/implant/proc/can_implant()]
Returns TRUE
on success.
removed
Clean up when an implant is removed.
Arguments:
- source - the user who the implant was removed from.
set_trigger
Set the emote that will trigger the implant.
Arguments:
- user - User who is trying to associate the implant to themselves.
- emote_key - Key of the emote that should trigger the implant.
- on_implant - Whether this proc is being called during the implantation of the implant.
- silent - If
TRUE
, the user won't get any to_chat messages if an implantation fails.
update_button
Updates button name and description.