Bay Update 02

This commit is contained in:
skull132
2014-06-04 18:20:49 +03:00
parent f535169798
commit f95ab265c1
436 changed files with 30324 additions and 10747 deletions
+9 -34
View File
@@ -37,34 +37,6 @@
/mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs
/mob/living/carbon/human/var/list/internal_organs_by_name = list() // so internal organs have less ickiness too
//Creates and initializes and connects external and internal organs
/mob/living/carbon/human/proc/make_organs()
organs = list()
organs_by_name["chest"] = new/datum/organ/external/chest()
organs_by_name["groin"] = new/datum/organ/external/groin(organs_by_name["chest"])
organs_by_name["head"] = new/datum/organ/external/head(organs_by_name["chest"])
organs_by_name["l_arm"] = new/datum/organ/external/l_arm(organs_by_name["chest"])
organs_by_name["r_arm"] = new/datum/organ/external/r_arm(organs_by_name["chest"])
organs_by_name["r_leg"] = new/datum/organ/external/r_leg(organs_by_name["groin"])
organs_by_name["l_leg"] = new/datum/organ/external/l_leg(organs_by_name["groin"])
organs_by_name["l_hand"] = new/datum/organ/external/l_hand(organs_by_name["l_arm"])
organs_by_name["r_hand"] = new/datum/organ/external/r_hand(organs_by_name["r_arm"])
organs_by_name["l_foot"] = new/datum/organ/external/l_foot(organs_by_name["l_leg"])
organs_by_name["r_foot"] = new/datum/organ/external/r_foot(organs_by_name["r_leg"])
internal_organs_by_name["heart"] = new/datum/organ/internal/heart(src)
internal_organs_by_name["lungs"] = new/datum/organ/internal/lungs(src)
internal_organs_by_name["liver"] = new/datum/organ/internal/liver(src)
internal_organs_by_name["kidney"] = new/datum/organ/internal/kidney(src)
internal_organs_by_name["brain"] = new/datum/organ/internal/brain(src)
internal_organs_by_name["eyes"] = new/datum/organ/internal/eyes(src)
for(var/name in organs_by_name)
organs += organs_by_name[name]
for(var/datum/organ/external/O in organs)
O.owner = src
// Takes care of organ related updates, such as broken and missing limbs
/mob/living/carbon/human/proc/handle_organs()
number_wounds = 0
@@ -90,7 +62,6 @@
else
E.process()
number_wounds += E.number_wounds
//Robotic limb malfunctions
var/malfunction = 0
if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
@@ -109,20 +80,24 @@
I.take_damage(rand(3,5))
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
if(E.name in list("l_hand","l_arm","r_hand","r_arm"))
var/obj/item/c_hand //Getting what's in this hand
var/hand
if(E.name == "l_hand" || E.name == "l_arm")
c_hand = l_hand
hand = "left hand"
if(E.name == "r_hand" || E.name == "r_arm")
c_hand = r_hand
hand = "right hand"
if (c_hand)
u_equip(c_hand)
if(broken)
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
u_equip(c_hand)
var/emote_scream = pick("screams in pain and", "let's out a sharp hiss and", "cries out and")
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ] drops what they were holding in their [hand]!")
if(malfunction)
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
u_equip(c_hand)
emote("me", 1, "drops what they were holding, their [hand] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
+11 -7
View File
@@ -376,20 +376,21 @@ This function completely restores a damaged organ to perfect condition.
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && !W.is_treated() && owner.bodytemperature >= 170)
if(!owner.reagents.has_reagent("bicaridine")) //bicard stops internal wounds from growing bigger with time, and also stop bleeding
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
if(!bicardose) //bicard stops internal wounds from growing bigger with time, and also stop bleeding
W.open_wound(0.1 * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.05 * W.damage * wound_update_accuracy)
if(bicardose >= 30) //overdose of bicaridine begins healing IB
W.damage = max(0, W.damage - 0.2)
if(!owner.reagents.has_reagent("inaprovaline")) //This little copypaste will allow inaprovaline to work too, giving it a much needed buff to help medical.
W.open_wound(0.1 * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.05 * W.damage * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.02 * W.damage * wound_update_accuracy)//Bicaridine slows Internal Bleeding
owner.vessel.remove_reagent("blood",0.02 * W.damage * wound_update_accuracy)
if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
//overdose of bicaridine begins healing IB
if(owner.reagents.get_reagent_amount("bicaridine") >= 30)
W.damage = max(0, W.damage - 0.2)
// slow healing
var/heal_amt = 0
@@ -514,8 +515,6 @@ This function completely restores a damaged organ to perfect condition.
var/obj/organ //Dropped limb object
switch(body_part)
if(LOWER_TORSO)
owner << "\red You are now sterile."
if(HEAD)
if(owner.species.flags & IS_SYNTHETIC)
organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner)
@@ -859,6 +858,11 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
else
base.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
if(base)
//Changing limb's skin color to match owner
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
base.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
icon = base
dir = SOUTH
src.transform = turn(src.transform, rand(70,130))
+2 -4
View File
@@ -129,10 +129,8 @@
// Ethanol and all drinks are bad
if(istype(R, /datum/reagent/ethanol))
owner.adjustToxLoss(0.1 * process_accuracy)
// Can't cope with toxins at all
for(var/toxin in list("toxin", "plasma", "sacid", "pacid", "cyanide", "lexorin", "amatoxin", "chloralhydrate", "carpotoxin", "zombiepowder", "mindbreaker"))
if(owner.reagents.has_reagent(toxin))
// Can't cope with toxins at all
if(istype(R, /datum/reagent/toxin))
owner.adjustToxLoss(0.3 * process_accuracy)
/datum/organ/internal/kidney