Merge pull request #166 from CIB/master

Improved on medical a little, adding traumatic shock
This commit is contained in:
CIB
2011-12-29 05:21:52 -08:00
7 changed files with 59 additions and 69 deletions

View File

@@ -795,6 +795,7 @@
#include "code\modules\mob\living\say.dm" #include "code\modules\mob\living\say.dm"
#include "code\modules\mob\living\blob\blob.dm" #include "code\modules\mob\living\blob\blob.dm"
#include "code\modules\mob\living\carbon\carbon.dm" #include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\shock.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm" #include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\say.dm" #include "code\modules\mob\living\carbon\alien\say.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm" #include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"

View File

@@ -441,12 +441,6 @@
activate(var/mob/living/carbon/mob,var/multiplier) activate(var/mob/living/carbon/mob,var/multiplier)
mob.brainloss = 20 mob.brainloss = 20
/datum/disease2/effect/lesser/drowsy
name = "Bedroom Syndrome"
stage = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob.drowsyness = 5
/datum/disease2/effect/lesser/deaf /datum/disease2/effect/lesser/deaf
name = "Hard of hearing syndrome" name = "Hard of hearing syndrome"
stage = 3 stage = 3

View File

@@ -68,6 +68,9 @@
if(B) if(B)
dat = "Blood sample inserted." dat = "Blood sample inserted."
var/code = ""
for(var/V in ANTIGENS) if(text2num(V) & B.data["antibodies"]) code += ANTIGENS[V]
dat += "<BR>Antibodies: [code]"
dat += "<BR><A href='?src=\ref[src];antibody=1'>Begin antibody production</a>" dat += "<BR><A href='?src=\ref[src];antibody=1'>Begin antibody production</a>"
else else
dat += "<BR>Please check container contents." dat += "<BR>Please check container contents."

View File

@@ -12,7 +12,7 @@
icon_state = "pod_0" icon_state = "pod_0"
req_access = list(access_medlab) //For premature unlocking. req_access = list(access_medlab) //For premature unlocking.
var/mob/living/occupant var/mob/living/occupant
var/heal_level = 90 //The clone is released once its health reaches this level. var/heal_level = 10 //The clone is released once its health reaches this level.
var/locked = 0 var/locked = 0
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine. var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
var/mess = 0 //Need to clean out it if it's full of exploded clone. var/mess = 0 //Need to clean out it if it's full of exploded clone.

View File

@@ -181,6 +181,8 @@
if (bodytemperature < 283.222) if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75 tally += (283.222 - bodytemperature) / 10 * 1.75
if (shock_stage >= 10) tally += 3
return tally return tally
/mob/living/carbon/human/Stat() /mob/living/carbon/human/Stat()

View File

