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. |
implanted | Whether the implant is implanted. Null if it's never been inserted, TRUE if it's currently inside someone, or FALSE if it's been removed. |
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 | |
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. |
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.
implanted

Whether the implant is implanted. Null if it's never been inserted, TRUE if it's currently inside someone, or FALSE if it's been removed.
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
implant
Try to implant ourselves into a mob.
- source - The person the implant is being administered to.
- user - The person who is doing the implanting.
Returns 1 if the implant injects successfully -1 if the implant fails to inject 0 if there's no room for the implant.
removed
Clean up when an implant is removed.
- source - the user who the implant was removed from.
set_trigger
Set the emote that will trigger the implant.
- 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.