diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 38aafc665f..4cf50cd072 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -326,19 +326,18 @@ var/datum/reagent/R = addiction if(C && R) R.addiction_stage++ - switch(R.addiction_stage) - if(1 to R.addiction_stage1_end) - need_mob_update += R.addiction_act_stage1(C) - if(R.addiction_stage1_end to R.addiction_stage2_end) - need_mob_update += R.addiction_act_stage2(C) - if(R.addiction_stage2_end to R.addiction_stage3_end) - need_mob_update += R.addiction_act_stage3(C) - if(R.addiction_stage3_end to R.addiction_stage4_end) - need_mob_update += R.addiction_act_stage4(C) - if(R.addiction_stage4_end to INFINITY) - remove_addiction(R) - else - SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose") + if(1 <= R.addiction_stage && R.addiction_stage <= R.addiction_stage1_end) + need_mob_update += R.addiction_act_stage1(C) + else if(R.addiction_stage1_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage2_end) + need_mob_update += R.addiction_act_stage2(C) + else if(R.addiction_stage2_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage3_end) + need_mob_update += R.addiction_act_stage3(C) + else if(R.addiction_stage3_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage4_end) + need_mob_update += R.addiction_act_stage4(C) + else if(R.addiction_stage4_end < R.addiction_stage) + remove_addiction(R) + else + SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose") addiction_tick++ if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates. C.updatehealth()