Files
Bubberstation/code/modules/reagents
_0Steven e0b41e5fe5 Add missing stimulants to All Nighter, make this handled by the reagents and not the quirk (#82306)
## About The Pull Request

So while playing with All Nighter, I noticed lattes don't actually count
for fueling my character's crippling coffee addiction.
Looking into it, this is true, the list for which reagents count as
stimulants for All Nighter is quite small:

fa0ef6b4b6/code/datums/quirks/negative_quirks/all_nighter.dm (L25-L37)
And importantly, includes _none_ of the coffee or tea derivatives.
But, in the process of adding everything I thought would have a high
enough caffeine content, this list ended up quite big.
More than doubled in size big.

Which is _bad_, because when you haven't slept the quirk loops over
every single reagent in that list to check if you have it, _every single
process call_.

fa0ef6b4b6/code/datums/quirks/negative_quirks/all_nighter.dm (L84-L101)
Soooo, ideally, we probably don't want that.

But hey, upshot, we have this whole system for reagents to just give you
a trait while metabolized and remove it when you're done.

fa0ef6b4b6/code/modules/reagents/chemistry/reagents.dm (L77-L78)
So we make a trait called `TRAIT_STIMULATED`, check for that, and have
each reagent on the list apply it while metabolized.
Now, if we ever feel like it, we can also have other non-reagent stuff
add that trait and have it Just Work.

For ease of reading, the full list of reagents this makes All Nighter
work with is as follows, where `+` denotes it's newly added:

<details>
  <summary>All Nighter Reagents, Complete List</summary>
  
### Coffee &derivatives:
- coffee
- +cafe latte
- +soy latte
- +ice coffee
- +hot ice coffee
- +pumpkin latte
### Alcoholic coffee derivatives:
- +kahlua
- +konococo rumtini
- +irish coffee
- +thirteen loko
### Tea &derivatives:
- tea
- +iced tea
- +letter t
- +arnold palmer
### Energy drinks &derivatives:
- monkey energy
- volt energy
- +space mountain wind
- +demons blood
### Stimulants (drug subtype)
- aranesp
- bath salts
- blastoff
- methamphetamine
- pumpup
- +kronkaine
### Stimulants (medicine subtype)
- stimulants
- +ephedrine
### Powders (if you're insane)
- +coffee powder
- +tea powder

</details>

Note, kahlua is added as it's a coffee liqueur and does contain a not
insignificant amount of caffeine, but due to its lower caffeine levels I
decided its derivatives would be too diluted to matter for the sake of
our poor hasn't-slept-all-night spaceman.
## Why It's Good For The Game

In play it's annoying and unexpected that it works to drink tea but not
iced tea and coffee but not latte, not the third arguably energy drink,
and neither do some of the stimulants work. These inconsistencies would
drive me mad if I actually played more than I coded.
Either way, this lets you fuel your sleep deprivation in _style_.

Code-wise, I imagine using a trait applied on start of metabolization is
much saner than looping over and checking for every reagent in the list
every process tick, especially with a bigger list.
## Changelog
🆑
code: Whether something counts as a stimulant to All Nighter is now
handled by the reagent itself when metabolized, for everyone's sanity.
Side-effect, you need a liver to process stimulants for All Nighter.
balance: Fuel your sleep deprivation in style! Made more reagents work
with All Nighter. This includes all coffee/tea variants, a few other
drinks that would have a high enough caffeine level, kronkaine,
ephedrine, and in case you're insane you can straight up eat coffee or
tea grounds.
/🆑
2024-03-31 14:56:29 +02:00
..