Merge pull request #9363 from PsiOmegaDelta/PulseCheck

Pulse check
This commit is contained in:
Chinsky
2015-05-22 14:35:49 +03:00
2 changed files with 15 additions and 11 deletions

View File

@@ -1061,30 +1061,28 @@
set src in view(1)
var/self = 0
if(usr.stat == 1 || usr.restrained() || !isliving(usr)) return
if(usr.stat || usr.restrained() || !isliving(usr)) return
if(usr == src)
self = 1
if(!self)
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.</span>",\
"You begin counting [src]'s pulse")
else
usr.visible_message("\blue [usr] begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] begins counting their pulse.</span>",\
"You begin counting your pulse.")
if(src.pulse)
usr << "\blue [self ? "You have a" : "[src] has a"] pulse! Counting..."
usr << "<span class='notice'>[self ? "You have a" : "[src] has a"] pulse! Counting...</span>"
else
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
usr << "<span class='danger'>[src] has no pulse!</span>" //it is REALLY UNLIKELY that a dead person would check his own pulse
return
usr << "Don't move until counting is finished."
var/time = world.time
sleep(60)
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
usr << "You moved while counting. Try again."
usr << "You must [self ? "" : "both"] stand until counting is finished."
if(do_mob(usr, src, 60))
usr << "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>"
else
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
usr << "<span class='warning'>You failed to check the pulse. Try again.</span>"
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour)

View File

@@ -0,0 +1,6 @@
author: PsiOmegaDelta
delete-after: True
changes:
- tweak: "Both the pulse taker and target must now remain still for the duration of the check or it will fail."