Adds the Hypersensitive and Light Drinker quirks (#41984)

* newquirks

* revert

* hypersensitive/light drinker

* this is a commit

* may as well

* increments + fix

* i never liked math anyway

* I really dont like math
This commit is contained in:
Mickyan
2018-12-18 21:03:57 +01:00
committed by yogstation13-bot
parent 4facefec0d
commit 87d4021375
5 changed files with 36 additions and 7 deletions

View File

@@ -86,6 +86,7 @@
#define TRAIT_TAGGER "tagger" #define TRAIT_TAGGER "tagger"
#define TRAIT_PHOTOGRAPHER "photographer" #define TRAIT_PHOTOGRAPHER "photographer"
#define TRAIT_MUSICIAN "musician" #define TRAIT_MUSICIAN "musician"
#define TRAIT_LIGHT_DRINKER "light_drinker"
// common trait sources // common trait sources
#define TRAIT_GENERIC "generic" #define TRAIT_GENERIC "generic"

View File

@@ -16,7 +16,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
/datum/controller/subsystem/processing/quirks/Initialize(timeofday) /datum/controller/subsystem/processing/quirks/Initialize(timeofday)
if(!quirks.len) if(!quirks.len)
SetupQuirks() SetupQuirks()
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion")) quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"))
return ..() return ..()
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks() /datum/controller/subsystem/processing/quirks/proc/SetupQuirks()

View File

@@ -18,13 +18,13 @@
/datum/quirk/apathetic/add() /datum/quirk/apathetic/add()
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
if(mood) if(mood)
mood.mood_modifier = 0.8 mood.mood_modifier -= 0.2
/datum/quirk/apathetic/remove() /datum/quirk/apathetic/remove()
if(quirk_holder) if(quirk_holder)
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
if(mood) if(mood)
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers. mood.mood_modifier += 0.2
/datum/quirk/drunkhealing /datum/quirk/drunkhealing
name = "Drunken Resilience" name = "Drunken Resilience"

View File

@@ -188,6 +188,32 @@
lose_text = "<span class='notice'>You feel awake again.</span>" lose_text = "<span class='notice'>You feel awake again.</span>"
medical_record_text = "Patient has abnormal sleep study results and is difficult to wake up." medical_record_text = "Patient has abnormal sleep study results and is difficult to wake up."
/datum/quirk/hypersensitive
name = "Hypersensitive"
desc = "For better or worse, everything seems to affect your mood more than it should."
value = -1
gain_text = "<span class='danger'>You seem to make a big deal out of everything.</span>"
lose_text = "<span class='notice'>You don't seem to make a big deal out of everything anymore.</span>"
/datum/quirk/hypersensitive/add()
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
if(mood)
mood.mood_modifier += 0.5
/datum/quirk/hypersensitive/remove()
if(quirk_holder)
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
if(mood)
mood.mood_modifier -= 0.5
/datum/quirk/light_drinker
name = "Light Drinker"
desc = "You just can't handle your drinks and get drunk very quickly."
value = -1
mob_trait = TRAIT_LIGHT_DRINKER
gain_text = "<span class='notice'>Just the thought of drinking alcohol makes your head spin.</span>"
lose_text = "<span class='danger'>You're no longer severely affected by alcohol.</span>"
/datum/quirk/nearsighted //t. errorage /datum/quirk/nearsighted //t. errorage
name = "Nearsighted" name = "Nearsighted"
desc = "You are nearsighted without prescription glasses, but spawn with a pair." desc = "You are nearsighted without prescription glasses, but spawn with a pair."

View File

@@ -39,6 +39,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/booze_power = boozepwr var/booze_power = boozepwr
if(C.has_trait(TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker if(C.has_trait(TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker
booze_power *= 0.7 booze_power *= 0.7
if(C.has_trait(TRAIT_LIGHT_DRINKER))
booze_power *= 2
C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER) var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
if (istype(L)) if (istype(L))