-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Smooth the alcohol impairment curve because a bottle of vodka should …
…last more than 5 minutes (#1793) * alcohol processing changes * add temporary message about TM * stop light drinker from making you insta-sick * modularize it * fix lints * proc documentation * switch fix * remove TM Only warning
- Loading branch information
1 parent
108a4cd
commit 821cccc
Showing
7 changed files
with
100 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
modular_nova/modules/alcohol_processing/code/alcohol_processing.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#define BAC_STAGE_1_ACTIVE 0.01 | ||
#define BAC_STAGE_2_WARN 0.05 | ||
#define BAC_STAGE_2_ACTIVE 0.07 | ||
#define BAC_STAGE_3_WARN 0.11 | ||
#define BAC_STAGE_3_ACTIVE 0.13 | ||
#define BAC_STAGE_4_WARN 0.17 | ||
#define BAC_STAGE_4_ACTIVE 0.19 | ||
#define BAC_STAGE_5_WARN 0.23 | ||
|
||
/datum/reagent/consumable/ethanol | ||
metabolization_rate = 0.3 * REAGENTS_METABOLISM | ||
|
||
/atom/movable/screen/alert/status_effect/drunk | ||
desc = "All that alcohol you've been drinking is impairing your speech, \ | ||
motor skills, and mental cognition. Make sure to act like it. \ | ||
Check your current drunkenness level using your mood status." | ||
|
||
/// Adds a moodlet entry based on if the mob currently has alcohol processing in their system. | ||
/datum/mood/proc/get_alcohol_processing(mob/user) | ||
if(user.reagents.reagent_list.len) | ||
for(var/datum/reagent/consumable/ethanol/booze in user.reagents.reagent_list) | ||
return span_notice("I'm still processing that alcohol I drank...\n") | ||
|
||
/// Adds a moodlet entry based on the current blood alcohol content of the mob. | ||
/datum/mood/proc/get_drunk_mood(mob/user) | ||
var/mob/living/target = user | ||
var/blood_alcohol_content = target.get_blood_alcohol_content() | ||
switch(blood_alcohol_content) | ||
if(BAC_STAGE_1_ACTIVE to BAC_STAGE_2_WARN) | ||
return span_notice("Had a drink, time to relax!\n") | ||
if(BAC_STAGE_2_WARN to BAC_STAGE_2_ACTIVE) | ||
return span_nicegreen("Now I'm starting to feel that drink.\n") | ||
if(BAC_STAGE_2_ACTIVE to BAC_STAGE_3_WARN) | ||
return span_nicegreen("A bit tipsy, this feels good!\n") | ||
if(BAC_STAGE_3_WARN to BAC_STAGE_3_ACTIVE) | ||
return span_nicegreen("Those drinks are really starting to hit!\n") | ||
if(BAC_STAGE_3_ACTIVE to BAC_STAGE_4_WARN) | ||
return span_nicegreen("I can't remember how many I've had, but I feel great!\n") | ||
if(BAC_STAGE_4_WARN to BAC_STAGE_4_ACTIVE) | ||
return span_warning("I think I've had too much to drink... I should probably stop... drink some water...\n") | ||
if(BAC_STAGE_4_ACTIVE to BAC_STAGE_5_WARN) | ||
return span_bolddanger("I'm not feeling so hot...\n") | ||
if(BAC_STAGE_5_WARN to INFINITY) | ||
return span_bolddanger("Is there a doctor around? I really don't feel good...\n") | ||
|
||
#undef BAC_STAGE_1_ACTIVE | ||
#undef BAC_STAGE_2_WARN | ||
#undef BAC_STAGE_2_ACTIVE | ||
#undef BAC_STAGE_3_WARN | ||
#undef BAC_STAGE_3_ACTIVE | ||
#undef BAC_STAGE_4_WARN | ||
#undef BAC_STAGE_4_ACTIVE | ||
#undef BAC_STAGE_5_WARN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Title: Alcohol Processing | ||
|
||
MODULE ID: ALCOHOL_PROCESSING | ||
|
||
### Description: | ||
|
||
Adjusts the rate of alcohol processing, its effects, and thresholds. Drinks last longer with a smoother up and down for more predictable roleplay drinking. | ||
|
||
### TG Proc Changes: | ||
- EDIT: code/datums/mood.dm > /datum/mood/proc/print_mood(mob/user) | ||
- EDIT: code/datums/status_effects/debuffs/drunk.dm > /datum/status_effect/inebriated/drunk/on_tick_effects(), /datum/status_effect/inebriated/tick() | ||
- EDIT: code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm > /datum/reagent/consumable/ethanol/on_mob_life() | ||
|
||
### Master file additions | ||
|
||
- N/A | ||
|
||
### Included files that are not contained in this module: | ||
|
||
- N/A | ||
|
||
### Credits: | ||
LT3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters