diff --git a/code/game/objects/items/weapons/implants/neuralbasic.dm b/code/game/objects/items/weapons/implants/neuralbasic.dm new file mode 100644 index 00000000000..a42778f58ea --- /dev/null +++ b/code/game/objects/items/weapons/implants/neuralbasic.dm @@ -0,0 +1,106 @@ +/obj/item/weapon/implant/neural + name = "neural framework implant" + desc = "A small metal casing with numerous wires stemming off of it." + var/obj/item/organ/internal/brain/my_brain = null + var/target_state = null + var/robotic_brain = FALSE + +/obj/item/weapon/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(my_brain && my_brain.can_assist()) + processing_objects.Add(src) + +/obj/item/weapon/implant/neural/Destroy() + if(my_brain) + if(my_brain.owner) + to_chat(my_brain.owner, "You feel a pressure in your mind as something is ripped away.") + processing_objects.Remove(src) + my_brain = null + return ..() + +/obj/item/weapon/implant/neural/process() + if(my_brain && part) + if(my_brain.loc != part.loc) + to_chat(my_brain.owner, "You feel a pressure in your mind as something is ripped away.") + meltdown() + return 1 + +/obj/item/weapon/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/weapon/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, "Something in your [brain_location] burns!") + else + to_chat(L, "Severe fault detected in [brain_location].") + if(2) + if(prob(80)) + my_brain.take_damage(3) + if(!robotic_brain) + to_chat(L, "It feels like something is digging into your [brain_location]!") + else + to_chat(L, "Fault detected in [brain_location].") + if(3) + if(prob(60)) + my_brain.take_damage(2) + if(!robotic_brain) + to_chat(L, "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, "Your [brain_location] aches.") + + spawn(delay) + malfunction-- + +/obj/item/weapon/implant/neural/meltdown() + ..() + processing_objects.Remove(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, "WARNING. Fault dete-ct-- in the \the [src].") + H.Confuse(30) + H.AdjustBlinded(5) + my_brain.take_damage(15) + my_brain = null + return diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index ecf81dcd911..12671d584d8 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -17,6 +17,21 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) attack_verb = list("attacked", "slapped", "whacked") var/clone_source = FALSE var/mob/living/carbon/brain/brainmob = null + var/can_assist = TRUE + +/obj/item/organ/internal/brain/proc/can_assist() + return can_assist + +/obj/item/organ/internal/brain/proc/implant_assist(var/targ_icon_state = null) + name = "[owner.real_name]'s assisted [initial(name)]" + if(targ_icon_state) + icon_state = targ_icon_state + if(dead_icon) + dead_icon = "[targ_icon_state]_dead" + else + icon_state = "[initial(icon_state)]_assisted" + if(dead_icon) + dead_icon = "[initial(dead_icon)]_assisted" /obj/item/organ/internal/brain/robotize() replace_self_with(/obj/item/organ/internal/mmi_holder/posibrain) @@ -115,7 +130,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) target.key = brainmob.key ..() -/obj/item/organ/internal/pariah_brain +/obj/item/organ/internal/brain/pariah_brain name = "brain remnants" desc = "Did someone tread on this? It looks useless for cloning or cyborgification." organ_tag = "brain" @@ -123,18 +138,19 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) icon = 'icons/mob/alien.dmi' icon_state = "chitin" vital = 1 + can_assist = FALSE /obj/item/organ/internal/brain/xeno name = "thinkpan" desc = "It looks kind of like an enormous wad of purple bubblegum." icon = 'icons/mob/alien.dmi' icon_state = "chitin" + can_assist = FALSE /obj/item/organ/internal/brain/slime name = "slime core" desc = "A complex, organic knot of jelly and crystalline particles." - icon = 'icons/mob/slimes.dmi' - icon_state = "green slime extract" + icon_state = "core" parent_organ = BP_TORSO clone_source = TRUE flags = OPENCONTAINER @@ -145,6 +161,11 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) /obj/item/organ/internal/brain/slime/New() ..() create_reagents(50) + var/mob/living/carbon/human/H = null + spawn(15) //Match the core to the Promethean's starting color. + if(ishuman(owner)) + H = owner + color = rgb(min(H.r_skin + 40, 255), min(H.g_skin + 40, 255), min(H.b_skin + 40, 255)) /obj/item/organ/internal/brain/slime/proc/reviveBody() var/datum/dna2/record/R = new /datum/dna2/record() @@ -239,6 +260,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) desc = "A tightly furled roll of paper, covered with indecipherable runes." icon = 'icons/obj/wizard.dmi' icon_state = "scroll" + can_assist = FALSE /obj/item/organ/internal/brain/grey desc = "A piece of juicy meat found in a person's head. This one is strange." diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index c19111ab72d..349ddb3832b 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/polaris.dme b/polaris.dme index f00565f47e0..a322d3f822b 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1005,6 +1005,7 @@ #include "code\game\objects\items\weapons\implants\implantlanguage.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\items\weapons\implants\implantuplink.dm" +#include "code\game\objects\items\weapons\implants\neuralbasic.dm" #include "code\game\objects\items\weapons\material\ashtray.dm" #include "code\game\objects\items\weapons\material\bats.dm" #include "code\game\objects\items\weapons\material\chainsaw.dm"