diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 4f66482f51..b7a5975ad5 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -172,7 +172,7 @@ #define TRAIT_AUTO_CATCH_ITEM "auto_catch_item" #define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman. #define TRAIT_FREESPRINT "free_sprinting" - +#define TRAIT_NO_ALCOHOL "alcohol_intolerance" // common trait sources #define TRAIT_GENERIC "generic" diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 0b9284a144..5c4cf55f45 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -17,7 +17,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks) /datum/controller/subsystem/processing/quirks/Initialize(timeofday) if(!quirks.len) SetupQuirks() - quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic"),list("Ageusia","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion")) + quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic"),list("Ageusia","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Alcohol Intolerance"),list("Alcohol Intolerance","Drunken Resilience")) return ..() /datum/controller/subsystem/processing/quirks/proc/SetupQuirks() diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm index 911929896b..e712a38df1 100644 --- a/code/datums/traits/neutral.dm +++ b/code/datums/traits/neutral.dm @@ -121,3 +121,21 @@ mob_trait = TRAIT_EXHIBITIONIST gain_text = "You feel like exposing yourself to the world." lose_text = "Indecent exposure doesn't sound as charming to you anymore." + +/datum/quirk/alcohol_intolerance + name = "Alcohol Intolerance" + desc = "You take toxin damage from alcohol rather than getting drunk." + value = 0 + mob_trait = TRAIT_NO_ALCOHOL + medical_record_text = "Patient's body does not react properly to ethyl alcohol." + +/datum/quirk/alcohol_intolerance/add() + var/mob/living/carbon/human/H = quirk_holder + var/datum/species/species = H.dna.species + species.disliked_food |= ALCOHOL + +/datum/quirk/alcohol_intolerance/remove() + var/mob/living/carbon/human/H = quirk_holder + if(H) + var/datum/species/species = H.dna.species + species.disliked_food &= ~ALCOHOL diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 92f412dd89..b33be2fa02 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -439,7 +439,6 @@ desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." icon_state = "tonic" list_reagents = list("tonic" = 50) - foodtype = ALCOHOL /obj/item/reagent_containers/food/drinks/soda_cans/sodawater name = "soda water" diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index fd28ff9c47..077ab1fb7a 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -36,7 +36,9 @@ All effects don't start immediately, but rather get worse over time; the rate is */ /datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C) - if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) + if(HAS_TRAIT(C, TRAIT_NO_ALCOHOL)) + C.adjustToxLoss((boozepwr/25)*REM,forced = TRUE) + else if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) var/booze_power = boozepwr if(HAS_TRAIT(C, TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker booze_power *= 0.7