From a62e7f3ea70e286bb8f6abbc9ea04fa13386e6de Mon Sep 17 00:00:00 2001 From: "C.L" Date: Wed, 24 Aug 2022 01:15:25 -0400 Subject: [PATCH] Makes topical OD do damage. - Makes Topical reagents that have the "can_overdose_touch" variable set to true properly cause OD effects. https://i.imgur.com/JY5YVHW.png The bug was the code went: "Overdose amount? alright. OD volume high enough? Alright." which was good. And then it got to the last segment of the code. "Alright, so, this is in parenthesis. Is it not applied via touch (It is applied via touch, meaning this is false!) AND also set so that it doesn't have can_overdose_touch? (Chems that can cause OD via touch has this set to true, meaning this, also, returned false!)" By changing this && to a || and making it check if the reagent _does_ have the "can_overdose_touch" variable, it has fixed the bug. --- code/modules/reagents/reagents/_reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/reagents/_reagents.dm b/code/modules/reagents/reagents/_reagents.dm index 1223bf5293..fa59c30a3a 100644 --- a/code/modules/reagents/reagents/_reagents.dm +++ b/code/modules/reagents/reagents/_reagents.dm @@ -163,7 +163,7 @@ affect_ingest(M, alien, removed * ingest_abs_mult) if(CHEM_TOUCH) affect_touch(M, alien, removed) - if(overdose && (volume > overdose * M?.species.chemOD_threshold) && (active_metab.metabolism_class != CHEM_TOUCH && !can_overdose_touch)) + if(overdose && (volume > overdose * M?.species.chemOD_threshold) && (active_metab.metabolism_class != CHEM_TOUCH || can_overdose_touch)) overdose(M, alien, removed) if(M.species.allergens & allergen_type) //uhoh, we can't handle this! M.add_chemical_effect(CE_ALLERGEN, allergen_factor * removed)