Comments out blood regen due to runtimes. Fixed some problems with sleeping and resting and chloral (does not actually increase sleeping times!). Adds some messages for sleeping.

This commit is contained in:
Erthilo
2012-05-23 02:13:41 +01:00
parent 57f1c15f15
commit 3fcd1f68f7
4 changed files with 21 additions and 23 deletions

View File

@@ -1818,9 +1818,9 @@ datum
M:confused += 2
M:drowsyness += 2
if(2 to 50)
M:sleeping += 1
M:sleeping += 5
if(51 to INFINITY)
M:sleeping += 1
M:sleeping += 5
M:adjustToxLoss(2)
..()
return

View File

@@ -915,16 +915,17 @@
var/blood_volume = round(vessel.get_reagent_amount("blood"))
if(bloodloss)
drip(bloodloss)
/* //Causing too many runtimes, sorry Sky.
else if(blood_volume < 560 && blood_volume)
var/datum/reagent/blood/B = locate() in vessel //Grab some blood
if(B.data)
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel)
if(D.data["donor"] == src)
B = D
break
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel)
if(D.data["donor"] == src)
B = D
break
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
*/
if(!blood_volume)
bloodloss = 0
else if(blood_volume > 448)
@@ -960,18 +961,6 @@
if(getOxyLoss() > 50) Paralyse(3)
if(sleeping)
adjustHalLoss(-5)
if(paralysis <= 0)
Paralyse(2)
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
if(!src.sleeping_willingly)
src.sleeping--
if(resting)
if(weakened <= 0)
Weaken(2)
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
death()
else if(health < config.health_threshold_crit)
@@ -991,7 +980,6 @@
if (stunned > 0)
AdjustStunned(-1)
stat = 0
if (weakened > 0)
AdjustWeakened(-1)
lying = 1
@@ -1283,7 +1271,9 @@
nutrition_icon.icon_state = "nutrition3"
else
nutrition_icon.icon_state = "nutrition4"
if (pressure)
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
pressure.icon_state = "pressure0"

View File

@@ -614,9 +614,14 @@
set category = "IC"
if(usr.sleeping && usr.sleeping_willingly)
usr << "\blue You start to wake up..."
usr.sleeping = 0
usr.sleeping_willingly = 0
else if(usr.sleeping)
usr << "\red You feel unable to wake up..."
return
else if(!usr.sleeping)
usr << "\blue You start to fall asleep..."
usr.sleeping = 20 //Short nap
usr.sleeping_willingly = 1