Added warning messages before vomiting.

You have in total two warnings and to react now.
This commit is contained in:
Chinsky
2012-10-31 14:36:09 +04:00
parent 65dbc916f4
commit 771389f871
3 changed files with 26 additions and 27 deletions

View File

@@ -805,4 +805,26 @@
xylophone = 1
spawn(1200)
xylophone=0
return
return
/mob/living/carbon/human/proc/vomit()
if(!lastpuke)
lastpuke = 1
src << "<spawn class='warning'>You feel nauseous..."
spawn(150) //15 seconds until second warning
src << "<spawn class='warning'>You feel like you are about to throw up!"
spawn(100) //and you have 10 more for mad dash to the bucket
Stun(5)
src.visible_message("<spawn class='warning'>[src] throws up!","<spawn class='warning'>You throw up!")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 40
adjustToxLoss(-3)
spawn(350) //wait 35 seconds before next volley
lastpuke = 0

View File

@@ -1400,23 +1400,7 @@
// Puke if toxloss is too high
if(!stat)
if (getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
Stun(5)
for(var/mob/O in viewers(world.view, src))
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
adjustToxLoss(-3)
// make it so you can only puke so fast
lastpuke = 0
vomit()
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)