mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] Vomit proc adjustments (#10920)
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a20367a6aa
commit
86efdca101
@@ -935,6 +935,13 @@
|
|||||||
deaf_loop.start() // Ear Ringing/Deafness - Not sure if we need this, but, safety. NYI. Used downstream. //CHOMPStation Enable
|
deaf_loop.start() // Ear Ringing/Deafness - Not sure if we need this, but, safety. NYI. Used downstream. //CHOMPStation Enable
|
||||||
|
|
||||||
/mob/living/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = 5, distance = 1, message = TRUE, toxic = VOMIT_TOXIC, purge = FALSE)
|
/mob/living/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = 5, distance = 1, message = TRUE, toxic = VOMIT_TOXIC, purge = FALSE)
|
||||||
|
if(!lastpuke)
|
||||||
|
lastpuke = TRUE
|
||||||
|
to_chat(src, span_warning("You feel nauseous..."))
|
||||||
|
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), src, span_warning("You feel like you're about to throw up!")), 15 SECONDS)
|
||||||
|
addtimer(CALLBACK(src, PROC_REF(do_vomit), lost_nutrition, blood, stun, distance, message, toxic, purge), 25 SECONDS)
|
||||||
|
|
||||||
|
/mob/living/proc/do_vomit(lost_nutrition = 10, blood = FALSE, stun = 5, distance = 1, message = TRUE, toxic = VOMIT_TOXIC, purge = FALSE)
|
||||||
|
|
||||||
if(!check_has_mouth())
|
if(!check_has_mouth())
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -973,6 +980,14 @@
|
|||||||
if(message)
|
if(message)
|
||||||
visible_message(span_danger("[src] throws up!"), span_userdanger("You throw up!"))
|
visible_message(span_danger("[src] throws up!"), span_userdanger("You throw up!"))
|
||||||
|
|
||||||
|
// Hurt liver means throwing up blood
|
||||||
|
if(!blood && ishuman(src))
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
if(!H.isSynthetic())
|
||||||
|
var/obj/item/organ/internal/liver/L = H.internal_organs_by_name[O_LIVER]
|
||||||
|
if(!L || L.is_broken())
|
||||||
|
blood = TRUE
|
||||||
|
|
||||||
if(stun)
|
if(stun)
|
||||||
Stun(stun)
|
Stun(stun)
|
||||||
|
|
||||||
@@ -1002,6 +1017,9 @@
|
|||||||
else if(T)
|
else if(T)
|
||||||
T.add_vomit_floor(src, vomit_type, purge)
|
T.add_vomit_floor(src, vomit_type, purge)
|
||||||
T = get_step(T, dir)
|
T = get_step(T, dir)
|
||||||
|
|
||||||
|
VARSET_IN(src, lastpuke, FALSE, 10 SECONDS)
|
||||||
|
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/mob/living/proc/check_vomit_goal()
|
/mob/living/proc/check_vomit_goal()
|
||||||
|
|||||||
Reference in New Issue
Block a user