mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Merge pull request #5527 from Mechoid/Neural_Implant
Adds a Neural implant for future implementation.
This commit is contained in:
@@ -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, "<span class='critical'>You feel a pressure in your mind as something is ripped away.</span>")
|
||||
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, "<span class='critical'>You feel a pressure in your mind as something is ripped away.</span>")
|
||||
meltdown()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/neural/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Neural Framework Implant<BR>
|
||||
<b>Life:</b> Duration of Brain Function<BR>
|
||||
<b>Important Notes:</b> None<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Maintains some function or structure of the target's brain.<BR>
|
||||
<b>Special Features:</b><BR>
|
||||
<i>Neuro-Safe</i>- Specialized shell absorbs excess voltages self-destructing the chip if
|
||||
a malfunction occurs thereby attempting to secure the safety of subject.<BR>
|
||||
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
|
||||
circuitry. Resulting faults can cause damage to the host's brain.<HR>
|
||||
Implant Specifics:<BR>"}
|
||||
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, "<span class='critical'>Something in your [brain_location] burns!</span>")
|
||||
else
|
||||
to_chat(L, "<span class='warning'>Severe fault detected in [brain_location].</span>")
|
||||
if(2)
|
||||
if(prob(80))
|
||||
my_brain.take_damage(3)
|
||||
if(!robotic_brain)
|
||||
to_chat(L, "<span class='danger'>It feels like something is digging into your [brain_location]!</span>")
|
||||
else
|
||||
to_chat(L, "<span class='warning'>Fault detected in [brain_location].</span>")
|
||||
if(3)
|
||||
if(prob(60))
|
||||
my_brain.take_damage(2)
|
||||
if(!robotic_brain)
|
||||
to_chat(L, "<span class='warning'>There is a stabbing pain in your [brain_location]!</span>")
|
||||
if(4)
|
||||
if(prob(40))
|
||||
my_brain.take_damage(1)
|
||||
if(!robotic_brain)
|
||||
to_chat(L, "<span class='warning'>Your [brain_location] aches.</span>")
|
||||
|
||||
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, "<span class='critical'>WARNING. Fault dete-ct-- in the \the [src].</span>")
|
||||
H.Confuse(30)
|
||||
H.AdjustBlinded(5)
|
||||
my_brain.take_damage(15)
|
||||
my_brain = null
|
||||
return
|
||||
@@ -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."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 31 KiB |
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user