mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Added warning messages before vomiting.
You have in total two warnings and to react now.
This commit is contained in:
@@ -32,15 +32,8 @@
|
||||
if(3)
|
||||
if(prob(1))
|
||||
if (affected_mob.nutrition > 100)
|
||||
affected_mob.Stun(rand(4,6))
|
||||
for(var/mob/O in viewers(world.view, affected_mob))
|
||||
O.show_message(text("<b>\red [] throws up!</b>", affected_mob), 1)
|
||||
playsound(affected_mob.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
var/turf/location = affected_mob.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(affected_mob)
|
||||
affected_mob.nutrition -= 95
|
||||
affected_mob.adjustToxLoss(-1)
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H.vomit()
|
||||
else
|
||||
affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
|
||||
affected_mob.Weaken(10)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user