Updated pulse checking on examine, optimized handle_pulse(), fixed some grammer.

xoxo chinsky
This commit is contained in:
Spamcat
2013-07-08 22:37:54 +04:00
parent 9dec8e311c
commit 0e153b7226
3 changed files with 14 additions and 21 deletions
@@ -209,20 +209,13 @@
spawn(15)
usr << "\blue [t_He] has a pulse!"
if (src.stat == 2 || (status_flags & FAKEDEATH))
if(distance <= 1)
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
if(distance <= 1)
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
spawn(15)
var/foundghost = 0
if(src.client)
foundghost = 1
if(!foundghost)
usr << "<span class='deadsay'>[t_He] has no pulse and [t_his] soul has departed...</span>"
if(pulse == PULSE_NONE)
usr << "<span class='deadsay'>[t_He] has no pulse [src.client ? "" : "and [t_his] soul has departed"]...</span>"
else
usr << "<span class='deadsay'>[t_He] has no pulse...</span>"
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
msg += "<span class='warning'>"
@@ -1238,9 +1238,9 @@ mob/living/carbon/human/yank_out_object()
"You begin counting your pulse.")
if(src.pulse)
usr << "\blue [self ? "I have" : "[src] has"] pulse! Counting..."
usr << "\blue [self ? "You have a" : "[src] has"] pulse! Counting..."
else
usr << "\red [src] has no pulse!"
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
return
usr << "Don't move until counting is finished."
@@ -1249,5 +1249,5 @@ mob/living/carbon/human/yank_out_object()
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
usr << "You moved while counting. Try again."
else
usr << "\blue [self ? "My" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
+6 -6
View File
@@ -1417,7 +1417,7 @@
Paralyse(rand(15,28))
proc/handle_pulse()
//if(life_tick % 100) return pulse //update pulse every 100 life ticks
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(stat == DEAD)
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
@@ -1427,17 +1427,17 @@
if(round(vessel.get_reagent_amount("blood")) <= BLOOD_VOLUME_BAD) //how much blood do we have
temp = PULSE_THREADY //not enough :(
if(reagents.get_reagent_amount("zombiepowder"))
if(status_flags & FAKEDEATH)
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
for(var/R in bradycardics)
if(reagents.get_reagent_amount(R))
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id in bradycardics)
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
temp--
break //one reagent is enough
//comment out the breaks to make med effects stack
for(var/R in tachycardics) //handles different chems' influence on pulse
if(reagents.get_reagent_amount(R))
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
if(R.id in tachycardics)
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
temp++
break