diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index bb0a65fc5d2..5a00323aacd 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -164,6 +164,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_NOBLOOD "noblood" /// This just means that the carbon will always have functional liverless metabolism #define TRAIT_LIVERLESS_METABOLISM "liverless_metabolism" +/// This carbon can't be overdosed by chems +#define TRAIT_OVERDOSEIMMUNE "overdose_immune" /// Humans with this trait cannot be turned into zombies #define TRAIT_NO_ZOMBIFY "no_zombify" /// Carbons with this trait can't have their DNA copied by diseases nor changelings diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 7ec768e619a..d9e28da2988 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -320,6 +320,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_NUKEIMMUNE" = TRAIT_NUKEIMMUNE, "TRAIT_OIL_FRIED" = TRAIT_OIL_FRIED, "TRAIT_ORBITING_FORBIDDEN" = TRAIT_ORBITING_FORBIDDEN, + "TRAIT_OVERDOSEIMMUNE" = TRAIT_OVERDOSEIMMUNE, "TRAIT_OVERWATCH_IMMUNE" = TRAIT_OVERWATCH_IMMUNE, "TRAIT_OVERWATCHED" = TRAIT_OVERWATCHED, "TRAIT_PACIFISM" = TRAIT_PACIFISM, diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 1215179d0ef..9183b2e4ac5 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -1068,7 +1068,7 @@ GLOBAL_LIST_EMPTY(features_by_species) affected.blood_volume = min(affected.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM) affected.reagents.del_reagent(chem.type) return COMSIG_MOB_STOP_REAGENT_CHECK - if(!chem.overdosed && chem.overdose_threshold && chem.volume >= chem.overdose_threshold) + if(!chem.overdosed && chem.overdose_threshold && chem.volume >= chem.overdose_threshold && !HAS_TRAIT(affected, TRAIT_OVERDOSEIMMUNE)) chem.overdosed = TRUE chem.overdose_start(affected) affected.log_message("has started overdosing on [chem.name] at [chem.volume] units.", LOG_GAME) diff --git a/code/modules/mob/living/carbon/human/species_types/android.dm b/code/modules/mob/living/carbon/human/species_types/android.dm index dec4fd9e306..5988ad3b890 100644 --- a/code/modules/mob/living/carbon/human/species_types/android.dm +++ b/code/modules/mob/living/carbon/human/species_types/android.dm @@ -15,6 +15,7 @@ TRAIT_NO_DNA_COPY, TRAIT_NO_PLASMA_TRANSFORM, TRAIT_NO_UNDERWEAR, + TRAIT_OVERDOSEIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_RADIMMUNE, TRAIT_RESISTCOLD, diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 20d4da62f2b..5f9d7f81995 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -765,7 +765,7 @@ if(!reagent.metabolizing) reagent.metabolizing = TRUE reagent.on_mob_metabolize(owner) - if(can_overdose) + if(can_overdose && !HAS_TRAIT(owner, TRAIT_OVERDOSEIMMUNE)) if(reagent.overdose_threshold) if(reagent.volume >= reagent.overdose_threshold && !reagent.overdosed) reagent.overdosed = TRUE