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