/obj/item/implant/neural name = "neural framework implant" desc = "A small metal casing with numerous wires stemming off of it." initialize_loc = BP_HEAD var/obj/item/organ/internal/brain/my_brain = null var/target_state = null var/robotic_brain = FALSE /obj/item/implant/neural/post_implant(var/mob/source) if(ishuman(source)) var/mob/living/carbon/human/H = source if(H.species.has_organ[O_BRAIN]) var/obj/item/organ/internal/brain/possible_brain = H.internal_organs_by_name[O_BRAIN] my_brain = possible_brain //Organs will take damage all the same. if(istype(possible_brain) && my_brain.can_assist()) //If the brain is infact a brain, and not something special like an MMI. my_brain.implant_assist(target_state) if(H.isSynthetic() && H.get_FBP_type() != FBP_CYBORG) //If this on an FBP, it's just an extra inefficient attachment to whatever their brain is. robotic_brain = TRUE if(istype(my_brain) && my_brain.can_assist()) START_PROCESSING(SSobj, src) /obj/item/implant/neural/Destroy() if(my_brain) if(my_brain.owner) to_chat(my_brain.owner, span_critical("You feel a pressure in your mind as something is ripped away.")) STOP_PROCESSING(SSobj, src) my_brain = null return ..() /obj/item/implant/neural/process() if(my_brain && part) if(my_brain.loc != part.loc) to_chat(my_brain.owner, span_critical("You feel a pressure in your mind as something is ripped away.")) meltdown() return 1 /obj/item/implant/neural/get_data() var/dat = {"Implant Specifications:
Name: Neural Framework Implant
Life: Duration of Brain Function
Important Notes: None

Implant Details:
Function: Maintains some function or structure of the target's brain.
Special Features:
Neuro-Safe- Specialized shell absorbs excess voltages self-destructing the chip if a malfunction occurs thereby attempting to secure the safety of subject.
Integrity: Gradient creates slight risk of being overcharged and frying the circuitry. Resulting faults can cause damage to the host's brain.
Implant Specifics:
"} return dat /obj/item/implant/neural/emp_act(severity) if(!my_brain) return if(malfunction) //Don't malfunction while malfunctioning. return malfunction = MALFUNCTION_TEMPORARY var/delay = 10 //Don't let it just get emped twice in a second to kill someone. var/brain_location = my_brain.owner.organs_by_name[my_brain.parent_organ] var/mob/living/L = my_brain.owner switch(severity) if(1) if(prob(10)) meltdown() else if(prob(80)) my_brain.take_damage(5) if(!robotic_brain) to_chat(L, span_critical("Something in your [brain_location] burns!")) else to_chat(L, span_warning("Severe fault detected in [brain_location].")) if(2) if(prob(80)) my_brain.take_damage(3) if(!robotic_brain) to_chat(L, span_danger("It feels like something is digging into your [brain_location]!")) else to_chat(L, span_warning("Fault detected in [brain_location].")) if(3) if(prob(60)) my_brain.take_damage(2) if(!robotic_brain) to_chat(L, span_warning("There is a stabbing pain in your [brain_location]!")) if(4) if(prob(40)) my_brain.take_damage(1) if(!robotic_brain) to_chat(L, span_warning("Your [brain_location] aches.")) spawn(delay) malfunction-- /obj/item/implant/neural/meltdown() ..() STOP_PROCESSING(SSobj, src) var/mob/living/carbon/human/H = null if(my_brain && my_brain.owner) if(ishuman(my_brain.owner)) H = my_brain.owner if(robotic_brain) to_chat(H, span_critical("WARNING. Fault dete-ct-- in the \the [src].")) H.Confuse(30) H.AdjustBlinded(5) my_brain.take_damage(15) my_brain = null return