Merge remote-tracking branch 'upstream/master' into wounds-part-2

This commit is contained in:
timothyteakettle
2020-07-26 00:25:26 +01:00
14 changed files with 705 additions and 635 deletions

View File

@@ -2344,3 +2344,53 @@
reagent_state = SOLID
color = "#E6E6DA"
taste_mult = 0
/datum/reagent/hairball
name = "Hairball"
description = "A bundle of keratinous bits and fibers, not easily digestible."
reagent_state = SOLID
can_synth = FALSE
metabolization_rate = 0.05 * REAGENTS_METABOLISM
taste_description = "wet hair"
var/amount = 0
var/knotted = FALSE
/datum/reagent/hairball/on_mob_life(mob/living/carbon/M)
amount = M.reagents.get_reagent_amount(/datum/reagent/hairball)
if(amount < 10)
if(prob(10))
M.losebreath += 1
M.emote("cough")
to_chat(M, "<span class='notice'>You clear your throat.</span>")
else
if(!knotted)
to_chat(M, "<span class='notice'>You feel a knot in your stomach.</span>")
knotted = TRUE
if(prob(5 + amount * 0.5)) // don't want this to cause too much damage
M.losebreath += 2
to_chat(M, "<span class='notice'>You feel a knot in your throat.</span>")
M.emote("cough")
else if(prob(amount - 4))
to_chat(M, "<span class='warning'>Your stomach feels awfully bloated.</span>")
playsound(M,'sound/voice/catpeople/distressed.ogg', 50, FALSE)
M.visible_message("<span class='warning'>[M] seems distressed!.</span>", ignored_mobs=M)
else if(prob(amount - 8))
knotted = FALSE
playsound(M,'sound/voice/catpeople/puking.ogg', 110, FALSE)
M.Immobilize(30)
sleep(30) //snowflake but it works, don't wanna proc this
if(QDELETED(M) || QDELETED(src)) //this handles race conditions about m or src not existing.
return
M.visible_message("<span class='warning'>[M] throws up a hairball! Disgusting!</span>", ignored_mobs=M)
new /obj/item/toy/plush/hairball(get_turf(M))
to_chat(M, "<span class='notice'>Aaaah that's better!</span>")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "cleared_stomach", /datum/mood_event/cleared_stomach, name)
M.reagents.del_reagent(/datum/reagent/hairball)
return
..()