Alcoholism overhaul (#19179)

Takes on feedback from the implementation of the previous alcoholism
overhaul, and applies fixes to it to make things better, generally.

- Fixed up alcohol and butanol affect_ingest() to improve the logic
flow, and fix bugs where Unathi were able to drink alcohol without being
poisoned. Non-Unathi are now no longer intoxicated by butanol, as well.

- Better intoxication messages.

- Generally buffed intoxication resistances for Unathi, Tajara, and
Skrell, to compensate for recent changes to intoxication potency. Unathi
are MUCH more resistant to intoxication now (total resistance increased
from 0.4 to 0.8, which is slightly less than Tajara now) however they
can no longer drink alcohol at all without getting poisoned.

- Alcohol poisoning now does not kill by giving you liver damage and
MSOF, but by suppressing, and eventually stopping breathing.

- Ethylredoxrazine now prevents people from falling into comas from
alcohol toxicity alltogether.

- Vomiting from being intoxicated now happens much less often.

- Being drunk enough to cause vomiting now has a pulsing message to go
along with other drunkeness messages.

- You can now correctly black out or fall into an alcoholic coma while
buckled to a bed or laying down.

---------

Signed-off-by: Crosarius <30341877+Crosarius@users.noreply.github.com>
This commit is contained in:
Crosarius
2024-05-23 19:22:44 +00:00
committed by GitHub
parent 6af1078e19
commit 7bdf4cafa5
10 changed files with 124 additions and 86 deletions
@@ -167,26 +167,7 @@
return
/singleton/reagent/alcohol/affect_ingest(mob/living/carbon/M, alien, removed, var/datum/reagents/holder)
if(alien != IS_DIONA)
M.intoxication += (strength / 100) * removed * 6
if (druggy != 0)
M.druggy = max(M.druggy, druggy)
if (halluci)
M.hallucination = max(M.hallucination, halluci)
if(caffeine)
M.add_chemical_effect(CE_PULSE, caffeine*2)
M.add_up_to_chemical_effect(CE_SPEEDBOOST, 1)
if (adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055
M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
if (adj_temp < 0 && M.bodytemperature > targ_temp)
M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
if(ishuman(M))
if(alien != IS_DIONA && ishuman(M))
var/has_valid_aug = FALSE
var/obj/item/organ/internal/augment/ethanol_burner/aug = M.internal_organs_by_name[BP_AUG_ETHANOL_BURNER]
if(aug && !aug.is_broken())
@@ -194,13 +175,31 @@
var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"]
if(!has_valid_aug && (alien == IS_VAURCA || (istype(P) && P.stage >= 3)))//Vaurca are damaged instead of getting nutrients, but they can still get drunk
M.adjustToxLoss(1.5 * removed * (strength / 100))
else
M.adjustToxLoss(12 * removed * (strength / 100))
if (!has_valid_aug && alien == IS_UNATHI) //unathi are poisoned by alcohol as well
M.adjustToxLoss(12 * removed * (strength / 100))
if(!M.lastpuke)
to_chat(M, SPAN_WARNING("Your gizzard lurches as the alcohol burns its way down your gullet!"))//Make it clear that you should not be drinking this.
var/mob/living/carbon/human/H = M
H.delayed_vomit()
if (has_valid_aug | alien != IS_UNATHI)
M.intoxication += (strength / 100) * removed * 6
if (druggy != 0)
M.druggy = max(M.druggy, druggy)
if (halluci)
M.hallucination = max(M.hallucination, halluci)
if(caffeine)
M.add_chemical_effect(CE_PULSE, caffeine*2)
M.add_up_to_chemical_effect(CE_SPEEDBOOST, 1)
M.adjustNutritionLoss(-nutriment_factor * removed)
M.adjustHydrationLoss(-hydration_factor * removed)
if (!has_valid_aug && alien == IS_UNATHI)//unathi are poisoned by alcohol as well
M.adjustToxLoss(1.5 * removed * (strength / 100))
if (adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055
M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
if (adj_temp < 0 && M.bodytemperature > targ_temp)
M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
/singleton/reagent/alcohol/touch_obj(var/obj/O, var/amount, var/datum/reagents/holder)
if(istype(O, /obj/item/paper))
@@ -243,7 +242,7 @@
description = "A fairly harmless alcohol that has intoxicating effects on certain species."
reagent_state = LIQUID
color = "#404030"
ingest_met = REM * 0.25 //Extremely slow metabolic rate means the liver will generally purge it faster than it can intoxicate you
ingest_met = REM * 2.5
flammability_divisor = 7 //Butanol is a bit less flammable than ethanol
taste_description = "alcohol"
@@ -257,19 +256,26 @@
distillation_point = T0C + 117.7
/singleton/reagent/alcohol/butanol/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed, var/datum/reagents/holder)
if(!istype(M))
return
var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"]
if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3))
M.adjustToxLoss(removed * (strength / 100))
else
if (alien == IS_UNATHI)
M.intoxication += (strength / 100) * removed * 6
if (druggy != 0)
M.druggy = max(M.druggy, druggy)
if (halluci)
M.hallucination = max(M.hallucination, halluci)
if(caffeine)
M.add_chemical_effect(CE_PULSE, caffeine*2)
M.add_up_to_chemical_effect(CE_SPEEDBOOST, 1)
M.adjustNutritionLoss(-nutriment_factor * removed)
M.adjustHydrationLoss(-hydration_factor * removed)
if (alien == IS_UNATHI)
ingest_met = initial(ingest_met)*9
..()
if (adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055
M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
if (adj_temp < 0 && M.bodytemperature > targ_temp)
M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT))
else
strength = 0 //Only Unathi are intoxicated by butanol.
..()
/singleton/reagent/hydrazine
name = "Hydrazine"
@@ -2727,7 +2727,7 @@
if(!istype(M))
return
if(alien == IS_VAURCA)
M.intoxication += (strength / 100) * removed * 3.5
M.intoxication += (strength / 100) * removed * 6
/singleton/reagent/drink/toothpaste/cold_gate
name = "Cold Gate"