Merge pull request #4337 from Baystation12/dev-freeze

0.1.8 Staging [Do not merge]
This commit is contained in:
DJSnapshot
2014-01-31 12:40:15 -08:00
260 changed files with 9783 additions and 8358 deletions

View File

@@ -12,10 +12,16 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Initializes blood vessels
/mob/living/carbon/human/proc/make_blood()
if (vessel)
if(vessel)
return
vessel = new/datum/reagents(600)
vessel.my_atom = src
if(species && species.flags & NO_BLOOD) //We want the var for safety but we can do without the actual blood.
return
vessel.add_reagent("blood",560)
spawn(1)
fixblood()
@@ -29,6 +35,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
// Takes care blood loss and regeneration
/mob/living/carbon/human/proc/handle_blood()
if(species && species.flags & NO_BLOOD)
return
if(stat != DEAD && bodytemperature >= 170) //Dead or cryosleep people do not pump the blood.
var/blood_volume = round(vessel.get_reagent_amount("blood"))
@@ -126,6 +136,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Makes a blood drop, leaking certain amount of blood from the mob
/mob/living/carbon/human/proc/drip(var/amt as num)
if(species && species.flags & NO_BLOOD) //TODO: Make drips come from the reagents instead.
return
if(!amt)
return
@@ -145,6 +159,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
this.icon_state = pick(iconL)
this.blood_DNA = list()
this.blood_DNA[dna.unique_enzymes] = dna.b_type
if (species) this.basecolor = species.blood_color
this.update_icon()
else
for(var/obj/effect/decal/cleanable/blood/drip/G in nums)
del G
@@ -156,6 +173,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Gets blood from mob to the container, preserving all data in it.
/mob/living/carbon/proc/take_blood(obj/item/weapon/reagent_containers/container, var/amount)
var/datum/reagent/B = get_blood(container.reagents)
if(!B) B = new /datum/reagent/blood
B.holder = container
@@ -184,8 +202,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//For humans, blood does not appear from blue, it comes from vessels.
/mob/living/carbon/human/take_blood(obj/item/weapon/reagent_containers/container, var/amount)
if(species && species.flags & NO_BLOOD)
return null
if(vessel.get_reagent_amount("blood") < amount)
return null
. = ..()
vessel.remove_reagent("blood",amount) // Removes blood if human
@@ -207,8 +230,16 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Transfers blood from container ot vessels, respecting blood types compatability.
/mob/living/carbon/human/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(species && species.flags & NO_BLOOD)
reagents.add_reagent("blood", amount, injected.data)
reagents.update_total()
return
var/datum/reagent/blood/our = get_blood(vessel)
if (!injected || !our)
return
if(blood_incompatible(injected.data["blood_type"],our.data["blood_type"]) )

View File

@@ -104,7 +104,7 @@
u_equip(c_hand)
if(broken)
emote("me", 1, "screams in pain and drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
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]"]!")
if(malfunction)
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -120,7 +120,8 @@
// standing is poor
if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5))
emote("scream")
if(species && species.flags & NO_PAIN)
emote("scream")
emote("collapse")
paralysis = 10

View File

@@ -240,7 +240,7 @@ This function completely restores a damaged organ to perfect condition.
//Possibly trigger an internal wound, too.
var/local_damage = brute_dam + burn_dam + damage
if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & ORGAN_ROBOT))
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
var/datum/wound/internal_bleeding/I = new (15)
wounds += I
owner.custom_pain("You feel something rip in your [display_name]!", 1)
@@ -591,7 +591,10 @@ This function completely restores a damaged organ to perfect condition.
if(status & ORGAN_BROKEN)
return
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
owner.emote("scream")
if(owner.species && !(owner.species.flags & NO_PAIN))
owner.emote("scream")
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
perma_injury = brute_dam

View File

@@ -55,6 +55,9 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0
// flash_strength is 0 for weak pain flash, 1 for strong pain flash
mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
if(stat >= 1) return
if(species && species.flags & NO_PAIN) return
if(reagents.has_reagent("tramadol"))
return
if(reagents.has_reagent("oxycodone"))
@@ -73,6 +76,9 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
mob/living/carbon/human/proc/handle_pain()
// not when sleeping
if(species && species.flags & NO_PAIN) return
if(stat >= 2) return
if(reagents.has_reagent("tramadol"))
return