Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Android doesn't need epipen #767

Merged
merged 3 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
TRAIT_NO_DNA_COPY,
TRAIT_NO_PLASMA_TRANSFORM,
TRAIT_NO_UNDERWEAR,
TRAIT_OVERDOSEIMMUNE,
TRAIT_PIERCEIMMUNE,
TRAIT_RADIMMUNE,
TRAIT_RESISTCOLD,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading