Skip to content

Commit

Permalink
Merge pull request #2682 from Fluffy-Frontier/upstream-mirror-1736
Browse files Browse the repository at this point in the history
[MIRROR] Add missing stimulants to All Nighter, make this handled by the reagents and not the quirk
  • Loading branch information
mogeoko authored Mar 31, 2024
2 parents 17d02d9 + 258746c commit ea11def
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 24 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_COAGULATING "coagulating"
/// From anti-convulsant medication against seizures.
#define TRAIT_ANTICONVULSANT "anticonvulsant"
/// From stimulant reagents, this affects whether the all-nighter lack of sleep penalty should be countered
#define TRAIT_STIMULATED "stimulated"
/// The holder of this trait has antennae or whatever that hurt a ton when noogied
#define TRAIT_ANTENNAE "antennae"
/// Blowing kisses actually does damage to the victim
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 @@ -438,6 +438,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_STABLEHEART" = TRAIT_STABLEHEART,
"TRAIT_STABLELIVER" = TRAIT_STABLELIVER,
"TRAIT_STASIS" = TRAIT_STASIS,
"TRAIT_STIMULATED" = TRAIT_STIMULATED,
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
"TRAIT_STUNIMMUNE" = TRAIT_STUNIMMUNE,
"TRAIT_SUCCUMB_OVERRIDE" = TRAIT_SUCCUMB_OVERRIDE,
Expand Down
21 changes: 2 additions & 19 deletions code/datums/quirks/negative_quirks/all_nighter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@
/obj/item/pillow/random,
)

///a list of all the reagents which alleviate the negative moodlet
var/list/stimulants = list(
/datum/reagent/medicine/stimulants,
/datum/reagent/drug/methamphetamine,
/datum/reagent/drug/bath_salts,
/datum/reagent/drug/aranesp,
/datum/reagent/drug/pumpup,
/datum/reagent/drug/blastoff,
/datum/reagent/consumable/coffee,
/datum/reagent/consumable/tea,
/datum/reagent/consumable/volt_energy,
/datum/reagent/consumable/monkey_energy
)
///essentially our "sleep bank". sleeping charges it up and its drained while awake
var/five_more_minutes = 0
///the overlay we put over the eyes
Expand Down Expand Up @@ -84,7 +71,6 @@
/datum/quirk/all_nighter/process(seconds_per_tick)
var/happy_camper = TRUE
var/beauty_sleep = TRUE
var/stims_present = FALSE

if(quirk_holder.IsSleeping())
five_more_minutes += SLEEP_BANK_MULTIPLIER * seconds_per_tick
Expand All @@ -93,11 +79,8 @@
else
beauty_sleep = FALSE //no sleep means eye bags

for(var/stimulant in stimulants)
if(quirk_holder.has_reagent(stimulant)) //checking for stims
stims_present = TRUE
break
if(!stims_present) //no stims and no sleep means an unhappy camper
// Defining which reagents count is handled by the reagents
if(!HAS_TRAIT(quirk_holder, TRAIT_STIMULATED))
happy_camper = FALSE

//adjusts the mood event accordingly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
boozepwr = 45
ph = 6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -230,6 +231,7 @@
overdose_threshold = 60
taste_description = "jitters and death"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -867,6 +869,7 @@
quality = DRINK_NICE
taste_description = "giving up on the day"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/ethanol/margarita
name = "Margarita"
Expand Down Expand Up @@ -966,6 +969,7 @@
quality = DRINK_VERYGOOD
taste_description = "sweet tasting iron"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/ethanol/demonsblood/on_mob_metabolize(mob/living/metabolizer)
. = ..()
Expand Down Expand Up @@ -2876,6 +2880,7 @@
quality = DRINK_VERYGOOD
taste_description = "coconut coffee"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/ethanol/blue_hawaiian //pineapple juice, lemon juice, coconut rum, blue curacao
name = "Blue Hawaiian"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
taste_description = "bitterness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_STOCK

metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/coffee/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand All @@ -289,6 +289,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_STOCK
default_container = /obj/item/reagent_containers/cup/glass/mug/tea
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -361,6 +362,7 @@
nutriment_factor = 0
taste_description = "bitter coldness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand All @@ -377,6 +379,7 @@
nutriment_factor = 0
taste_description = "bitter coldness and a hint of smoke"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/hot_ice_coffee/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand All @@ -395,6 +398,7 @@
nutriment_factor = 0
taste_description = "sweet tea"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/icetea/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -522,6 +526,7 @@
color = "#102000" // rgb: 16, 32, 0
taste_description = "sweet citrus soda"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -656,6 +661,7 @@
overdose_threshold = 60
taste_description = "barbecue and nostalgia"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/monkey_energy/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -701,6 +707,7 @@
taste_description = "creamy coffee"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand All @@ -723,6 +730,7 @@
taste_description = "bitter cream"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -849,6 +857,7 @@
nutriment_factor = 3
taste_description = "creamy pumpkin"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/gibbfloats
name = "Gibb Floats"
Expand Down Expand Up @@ -1201,6 +1210,7 @@
color = "#583d09" // rgb: 88, 61, 9
taste_description = "one of your 26 favorite letters"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/t_letter/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -1240,6 +1250,7 @@
color = "#99E550"
taste_description = "sour pear"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/consumable/volt_energy/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
. = ..()
Expand Down
8 changes: 6 additions & 2 deletions code/modules/reagents/chemistry/reagents/drug_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
ph = 5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 12) //4.8 per 2 seconds
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/drug/methamphetamine/on_new(data)
. = ..()
Expand Down Expand Up @@ -210,7 +211,7 @@
addiction_types = list(/datum/addiction/stimulants = 25) //8 per 2 seconds
ph = 8.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STUNIMMUNE, TRAIT_SLEEPIMMUNE, TRAIT_ANALGESIA)
metabolized_traits = list(TRAIT_STUNIMMUNE, TRAIT_SLEEPIMMUNE, TRAIT_ANALGESIA, TRAIT_STIMULATED)
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage

/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/affected_mob)
Expand Down Expand Up @@ -259,6 +260,7 @@
color = "#78FFF0"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 8)
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
Expand Down Expand Up @@ -327,7 +329,7 @@
overdose_threshold = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 6) //2.6 per 2 seconds
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA)
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA, TRAIT_STIMULATED)

/datum/reagent/drug/pumpup/on_mob_metabolize(mob/living/carbon/affected_mob)
. = ..()
Expand Down Expand Up @@ -546,6 +548,7 @@
overdose_threshold = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 15)
metabolized_traits = list(TRAIT_STIMULATED)
///How many flips have we done so far?
var/flip_count = 0
///How many spin have we done so far?
Expand Down Expand Up @@ -773,6 +776,7 @@
metabolization_rate = 0.75 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 20)
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/drug/kronkaine/on_new(data)
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/medicine_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
addiction_types = list(/datum/addiction/stimulants = 4) //1.6 per 2 seconds
inverse_chem = /datum/reagent/inverse/corazargh
inverse_chem_val = 0.4
metabolized_traits = list(TRAIT_BATON_RESISTANCE)
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_STIMULATED)

/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/affected_mob)
. = ..()
Expand Down Expand Up @@ -1130,7 +1130,7 @@
ph = 8.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
addiction_types = list(/datum/addiction/stimulants = 4) //0.8 per 2 seconds
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA)
metabolized_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_ANALGESIA, TRAIT_STIMULATED)

/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/affected_mob)
. = ..()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/reagents/chemistry/reagents/toxin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@
toxpwr = 0.5
ph = 4.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/toxin/teapowder
name = "Ground Tea Leaves"
Expand All @@ -521,6 +522,7 @@
taste_description = "green tea"
ph = 4.9
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolized_traits = list(TRAIT_STIMULATED)

/datum/reagent/toxin/mushroom_powder
name = "Mushroom Powder"
Expand Down

0 comments on commit ea11def

Please sign in to comment.