Vomiting Overhaul (#365)

Centralises vomiting code to remove duplication and standardise effects.
Makes vomiting empty your stomach a bit (30u, the capacity of a drink
glass)
Adds Ipecac, an emetic to cause vomiting
This commit is contained in:
NanakoAC
2016-06-20 15:49:44 +03:00
committed by skull132
parent 2179fd46ba
commit 4e61099040
9 changed files with 104 additions and 33 deletions
+3 -11
View File
@@ -31,7 +31,7 @@ Bonus
/datum/symptom/vomit/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB / 2))
var/mob/living/M = A.affected_mob
var/mob/living/carbon/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
M << "<span class='notice'>[pick("You feel nauseous.", "You feel like you're going to throw up!")]</span>"
@@ -40,16 +40,8 @@ Bonus
return
/datum/symptom/vomit/proc/Vomit(var/mob/living/M)
M.visible_message("<B>[M]</B> vomits on the floor!")
M.nutrition -= 20
M.adjustToxLoss(-3)
var/turf/pos = get_turf(M)
pos.add_vomit_floor(M)
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
/datum/symptom/vomit/proc/Vomit(var/mob/living/carbon/M)
M.vomit()//This function is in mob_helpers
/*
//////////////////////////////////////
+2 -7
View File
@@ -33,13 +33,8 @@
affected_mob.adjustToxLoss(1)
if(stage > 2)
if(prob(1))
if (affected_mob.nutrition > 100)
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)
affected_mob.adjustToxLoss(3)
var/mob/living/carbon/human/H = affected_mob
H.delayed_vomit()
if(stage > 3)
if(prob(1) && ishuman(affected_mob))
var/mob/living/carbon/human/H = affected_mob