From 6acc082cf3863e5a95c20002344c22638941351d Mon Sep 17 00:00:00 2001 From: Pennwick Date: Tue, 20 Jan 2015 16:37:46 -0600 Subject: [PATCH] Fixes addiction bug Adds in a line to increment addictions in stage4. Other stages were triggering twice when values were exactly 10, 20, or 30. Edited the if statements to remove overlap. Now 0 and lower is no effects, 1-10 is minor and so on up until 41 where the addiction is removed. --- code/modules/reagents/Chemistry-Holder.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 17e51b1f63d..50258b5f234 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -222,19 +222,20 @@ datum/reagents/proc/metabolize(var/mob/M) for(var/A in addiction_list) var/datum/reagent/R = A if(M && R) - if(R.addiction_stage < 0) + if(R.addiction_stage <= 0) R.addiction_stage++ - if(R.addiction_stage >= 0 && R.addiction_stage <= 10) + if(R.addiction_stage > 0 && R.addiction_stage <= 10) R.addiction_act_stage1(M) R.addiction_stage++ - if(R.addiction_stage >= 10 && R.addiction_stage <= 20) + if(R.addiction_stage > 10 && R.addiction_stage <= 20) R.addiction_act_stage2(M) R.addiction_stage++ - if(R.addiction_stage >= 20 && R.addiction_stage <= 30) + if(R.addiction_stage > 20 && R.addiction_stage <= 30) R.addiction_act_stage3(M) R.addiction_stage++ if(R.addiction_stage > 30 && R.addiction_stage <= 40) R.addiction_act_stage4(M) + R.addiction_stage++ if(R.addiction_stage > 40) M << "You feel like you've gotten over your need for [R.name]." addiction_list.Remove(R)