diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm index 985da6480bb..f9480287af1 100755 --- a/code/modules/surgery/organs/stomach.dm +++ b/code/modules/surgery/organs/stomach.dm @@ -85,14 +85,24 @@ if(!nutri) return + // remove the food reagent amount + var/nutri_vol = nutri.volume + var/amount_food = food_reagents[nutri.type] + if(amount_food) + nutri_vol = max(nutri_vol - amount_food, 0) + + // found nutriment was stomach food reagent + if(!(nutri_vol > 0)) + return + //The stomach is damage has nutriment but low on theshhold, lo prob of vomit - if(prob(damage * 0.025 * nutri.volume * nutri.volume)) + if(prob(damage * 0.025 * nutri_vol * nutri_vol)) body.vomit(damage) to_chat(body, "Your stomach reels in pain as you're incapable of holding down all that food!") return // the change of vomit is now high - if(damage > high_threshold && prob(damage * 0.1 * nutri.volume * nutri.volume)) + if(damage > high_threshold && prob(damage * 0.1 * nutri_vol * nutri_vol)) body.vomit(damage) to_chat(body, "Your stomach reels in pain as you're incapable of holding down all that food!")