Merge pull request #10256 from Putnam3145/alcohol-intolerance
Adds an alcohol intolerance trait (NOT light drinker)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -121,3 +121,21 @@
|
||||
mob_trait = TRAIT_EXHIBITIONIST
|
||||
gain_text = "<span class='notice'>You feel like exposing yourself to the world.</span>"
|
||||
lose_text = "<span class='notice'>Indecent exposure doesn't sound as charming to you anymore.</span>"
|
||||
|
||||
/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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user