mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
Organ rewrite mapclean attempt.
This commit is contained in:
@@ -30,8 +30,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
/mob/living/carbon/human/proc/fixblood()
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
B.data = list( "donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type, \
|
||||
B.data = list( "donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_colour"= species.blood_color,"blood_type"=dna.b_type, \
|
||||
"resistances"=null,"trace_chem"=null, "virus2" = null, "antibodies" = null)
|
||||
B.color = B.data["blood_color"]
|
||||
|
||||
// Takes care blood loss and regeneration
|
||||
/mob/living/carbon/human/proc/handle_blood()
|
||||
@@ -63,14 +64,17 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
// Damaged heart virtually reduces the blood volume, as the blood isn't
|
||||
// being pumped properly anymore.
|
||||
var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
if(species && species.has_organ["heart"])
|
||||
var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
|
||||
blood_volume *= 0.6
|
||||
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
|
||||
blood_volume *= 0.3
|
||||
if(!heart)
|
||||
blood_volume = 0
|
||||
else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
|
||||
blood_volume *= 0.6
|
||||
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
|
||||
blood_volume *= 0.3
|
||||
|
||||
//Effects of bloodloss
|
||||
switch(blood_volume)
|
||||
@@ -141,31 +145,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if(!amt)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
|
||||
var/list/iconL = list("1","2","3","4","5")
|
||||
|
||||
vessel.remove_reagent("blood",amt)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
|
||||
nums += G
|
||||
iconL.Remove(G.icon_state)
|
||||
|
||||
if (nums.len < 5)
|
||||
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
|
||||
this.icon_state = pick(iconL)
|
||||
this.blood_DNA = list()
|
||||
this.blood_DNA[dna.unique_enzymes] = dna.b_type
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
this.virus2[ID] = V.getcopy()
|
||||
if (species) this.basecolor = species.blood_color
|
||||
this.update_icon()
|
||||
|
||||
else
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/G in nums)
|
||||
del G
|
||||
T.add_blood(src)
|
||||
blood_splatter(src,src)
|
||||
|
||||
/****************************************************
|
||||
BLOOD TRANSFERS
|
||||
@@ -193,6 +174,12 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
B.data["resistances"] = src.resistances.Copy()
|
||||
B.data["blood_type"] = copytext(src.dna.b_type,1,0)
|
||||
|
||||
// Putting this here due to return shenanigans.
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
B.data["blood_colour"] = H.species.blood_color
|
||||
B.color = B.data["blood_colour"]
|
||||
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
temp_chem += R.id
|
||||
@@ -279,4 +266,71 @@ proc/blood_incompatible(donor,receiver)
|
||||
if("O")
|
||||
if(donor_antigen != "O") return 1
|
||||
//AB is a universal receiver.
|
||||
return 0
|
||||
return 0
|
||||
|
||||
proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/B
|
||||
var/decal_type = /obj/effect/decal/cleanable/blood/splatter
|
||||
var/turf/T = get_turf(target)
|
||||
|
||||
if(istype(source,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = source
|
||||
source = M.get_blood(M.vessel)
|
||||
else if(istype(source,/mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/donor = source
|
||||
if(donor.dna)
|
||||
source = new()
|
||||
source.data["blood_DNA"] = donor.dna.unique_enzymes
|
||||
source.data["blood_type"] = donor.dna.b_type
|
||||
|
||||
// Are we dripping or splattering?
|
||||
if(!large)
|
||||
|
||||
// Only a certain number of drips can be on a given turf.
|
||||
var/list/drips = list()
|
||||
var/list/drip_icons = list("1","2","3","4","5")
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
|
||||
drips += drop
|
||||
drip_icons.Remove(drop.icon_state)
|
||||
|
||||
// If we have too many drips, remove them and spawn a proper blood splatter.
|
||||
if(drips.len >= 5)
|
||||
//TODO: copy all virus data from drips to new splatter?
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/drop in drips)
|
||||
del drop
|
||||
else
|
||||
decal_type = /obj/effect/decal/cleanable/blood/drip
|
||||
|
||||
// Find a blood decal or create a new one.
|
||||
B = locate(decal_type) in T
|
||||
if(!B)
|
||||
B = new decal_type(T)
|
||||
|
||||
// If there's no data to copy, call it quits here.
|
||||
if(!source)
|
||||
return B
|
||||
|
||||
// Update appearance.
|
||||
if(source.data["blood_colour"])
|
||||
B.basecolor = source.data["blood_colour"]
|
||||
B.update_icon()
|
||||
|
||||
// Update blood information.
|
||||
if(source.data["blood_DNA"])
|
||||
B.blood_DNA = list()
|
||||
if(source.data["blood_type"])
|
||||
B.blood_DNA[source.data["blood_DNA"]] = source.data["blood_type"]
|
||||
else
|
||||
B.blood_DNA[source.data["blood_DNA"]] = "O+"
|
||||
|
||||
// Update virus information. //Looks like this is out of date.
|
||||
//for(var/datum/disease/D in source.data["viruses"])
|
||||
// var/datum/disease/new_virus = D.Copy(1)
|
||||
// source.viruses += new_virus
|
||||
// new_virus.holder = B
|
||||
if(source.data["virus2"])
|
||||
B.virus2 = virus_copylist(source.data["virus2"])
|
||||
|
||||
return B
|
||||
@@ -1,6 +1,8 @@
|
||||
/datum/organ
|
||||
var/name = "organ"
|
||||
var/mob/living/carbon/human/owner = null
|
||||
var/status = 0
|
||||
var/vital //Lose a vital limb, die immediately.
|
||||
|
||||
var/list/datum/autopsy_data/autopsy_data = list()
|
||||
var/list/trace_chemicals = list() // traces of chemicals in the organ,
|
||||
@@ -56,6 +58,7 @@
|
||||
|
||||
// Takes care of organ related updates, such as broken and missing limbs
|
||||
/mob/living/carbon/human/proc/handle_organs()
|
||||
|
||||
number_wounds = 0
|
||||
var/leg_tally = 2
|
||||
var/force_process = 0
|
||||
@@ -72,6 +75,19 @@
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
I.process()
|
||||
|
||||
// Also handles some internal organ processing when the organs are missing completely.
|
||||
// Only handles missing liver and kidneys for now.
|
||||
// This is a bit harsh, but really if you're missing an entire bodily organ you're in deep shit.
|
||||
if(species.has_organ["liver"])
|
||||
var/datum/organ/internal/liver = internal_organs_by_name["liver"]
|
||||
if(!liver || liver.status & ORGAN_CUT_AWAY)
|
||||
reagents.add_reagent("toxin", rand(1,3))
|
||||
|
||||
if(species.has_organ["kidneys"])
|
||||
var/datum/organ/internal/kidney = internal_organs_by_name["kidneys"]
|
||||
if(!kidney || kidney.status & ORGAN_CUT_AWAY)
|
||||
reagents.add_reagent("toxin", rand(1,3))
|
||||
|
||||
if(!force_process && !bad_external_organs.len)
|
||||
return
|
||||
|
||||
|
||||
@@ -32,12 +32,11 @@
|
||||
var/damage_msg = "\red You feel an intense pain"
|
||||
var/broken_description
|
||||
|
||||
var/vital //Lose a vital limb, die immediately.
|
||||
var/status = 0
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
var/encased // Needs to be opened with a saw to access the organs.
|
||||
|
||||
var/obj/item/hidden = null
|
||||
var/list/implants = list()
|
||||
@@ -855,6 +854,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
min_broken_damage = 40
|
||||
body_part = UPPER_TORSO
|
||||
vital = 1
|
||||
encased = "ribcage"
|
||||
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
@@ -958,6 +958,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
body_part = HEAD
|
||||
var/disfigured = 0
|
||||
vital = 1
|
||||
encased = "skull"
|
||||
|
||||
/datum/organ/external/head/get_icon(var/icon/race_icon, var/icon/deform_icon)
|
||||
if (!owner)
|
||||
@@ -1062,6 +1063,7 @@ obj/item/weapon/organ/r_hand
|
||||
obj/item/weapon/organ/r_leg
|
||||
name = "right leg"
|
||||
icon_state = "r_leg"
|
||||
|
||||
obj/item/weapon/organ/head
|
||||
name = "head"
|
||||
icon_state = "head_m"
|
||||
@@ -1158,11 +1160,12 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user] ([user.ckey]) debrained [brainmob] ([brainmob.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
//TODO: ORGAN REMOVAL UPDATE.
|
||||
if(istype(src,/obj/item/weapon/organ/head/posi))
|
||||
var/obj/item/device/mmi/posibrain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
else
|
||||
var/obj/item/brain/B = new(loc)
|
||||
var/obj/item/organ/brain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
|
||||
brain_op_stage = 4.0
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
var/min_broken_damage = 30
|
||||
var/parent_organ = "chest"
|
||||
var/robotic = 0 //For being a robot
|
||||
var/removed_type //When removed, forms this object.
|
||||
var/list/transplant_data // Blood DNA and colour of donor
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
|
||||
/datum/organ/internal/proc/rejuvenate()
|
||||
damage=0
|
||||
@@ -20,20 +23,19 @@
|
||||
/datum/organ/internal/proc/is_broken()
|
||||
return damage >= min_broken_damage
|
||||
|
||||
|
||||
|
||||
/datum/organ/internal/New(mob/living/carbon/human/H)
|
||||
..()
|
||||
var/datum/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs |= src
|
||||
H.internal_organs |= src
|
||||
src.owner = H
|
||||
if(H)
|
||||
var/datum/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs |= src
|
||||
H.internal_organs |= src
|
||||
src.owner = H
|
||||
|
||||
/datum/organ/internal/process()
|
||||
//Process infections
|
||||
|
||||
//Process infections
|
||||
if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
germ_level = 0
|
||||
return
|
||||
@@ -44,10 +46,10 @@
|
||||
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
|
||||
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
germ_level--
|
||||
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
//aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
if(antibiotics < 5 && prob(round(germ_level/6)))
|
||||
@@ -58,10 +60,33 @@
|
||||
//spread germs
|
||||
if (antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
parent.germ_level++
|
||||
|
||||
|
||||
if (prob(3)) //about once every 30 seconds
|
||||
take_damage(1,silent=prob(30))
|
||||
|
||||
// Process unsuitable transplants. TODO: consider some kind of
|
||||
// immunosuppressant that changes transplant data to make it match.
|
||||
if(transplant_data)
|
||||
if(!rejecting) //Should this transplant reject?
|
||||
if(owner.species != transplant_data["species"]) //Nope.
|
||||
rejecting = 1
|
||||
else if(prob(20) && owner.dna && blood_incompatible(transplant_data["blood_type"],owner.dna.b_type))
|
||||
rejecting = 1
|
||||
else
|
||||
rejecting++ //Rejection severity increases over time.
|
||||
if(rejecting % 10 == 0) //Only fire every ten rejection ticks.
|
||||
switch(rejecting)
|
||||
if(1 to 50)
|
||||
take_damage(rand(1,2))
|
||||
if(51 to 200)
|
||||
take_damage(rand(2,3))
|
||||
if(201 to 500)
|
||||
take_damage(rand(3,4))
|
||||
owner.reagents.add_reagent("toxin", 1)
|
||||
if(501 to INFINITY)
|
||||
take_damage(5)
|
||||
owner.reagents.add_reagent("toxin", rand(3,5))
|
||||
|
||||
/datum/organ/internal/proc/take_damage(amount, var/silent=0)
|
||||
if(src.robotic == 2)
|
||||
src.damage += (amount * 0.8)
|
||||
@@ -111,21 +136,22 @@
|
||||
INTERNAL ORGANS DEFINES
|
||||
****************************************************/
|
||||
|
||||
/datum/organ/internal/heart
|
||||
/datum/organ/internal/heart // This is not set to vital because death immediately occurs in blood.dm if it is removed.
|
||||
name = "heart"
|
||||
parent_organ = "chest"
|
||||
|
||||
removed_type = /obj/item/organ/heart
|
||||
|
||||
/datum/organ/internal/lungs
|
||||
name = "lungs"
|
||||
parent_organ = "chest"
|
||||
removed_type = /obj/item/organ/lungs
|
||||
|
||||
process()
|
||||
..()
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(5))
|
||||
owner.emote("cough") //respitory tract infection
|
||||
|
||||
|
||||
if(is_bruised())
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
@@ -138,6 +164,7 @@
|
||||
name = "liver"
|
||||
parent_organ = "chest"
|
||||
var/process_accuracy = 10
|
||||
removed_type = /obj/item/organ/liver
|
||||
|
||||
process()
|
||||
..()
|
||||
@@ -147,7 +174,7 @@
|
||||
if (germ_level > INFECTION_LEVEL_TWO)
|
||||
if(prob(1))
|
||||
spawn owner.vomit()
|
||||
|
||||
|
||||
if(owner.life_tick % process_accuracy == 0)
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
@@ -178,16 +205,20 @@
|
||||
owner.adjustToxLoss(0.3 * process_accuracy)
|
||||
|
||||
/datum/organ/internal/kidney
|
||||
name = "kidney"
|
||||
parent_organ = "chest"
|
||||
name = "kidneys"
|
||||
parent_organ = "groin"
|
||||
removed_type = /obj/item/organ/kidneys
|
||||
|
||||
/datum/organ/internal/brain
|
||||
name = "brain"
|
||||
parent_organ = "head"
|
||||
removed_type = /obj/item/organ/brain
|
||||
vital = 1
|
||||
|
||||
/datum/organ/internal/eyes
|
||||
name = "eyes"
|
||||
parent_organ = "head"
|
||||
removed_type = /obj/item/organ/eyes
|
||||
|
||||
process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
@@ -195,3 +226,20 @@
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
|
||||
/datum/organ/internal/appendix
|
||||
name = "appendix"
|
||||
parent_organ = "groin"
|
||||
removed_type = /obj/item/organ/appendix
|
||||
|
||||
/datum/organ/internal/proc/remove(var/mob/user)
|
||||
|
||||
if(!removed_type) return 0
|
||||
|
||||
var/obj/item/organ/removed_organ = new removed_type(get_turf(user))
|
||||
|
||||
if(istype(removed_organ))
|
||||
removed_organ.organ_data = src
|
||||
removed_organ.update()
|
||||
|
||||
return removed_organ
|
||||
@@ -0,0 +1,232 @@
|
||||
/obj/item/organ
|
||||
name = "organ"
|
||||
desc = "It looks like it probably just plopped out."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "appendix"
|
||||
|
||||
health = 100 // Process() ticks before death.
|
||||
|
||||
var/fresh = 3 // Squirts of blood left in it.
|
||||
var/dead_icon // Icon used when the organ dies.
|
||||
var/robotic // Is the limb prosthetic?
|
||||
var/organ_tag // What slot does it go in?
|
||||
var/organ_type = /datum/organ/internal // Used to spawn the relevant organ data when produced via a machine or spawn().
|
||||
var/datum/organ/internal/organ_data // Stores info when removed.
|
||||
var/prosthetic_name = "prosthetic organ" // Flavour string for robotic organ.
|
||||
var/prosthetic_icon // Icon for robotic organ.
|
||||
|
||||
/obj/item/organ/attack_self(mob/user as mob)
|
||||
|
||||
// Convert it to an edible form, yum yum.
|
||||
if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth")
|
||||
bitten(user)
|
||||
return
|
||||
|
||||
/obj/item/organ/New()
|
||||
..()
|
||||
create_reagents(5)
|
||||
if(!robotic)
|
||||
processing_objects += src
|
||||
spawn(1)
|
||||
update()
|
||||
|
||||
/obj/item/organ/Del()
|
||||
if(!robotic) processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/organ/process()
|
||||
|
||||
if(robotic)
|
||||
processing_objects -= src
|
||||
return
|
||||
|
||||
// Don't process if we're in a freezer, an MMI or a stasis bag. //TODO: ambient temperature?
|
||||
if(istype(loc,/obj/item/device/mmi) || istype(loc,/obj/item/bodybag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer))
|
||||
return
|
||||
|
||||
if(fresh && prob(40))
|
||||
fresh--
|
||||
var/datum/reagent/blood = reagents.reagent_list["blood"]
|
||||
blood_splatter(src,blood,1)
|
||||
|
||||
health -= rand(1,3)
|
||||
if(health <= 0)
|
||||
die()
|
||||
|
||||
/obj/item/organ/proc/die()
|
||||
name = "dead [initial(name)]"
|
||||
if(dead_icon) icon_state = dead_icon
|
||||
health = 0
|
||||
processing_objects -= src
|
||||
//TODO: Grey out the icon state.
|
||||
//TODO: Inject an organ with peridaxon to make it alive again.
|
||||
|
||||
/obj/item/organ/proc/roboticize()
|
||||
|
||||
robotic = (organ_data && organ_data.robotic) ? organ_data.robotic : 1
|
||||
|
||||
if(prosthetic_name)
|
||||
name = prosthetic_name
|
||||
|
||||
if(prosthetic_icon)
|
||||
icon_state = prosthetic_icon
|
||||
else
|
||||
//TODO: convert to greyscale.
|
||||
|
||||
/obj/item/organ/proc/update()
|
||||
|
||||
if(!organ_data)
|
||||
organ_data = new /datum/organ/internal()
|
||||
|
||||
if(robotic)
|
||||
organ_data.robotic = robotic
|
||||
|
||||
if(organ_data.robotic >= 2)
|
||||
roboticize()
|
||||
|
||||
// Brain is defined in brain_item.dm.
|
||||
/obj/item/organ/heart
|
||||
name = "heart"
|
||||
icon_state = "heart-on"
|
||||
prosthetic_name = "circulatory pump"
|
||||
prosthetic_icon = "heart-prosthetic"
|
||||
organ_tag = "heart"
|
||||
fresh = 6 // Juicy.
|
||||
dead_icon = "heart-off"
|
||||
|
||||
/obj/item/organ/lungs
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
prosthetic_name = "gas exchange system"
|
||||
prosthetic_icon = "lungs-prosthetic"
|
||||
organ_tag = "lungs"
|
||||
|
||||
/obj/item/organ/kidneys
|
||||
name = "kidneys"
|
||||
icon_state = "kidneys"
|
||||
prosthetic_name = "prosthetic kidneys"
|
||||
prosthetic_icon = "kidneys-prosthetic"
|
||||
organ_tag = "kidneys"
|
||||
|
||||
/obj/item/organ/eyes
|
||||
name = "eyeballs"
|
||||
icon_state = "eyes"
|
||||
prosthetic_name = "visual prosthesis"
|
||||
prosthetic_icon = "eyes-prosthetic"
|
||||
organ_tag = "eyes"
|
||||
|
||||
var/eye_colour
|
||||
|
||||
/obj/item/organ/liver
|
||||
name = "liver"
|
||||
icon_state = "liver"
|
||||
prosthetic_name = "toxin filter"
|
||||
prosthetic_icon = "liver-prosthetic"
|
||||
organ_tag = "liver"
|
||||
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
organ_tag = "appendix"
|
||||
|
||||
//These are here so they can be printed out via the fabricator.
|
||||
/obj/item/organ/heart/prosthetic
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/lungs/prosthetic
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/kidneys/prosthetic
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/eyes/prosthetic
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/liver/prosthetic
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
|
||||
/obj/item/organ/proc/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
if(!target || !user)
|
||||
return
|
||||
|
||||
if(organ_data.vital)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
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/appendix/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
..()
|
||||
|
||||
var/inflamed = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
|
||||
inflamed = 1
|
||||
appendicitis.cure()
|
||||
target.resistances += appendicitis
|
||||
|
||||
if(inflamed)
|
||||
icon_state = "appendixinflamed"
|
||||
name = "inflamed appendix"
|
||||
|
||||
/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
if(!eye_colour)
|
||||
eye_colour = list(0,0,0)
|
||||
|
||||
..() //Make sure target is set so we can steal their eye colour for later.
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H))
|
||||
eye_colour = list(
|
||||
H.r_eyes ? H.r_eyes : 0,
|
||||
H.g_eyes ? H.g_eyes : 0,
|
||||
H.b_eyes ? H.b_eyes : 0
|
||||
)
|
||||
|
||||
// Leave bloody red pits behind!
|
||||
H.r_eyes = 128
|
||||
H.g_eyes = 0
|
||||
H.b_eyes = 0
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/proc/replaced(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/item/organ/eyes/replaced(var/mob/living/target)
|
||||
|
||||
// Apply our eye colour to the target.
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H) && eye_colour)
|
||||
H.r_eyes = eye_colour[1]
|
||||
H.g_eyes = eye_colour[2]
|
||||
H.b_eyes = eye_colour[3]
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/proc/bitten(mob/user)
|
||||
|
||||
if(robotic)
|
||||
return
|
||||
|
||||
user << "\blue You take an experimental bite out of \the [src]."
|
||||
var/datum/reagent/blood = reagents.reagent_list["blood"]
|
||||
blood_splatter(src,blood,1)
|
||||
|
||||
|
||||
user.drop_from_inventory(src)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
|
||||
O.name = name
|
||||
O.icon_state = dead_icon ? dead_icon : icon_state
|
||||
|
||||
// Pass over the blood.
|
||||
reagents.trans_to(O, reagents.total_volume)
|
||||
|
||||
if(fingerprints) O.fingerprints = fingerprints.Copy()
|
||||
if(fingerprintshidden) O.fingerprintshidden = fingerprintshidden.Copy()
|
||||
if(fingerprintslast) O.fingerprintslast = fingerprintslast
|
||||
|
||||
user.put_in_active_hand(O)
|
||||
del(src)
|
||||
Reference in New Issue
Block a user