@@ -21,6 +21,9 @@
var/datum/gas_mixture/environment = loc.return_air() var/datum/gas_mixture/environment = loc.return_air()
// clean all symptoms, they must be set again in this cycle
src.disease_symptoms = 0
if (stat != 2) //still breathing if (stat != 2) //still breathing
//First, resolve location and get a breath //First, resolve location and get a breath
@@ -34,6 +37,8 @@
var/obj/location_as_object = loc var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0) location_as_object.handle_internal_lifeform(src, 0)
src.handle_shock()
//Apparently, the person who wrote this code designed it so that //Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the //blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy //code. Very ugly. I dont care. Moving this stuff here so its easy
@@ -992,9 +997,6 @@
for(var/datum/disease/D in viruses) for(var/datum/disease/D in viruses)
D.cure() D.cure()
// clean all the symptoms incurred by the virus
src.disease_symptoms = 0
if(!virus2) if(!virus2)
// the following is silly since it lets you infect people through glass // the following is silly since it lets you infect people through glass
/*for(var/mob/living/carbon/M in oviewers(4,src)) /*for(var/mob/living/carbon/M in oviewers(4,src))
@@ -1058,65 +1060,35 @@
if ((changeling.geneticdamage > 0)) if ((changeling.geneticdamage > 0))
changeling.geneticdamage = changeling.geneticdamage-1 changeling.geneticdamage = changeling.geneticdamage-1
/* handle_shock()
// Commented out so hunger system won't be such shock ..()
// Damage and effect from not eating
if(nutrition <= 50)
if (prob (0.1))
src << "\red Your stomach rumbles."
if (prob (10))
bruteloss++
if (prob (5))
src << "You feel very weak."
weakened += rand(2, 3)
*/
/*
snippets
if (mach) if(traumatic_shock >= 80)
if (machine) shock_stage += 1
mach.icon_state = "mach1"
else else
mach.icon_state = null shock_stage--
shock_stage = max(shock_stage, 0)
return
if (!m_flag) if (shock_stage > 60)
moved_recently = 0 if(shock_stage == 61)
m_flag = null for(var/mob/O in viewers(src, null))
O.show_message("<b>[src.name]'s</b> body becomes limp.", 1)
Stun(20)
lying = 1
disease_symptoms |= DISEASE_WHISPER
if (shock_stage > 70) if(shock_stage % 30 == 0)
Paralyse(rand(15,28))
if ((istype(loc, /turf/space) && !( locate(/obj/movable, loc) ))) if(shock_stage >= 30)
var/layers = 20 if(shock_stage == 30) emote("me",1,"is having trouble keeping their eyes open.")
// ******* Check eye_blurry = max(2, eye_blurry)
if (((istype(head, /obj/item/clothing/head) && head.flags & 4) || (istype(wear_mask, /obj/item/clothing/mask) && (!( wear_mask.flags & 4 ) && wear_mask.flags & 8)))) stuttering = max(stuttering, 5)
layers -= 5 bodytemperature = 313.15 // high fever
if (istype(w_uniform, /obj/item/clothing/under)) // pain messages
layers -= 5 if(shock_stage == 10)
if ((istype(wear_suit, /obj/item/clothing/suit) && wear_suit.flags & 8)) src << "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!")
layers -= 10 else if(shock_stage == 40)
if (layers > oxcheck) src << "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")
oxcheck = layers else if(shock_stage == 80)
src << "<font color='red'><b>"+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.")
if(bodytemperature < 282.591 && (!firemut))
if(bodytemperature < 250)
adjustFireLoss(4)
updatehealth()
if(paralysis <= 2) paralysis += 2
else if(prob(1) && !paralysis)
if(paralysis <= 5) paralysis += 5
emote("collapse")
src << "\red You collapse from the cold!"
if(bodytemperature > 327.444 && (!firemut))
if(bodytemperature > 345.444)
if(!eye_blurry) src << "\red The heat blurs your vision!"
eye_blurry = max(4, eye_blurry)
if(prob(3)) adjustFireLoss(rand(1,2))
else if(prob(3) && !paralysis)
paralysis += 2
emote("collapse")
src << "\red You collapse from heat exaustion!"
plcheck = t_plasma
oxcheck = t_oxygen
G.turf_add(T, G.total_moles())
*/

View File

@@ -0,0 +1,18 @@
/mob/living/carbon/var/traumatic_shock = 0
/mob/living/carbon/var/shock_stage = 0
// proc to find out in how much pain the mob is at the moment
/mob/living/carbon/proc/updateshock()
src.traumatic_shock = src.getOxyLoss() + src.getToxLoss() + src.getFireLoss() + 1.2*src.getBruteLoss() + 2*src.getCloneLoss()
if(reagents.has_reagent("alkysine"))
src.traumatic_shock -= 10
if(reagents.has_reagent("inaprovaline"))
src.traumatic_shock -= 15
if(reagents.has_reagent("synaptizine"))
src.traumatic_shock -= 50
return src.traumatic_shock
/mob/living/carbon/proc/handle_shock()
updateshock()