From 63cb76218b1e8b00eaccda70a3d1e2a3bfa793eb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:28:34 +0100 Subject: [PATCH] [MIRROR] Android doesn't need epipen [MDB IGNORE] (#25172) * Android doesn't need epipen * Merge Master, Resolve conflict --------- Co-authored-by: Xackii <120736708+Xackii@users.noreply.github.com> Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com> --- code/__DEFINES/traits/declarations.dm | 2 ++ code/_globalvars/traits/_traits.dm | 1 + code/modules/mob/living/carbon/human/_species.dm | 2 +- .../mob/living/carbon/human/species_types/android.dm | 7 +++++++ code/modules/reagents/chemistry/holder.dm | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index a614d1974df..ad6a197441c 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -157,6 +157,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" /// Humans with this trait cannot be affected by changeling transformation stings diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index c373be5b149..6bfeff84d90 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -319,6 +319,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 b847b7a73da..949847eaf99 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -1057,7 +1057,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 55f13dbfabf..2e7ba2dc0e0 100644 --- a/code/modules/mob/living/carbon/human/species_types/android.dm +++ b/code/modules/mob/living/carbon/human/species_types/android.dm @@ -10,7 +10,14 @@ TRAIT_NOCLONELOSS, TRAIT_NOFIRE, TRAIT_NOHUNGER, +<<<<<<< HEAD TRAIT_LIVERLESS_METABOLISM, +======= + TRAIT_NO_DNA_COPY, + TRAIT_NO_PLASMA_TRANSFORM, + TRAIT_NO_UNDERWEAR, + TRAIT_OVERDOSEIMMUNE, +>>>>>>> bb4cd6d86 ([MIRROR] Android doesn't need epipen [MDB IGNORE] (#25172)) 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