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 bio_chips.dmi |
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 | |
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. |
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 bio_chips.dmi
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
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.
- 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.