Merge pull request #1939 from CIB/master

Misc stuff
This commit is contained in:
Hawk-v3
2012-11-14 10:29:57 -08:00
11 changed files with 151 additions and 80 deletions
@@ -2,7 +2,7 @@
gender = MALE
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/embryo_op_stage = 0
var/ribcage_op_stage = 0
/*
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
@@ -19,4 +19,4 @@
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
// life should decrease this by 1 every tick
// total amount of wounds on mob, used to spread out healing and the like over all wounds
var/number_wounds = 0
var/number_wounds = 0
+16 -2
View File
@@ -949,7 +949,7 @@
gloves.germ_level += n
else
germ_level += n
/mob/living/carbon/human/revive()
for (var/datum/organ/external/O in organs)
O.status &= ~ORGAN_BROKEN
@@ -970,4 +970,18 @@
del(H)
..()
..()
/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/organ/external/chest/E = get_organ("chest")
return E.ruptured_lungs
/mob/living/carbon/human/proc/rupture_lung()
var/datum/organ/external/chest/E = get_organ("chest")
if(E.ruptured_lungs == 0)
src.custom_pain("You feel a stabbing pain in your chest!", 1)
E.ruptured_lungs = 1
+13 -4
View File
@@ -1,8 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick!
#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /5) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
@@ -488,16 +488,22 @@
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/lung_ruptured = is_lung_ruptured()
if(lung_ruptured && prob(2))
spawn emote("me", 1, "coughs up blood!")
src.drip(10)
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health < 0)
losebreath++
if(lung_ruptured && prob(4))
spawn emote("me", 1, "gasps for air!")
losebreath += 5
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
@@ -700,6 +706,9 @@
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head")
fire_alert = max(fire_alert, 2)
if(oxyloss >= 50 && prob(oxyloss / 5))
rupture_lung()
//Temporary fixes to the alerts.
return 1