/obj/item/implant/chem name = "chem implant" desc = "Injects things." icon_state = "reagents" activated = FALSE var/obj/item/imp_chemholder/chemholder /obj/item/implant/chem/get_data() var/dat = {"Implant Specifications:
Name: Robust Corp MJ-420 Prisoner Management Implant
Life: Deactivates upon death but remains within the body.
Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject
will suffer from an increased appetite.


Implant Details:
Function: Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal
the implant releases the chemicals directly into the blood stream.
Special Features: Micro-Capsule- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.
Can only be loaded while still in its original case.
Integrity: Implant will last so long as the subject is alive."} return dat /obj/item/implant/chem/Initialize() . = ..() create_reagents(50, OPENCONTAINER) GLOB.tracked_chem_implants += src /obj/item/implant/chem/Destroy() GLOB.tracked_chem_implants -= src return ..() /obj/item/implant/chem/implant(mob/living/target, mob/user, silent = FALSE) . = ..() if(!.) return if(chemholder) chemholder.forceMove(target) return chemholder = new(imp_in, src) reagents.trans_to(chemholder, reagents.total_volume) /obj/item/implant/chem/removed(mob/target, silent = FALSE, special = 0) . = ..() if(!.) return if(!special) chemholder.reagents.trans_to(src, chemholder.reagents.total_volume) QDEL_NULL(chemholder) else chemholder?.moveToNullspace() /obj/item/implant/chem/trigger(emote, mob/living/source) if(emote == "deathgasp") if(istype(source) && !(source.stat == DEAD)) return activate(reagents.total_volume) /obj/item/implant/chem/activate(cause) . = ..() if(!cause || !imp_in) return 0 var/mob/living/carbon/R = imp_in var/injectamount = null if (cause == "action_button") injectamount = reagents.total_volume else injectamount = cause chemholder.reagents.trans_to(R, injectamount) to_chat(R, "You hear a faint beep.") if(!chemholder.reagents.total_volume) to_chat(R, "You hear a faint click from your chest.") qdel(src) /obj/item/implantcase/chem name = "implant case - 'Remote Chemical'" desc = "A glass case containing a remote chemical implant." imp_type = /obj/item/implant/chem /obj/item/implantcase/chem/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/reagent_containers/syringe) && imp) W.afterattack(imp, user, TRUE, params) return TRUE else return ..() /obj/item/imp_chemholder var/obj/item/implant/chem/implant /obj/item/imp_chemholder/Initialize(mapload, obj/item/implant/chem/_implant) . = ..() create_reagents(50) implant = _implant /obj/item/imp_chemholder/Destroy() if(implant?.imp_in) qdel(implant) else return ..()