mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #166 from CIB/master
Improved on medical a little, adding traumatic shock
This commit is contained in:
@@ -795,6 +795,7 @@
|
||||
#include "code\modules\mob\living\say.dm"
|
||||
#include "code\modules\mob\living\blob\blob.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\say.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
|
||||
|
||||
@@ -441,12 +441,6 @@
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
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
|
||||
name = "Hard of hearing syndrome"
|
||||
stage = 3
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
|
||||
if(B)
|
||||
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>"
|
||||
else
|
||||
dat += "<BR>Please check container contents."
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_state = "pod_0"
|
||||
req_access = list(access_medlab) //For premature unlocking.
|
||||
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/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.
|
||||
|
||||
@@ -181,6 +181,8 @@
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
|
||||
if (shock_stage >= 10) tally += 3
|
||||
|
||||
return tally
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
|
||||
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
|
||||
|
||||
//First, resolve location and get a breath
|
||||
@@ -34,6 +37,8 @@
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
src.handle_shock()
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//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
|
||||
@@ -992,9 +997,6 @@
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
|
||||
// clean all the symptoms incurred by the virus
|
||||
src.disease_symptoms = 0
|
||||
|
||||
if(!virus2)
|
||||
// the following is silly since it lets you infect people through glass
|
||||
/*for(var/mob/living/carbon/M in oviewers(4,src))
|
||||
@@ -1058,65 +1060,35 @@
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
|
||||
/*
|
||||
// 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
|
||||
handle_shock()
|
||||
..()
|
||||
|
||||
if (mach)
|
||||
if (machine)
|
||||
mach.icon_state = "mach1"
|
||||
if(traumatic_shock >= 80)
|
||||
shock_stage += 1
|
||||
else
|
||||
mach.icon_state = null
|
||||
shock_stage--
|
||||
shock_stage = max(shock_stage, 0)
|
||||
return
|
||||
|
||||
if (!m_flag)
|
||||
moved_recently = 0
|
||||
m_flag = null
|
||||
if (shock_stage > 60)
|
||||
if(shock_stage == 61)
|
||||
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 ((istype(loc, /turf/space) && !( locate(/obj/movable, loc) )))
|
||||
var/layers = 20
|
||||
// ******* Check
|
||||
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))))
|
||||
layers -= 5
|
||||
if (istype(w_uniform, /obj/item/clothing/under))
|
||||
layers -= 5
|
||||
if ((istype(wear_suit, /obj/item/clothing/suit) && wear_suit.flags & 8))
|
||||
layers -= 10
|
||||
if (layers > oxcheck)
|
||||
oxcheck = layers
|
||||
|
||||
|
||||
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())
|
||||
*/
|
||||
if (shock_stage > 70) if(shock_stage % 30 == 0)
|
||||
Paralyse(rand(15,28))
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30) emote("me",1,"is having trouble keeping their eyes open.")
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
stuttering = max(stuttering, 5)
|
||||
bodytemperature = 313.15 // high fever
|
||||
// pain messages
|
||||
if(shock_stage == 10)
|
||||
src << "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!")
|
||||
else if(shock_stage == 40)
|
||||
src << "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")
|
||||
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.")
|
||||
18
code/modules/mob/living/carbon/shock.dm
Normal file
18
code/modules/mob/living/carbon/shock.dm
Normal 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()
|
||||
Reference in New Issue
Block a user