IPC Organs - Initial Commit

The basics are all here, but there are complications with making surgery code function with them properly. To be tested and troubeshot, and patched.
This commit is contained in:
skull132
2015-10-13 13:36:02 +03:00
parent 2cf2eb2014
commit cf810e7c9d
9 changed files with 271 additions and 56 deletions
+116 -1
View File
@@ -224,4 +224,119 @@
robotic = 2
/obj/item/organ/stack/vox
name = "vox cortical stack"
name = "vox cortical stack"
//IPC/SHELL ORGANS.
//TODO: Make the robot_components required for these
//TODO: Make said components printable
//TODO: sprites
/datum/organ/internal/machine
removed_type = /obj/item/organ/machine
/datum/organ/internal/machine/process()
return
/datum/organ/internal/machine/radiator
name = "internal cooling unit"
parent_organ = "chest"
robotic = 2
min_bruised_damage = 15
min_broken_damage = 40
removed_type = /obj/item/organ/machine/radiator
/obj/item/organ/machine/radiator
name = "internal cooling unit"
icon_state = "radiator"
organ_tag = "radiator"
organ_type = /datum/organ/internal/machine/radiator
robotic = 2
/obj/item/organ/machine/radiator/exposed_to_the_world()
var/obj/item/robot_parts/robot_component/radiator/Radiator = new(src.loc)
if(organ_data.damage)
Radiator.brute = organ_data.damage
del(src)
return Radiator
/datum/organ/internal/machine/bladder
name = "chemical containment"
parent_organ = "groin"
robotic = 2
removed_type = /obj/item/organ/machine/bladder
/datum/organ/internal/machine/bladder/process()
if(is_bruised())
var/leakSmall = rand(1,25)
if(owner.reagents.total_volume > 0)
owner.reagents.remove_any(leakSmall)
if(owner.reagents.maximum_volume > 500)
owner.reagents.maximum_volume -= leakSmall
if(is_broken())
var/leakLarge = rand(25,50)
if(owner.reagents.total_volume > 0)
owner.reagents.remove_any(leakLarge)
if(owner.reagents.maximum_volume > 0)
if(owner.reagents.maximum_volume < leakLarge)
owner.reagents.maximum_volume = 0
else
owner.reagents.maximum_volume -= leakLarge
if(!is_bruised() && !is_broken() && owner.reagents.maximum_volume < 1000)
owner.reagents.maximum_volume = 1000
if(owner.reagents.reagent_list.len)
if(owner.reagents.has_reagent("sacid") || owner.reagents.has_reagent("pacid"))
take_damage(rand(0,2.5), 1)
/obj/item/organ/machine/bladder
name = "chemical containment"
icon_state = "bladder"
organ_tag = "chemical containment"
organ_type = /datum/organ/internal/machine/bladder
robotic = 2
/obj/item/organ/machine/bladder/replaced(var/mob/living/carbon/human/target)
if(istype(target) && (target.species.flags & IS_SYNTHETIC))
if(target.reagents.maximum_volume < 1000)
target.reagents.maximum_volume = 1000
..()
/obj/item/organ/machine/bladder/removed(var/mob/living/target, var/mob/living/user)
..()
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/Machine = target
if(Machine.species.flags & IS_SYNTHETIC)
Machine.reagents.clear_reagents()
Machine.reagents.maximum_volume = 0
/obj/item/organ/machine/bladder/exposed_to_the_world()
msg_scopes("We went here x2.")
var/obj/item/robot_parts/robot_component/bladder/Bladder = new(src.loc)
if(organ_data.damage)
Bladder.brute = organ_data.damage
del(src)
return Bladder
/datum/organ/internal/machine/diagnosis_unit
name = "diagnosis unit"
parent_organ = "head"
robotic = 2
removed_type = /obj/item/organ/machine/diagnosis_unit
/obj/item/organ/machine/diagnosis_unit
name = "diagnosis unit"
icon_state = "diagnosis_unit"
organ_tag = "diagnosis unit"
organ_type = /datum/organ/internal/machine/diagnosis_unit
robotic = 2
/obj/item/organ/machine/diagnosis_unit/exposed_to_the_world()
msg_scopes("We went here.")
var/obj/item/robot_parts/robot_component/diagnosis_unit/Diagnosis_unit = new(src.loc)
if(organ_data.damage)
Diagnosis_unit.brute = organ_data.damage
del(src)
return Diagnosis_unit
+12 -7
View File
@@ -249,12 +249,12 @@
parent_organ = "head"
removed_type = /obj/item/organ/brain
vital = 1
/datum/organ/internal/brain/robot // brains for shells
var/machine_brain_type=null
var/machine_brain_type=null
/datum/organ/internal/brain/robot/proc/create_robot_brain_replacement(var/target,var/new_location)
var/obj/item/device/mmi/new_mmi
if (machine_brain_type=="Posibrain")
@@ -267,7 +267,7 @@
new_mmi.transfer_identity(target)
new_mmi.loc = new_location
return new_mmi
/datum/organ/internal/brain/xeno
removed_type = /obj/item/organ/brain/xeno
@@ -284,6 +284,11 @@
if(is_broken())
owner.eye_blind = 20
/datum/organ/internal/eyes/robot // eyes for shells
name = "charge-coupled device"
parent_organ = "head"
removed_type = /obj/item/organ/eyes/robot
/datum/organ/internal/appendix
name = "appendix"
parent_organ = "groin"
@@ -306,4 +311,4 @@
removed_organ.update()
organ_holder = removed_organ
return removed_organ
return removed_organ
+18 -5
View File
@@ -150,6 +150,19 @@
/obj/item/organ/eyes/prosthetic
robotic = 2
/obj/item/organ/eyes/robot
name = "charge-coupled device"
icon_state = ""
organ_type = /datum/organ/internal/eyes/robot
robotic = 2
exposed_to_the_world()
var/obj/item/robot_parts/robot_component/camera/Camera = new()
if(organ_data.damage)
Camera.brute = organ_data.damage
del(src)
return Camera
/obj/item/organ/liver/prosthetic
robotic = 2
@@ -180,11 +193,11 @@
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
target.death()
/obj/item/organ/proc/exposed_to_the_world() // this is only useful for organs that change when actually removed from the body
return
return
/obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user)
..()
@@ -277,4 +290,4 @@
if(fingerprintslast) O.fingerprintslast = fingerprintslast
user.put_in_active_hand(O)
del(src)
del(src)