This commit is contained in:
shellspeed1
2019-10-14 18:46:06 -07:00
parent 345e69a718
commit 470ec5d62b
114 changed files with 2124 additions and 592 deletions
+33 -4
View File
@@ -8,12 +8,41 @@
desc = "Onaka ga suite imasu."
var/disgust_metabolism = 1
/obj/item/organ/stomach/on_life()
var/mob/living/carbon/human/H = owner
healing_factor = STANDARD_ORGAN_HEALING
decay_factor = STANDARD_ORGAN_DECAY
if(istype(H))
H.dna.species.handle_digestion(H)
low_threshold_passed = "<span class='info'>Your stomach flashes with pain before subsiding. Food doesn't seem like a good idea right now.</span>"
high_threshold_passed = "<span class='warning'>Your stomach flares up with constant pain- you can hardly stomach the idea of food right now!</span>"
high_threshold_cleared = "<span class='info'>The pain in your stomach dies down for now, but food still seems unappealing.</span>"
low_threshold_cleared = "<span class='info'>The last bouts of pain in your stomach have died out.</span>"
/obj/item/organ/stomach/on_life()
var/datum/reagent/consumable/nutriment/Nutri
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(!(organ_flags & ORGAN_FAILING))
H.dna.species.handle_digestion(H)
handle_disgust(H)
Nutri = locate(/datum/reagent/consumable/nutriment) in H.reagents.reagent_list
if(Nutri)
if(prob((damage/40) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
else if(Nutri && damage > high_threshold)
if(prob((damage/10) * Nutri.volume * Nutri.volume))
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
else if(iscarbon(owner))
var/mob/living/carbon/C = owner
Nutri = locate(/datum/reagent/consumable/nutriment) in C.reagents.reagent_list
if(damage < low_threshold)
return
/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H)
if(H.disgust)