Merge branch 'bleeding-edge-freeze' into organ

Conflicts:
	html/changelog.html
This commit is contained in:
Chinsky
2013-06-01 18:33:58 +04:00
424 changed files with 37298 additions and 25638 deletions

View File

@@ -25,7 +25,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
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, \
"resistances"=null,"trace_chem"=null, "virus2" = null, "antobodies" = null)
"resistances"=null,"trace_chem"=null, "virus2" = null, "antibodies" = null)
// Takes care blood loss and regeneration
/mob/living/carbon/human/proc/handle_blood()
@@ -165,7 +165,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
B.data["donor"] = src
if(src.virus2)
B.data["virus2"] = src.virus2.getcopy()
B.data["antibodies"] |= src.antibodies
B.data["antibodies"] = src.antibodies
B.data["blood_DNA"] = copytext(src.dna.unique_enzymes,1,0)
if(src.resistances && src.resistances.len)
if(B.data["resistances"])
@@ -176,8 +176,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/list/temp_chem = list()
for(var/datum/reagent/R in src.reagents.reagent_list)
temp_chem += R.name
temp_chem[R.name] = R.volume
temp_chem += R.id
temp_chem[R.id] = R.volume
B.data["trace_chem"] = list2params(temp_chem)
return B
@@ -192,14 +192,22 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
/mob/living/carbon/human/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
var/datum/reagent/blood/our = get_blood(vessel)
var/datum/reagent/blood/injected = get_blood(container.reagents)
if (!injected)
return
if(blood_incompatible(injected.data["blood_type"],our.data["blood_type"]) )
reagents.add_reagent("toxin",amount * 0.5)
reagents.update_total()
else
vessel.add_reagent("blood", amount)
vessel.add_reagent("blood", amount, injected.data)
vessel.update_total()
var/list/chems = list()
chems = params2list(injected.data["trace_chem"])
for(var/C in chems)
src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood
//world << "added [(text2num(chems[C])/560) * amount] = [text2num(chems[C])]/560*[amount] units of [C] to [src]" //DEBUG
reagents.update_total()
container.reagents.remove_reagent("blood", amount)
//Gets human's own blood.

View File

@@ -11,6 +11,9 @@
proc/receive_chem(chemical as obj)
return 0
/datum/organ/proc/get_icon()
return icon('icons/mob/human.dmi',"blank")
//Handles chem traces
/mob/living/carbon/human/proc/handle_trace_chems()
//New are added for reagents to random organs.

View File

@@ -555,6 +555,14 @@
if(T)
T.robotize()
/datum/organ/external/proc/mutate()
src.status |= ORGAN_MUTATED
owner.update_body()
/datum/organ/external/proc/unmutate()
src.status &= ~ORGAN_MUTATED
owner.update_body()
/datum/organ/external/proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
@@ -564,21 +572,32 @@
return 1
return 0
/datum/organ/external/get_icon(gender="")
if (status & ORGAN_MUTATED)
return new /icon(owner.deform_icon, "[icon_name][gender ? "_[gender]" : ""]")
else
return new /icon(owner.race_icon, "[icon_name][gender ? "_[gender]" : ""]")
/datum/organ/external/proc/is_usable()
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/****************************************************
ORGAN DEFINES
****************************************************/
/datum/organ/external/chest
name = "chest"
icon_name = "chest"
icon_name = "torso"
display_name = "chest"
max_damage = 150
min_broken_damage = 75
body_part = UPPER_TORSO
/datum/organ/external/groin
name = "groin"
icon_name = "diaper"
icon_name = "groin"
display_name = "groin"
max_damage = 115
min_broken_damage = 70
@@ -661,27 +680,37 @@
body_part = HEAD
var/disfigured = 0
take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
/datum/organ/external/head/get_icon()
if (!owner)
return ..()
var/g = "m"
if(owner.gender == FEMALE) g = "f"
if (status & ORGAN_MUTATED)
. = new /icon(owner.deform_icon, "[icon_name]_[g]")
else
. = new /icon(owner.race_icon, "[icon_name]_[g]")
proc/disfigure(var/type = "brute")
if (disfigured)
return
if(type == "brute")
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s face.", \
"\red <b>Your face becomes unrecognizible mangled mess!</b>", \
"\red You hear a sickening crack.")
else
owner.visible_message("\red [owner]'s face melts away, turning into mangled mess!", \
"\red <b>Your face melts off!</b>", \
"\red You hear a sickening sizzle.")
disfigured = 1
/datum/organ/external/head/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
/datum/organ/external/head/proc/disfigure(var/type = "brute")
if (disfigured)
return
if(type == "brute")
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s face.", \
"\red <b>Your face becomes unrecognizible mangled mess!</b>", \
"\red You hear a sickening crack.")
else
owner.visible_message("\red [owner]'s face melts away, turning into mangled mess!", \
"\red <b>Your face melts off!</b>", \
"\red You hear a sickening sizzle.")
disfigured = 1
/****************************************************
EXTERNAL ORGAN ITEMS

View File

@@ -56,7 +56,12 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
var/msg = "\red <b>[message]</b>"
if(flash_strength >= 1)
msg = "\red <font size=3><b>[message]</b></font>"
src << msg
// Anti message spam checks
if(msg && ((msg != last_pain_message) || (world.time >= next_pain_time)))
last_pain_message = msg
src << msg
next_pain_time = world.time + 100
mob/living/carbon/human/proc/handle_pain()
// not when sleeping
@@ -101,7 +106,10 @@ mob/living/carbon/human/proc/handle_pain()
if(11 to 15)
toxMessageProb = 2
toxDamageMessage = "Your whole body hurts."
if(91 to 10000)
if(15 to 25)
toxMessageProb = 3
toxDamageMessage = "Your whole body hurts badly."
if(26 to INFINITY)
toxMessageProb = 5
toxDamageMessage = "Your body aches all over, it's driving you mad."