mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Alcohol Tweaks (#530)
- bugfix: "Fixed dizziness effects on alcohol, psilocybin, and cryptobiolin taking a long to start up and sometimes never starting for low doses" - tweak: "Sip size from alcohol bottles is now the same as for glasses, which is half what it was" - tweak: "Rebalanced all alcoholic drinks with more believable alcohol values, and adjusted alcohol metabolism. Generally drinks are stronger but metabolise more slowly, pace yourself!" - rscadd: "Different species now have varying susceptibility to alcohol. Tajarans get drunk slightly faster, skrell are twice as fast as humans, unathi can drink more, and vaurca get drunk very slowly, but alcohol poisons them" - bugfix: "Dousing people in alcohol and setting them on fire, now only works with spirits and liqeurs stronger than 40% ABV, and the heat of the resulting fire is based on the strength"
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
var/list/chem_effects = list()
|
||||
var/intoxication = 0//Units of alcohol in their system
|
||||
var/datum/reagents/metabolism/bloodstr = null
|
||||
var/datum/reagents/metabolism/ingested = null
|
||||
var/datum/reagents/metabolism/touching = null
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#define AE_DIZZY 5
|
||||
#define AE_SLURRING 15
|
||||
#define AE_CONFUSION 18
|
||||
#define AE_CLUMSY 22
|
||||
#define AE_BLURRING 25
|
||||
#define AE_VOMIT 40
|
||||
#define AE_DROWSY 55
|
||||
#define AE_OVERDOSE 70
|
||||
#define AE_BLACKOUT 80
|
||||
|
||||
#define BASE_DIZZY 100
|
||||
|
||||
#define ALCOHOL_FILTRATION_RATE 0.02//The base rate at which intoxication decreases per proc. this is actually multiplied by 3 most of the time if the liver is healthy
|
||||
#define BASE_VOMIT_CHANCE 2
|
||||
#define VOMIT_CHANCE_SCALE 0.2//An extra 1% for every 5 units over the vomiting threshold
|
||||
|
||||
var/mob/living/carbon/human/alcohol_clumsy = 0
|
||||
|
||||
//This proc handles the effects of being intoxicated. Removal of intoxication is done elswhere: By the liver, in organ_internal.dm
|
||||
/mob/living/carbon/human/proc/handle_intoxication()
|
||||
var/SR = species.ethanol_resistance
|
||||
if (SR == -1)
|
||||
//This species can't get drunk, how did we even get here?
|
||||
intoxication = 0
|
||||
return
|
||||
|
||||
if(intoxication > AE_DIZZY*SR) // Early warning
|
||||
if (dizziness == 0)
|
||||
src << "<span class='notice'>The room starts spinning!</span>"
|
||||
var/target_dizziness = min(1000,(BASE_DIZZY + ((intoxication - AE_DIZZY*SR)*10)/SR))
|
||||
make_dizzy(target_dizziness - dizziness) // We will repeatedly set our target dizziness to a desired value based on intoxication level
|
||||
|
||||
if(intoxication > AE_SLURRING*SR) // Slurring
|
||||
slurring = max(slurring, 30)
|
||||
|
||||
if(intoxication > AE_CONFUSION*SR) // Confusion - walking in random directions
|
||||
if (confused == 0)
|
||||
src << "<span class='notice'>You feel unsteady on your feet!</span>"
|
||||
confused = max(confused, 20)
|
||||
|
||||
//Make the drinker temporarily clumsy if intoxication is high enough
|
||||
//We use a var to track if alcohol caused it, we won't add nor remove it if the drinker was already clumsy from some other source
|
||||
if(intoxication > AE_CLUMSY*SR)
|
||||
if (!alcohol_clumsy && !(CLUMSY in mutations))
|
||||
src << "<span class='notice'>You feel a bit clumsy and uncoordinated.</span>"
|
||||
mutations.Add(CLUMSY)
|
||||
alcohol_clumsy = 1
|
||||
else //Remove it if intoxication drops too low. We'll also have another check to remove it in life.dm
|
||||
if (alcohol_clumsy)
|
||||
src << "<span class='notice'>You feel more sober and steady</span>"
|
||||
mutations.Remove(CLUMSY)
|
||||
alcohol_clumsy = 0
|
||||
|
||||
if(intoxication > AE_BLURRING*SR) // Blurry vision
|
||||
if (prob(10))//blurry vision effect is annoying, so nerfing it
|
||||
eye_blurry = max(eye_blurry, 2)
|
||||
|
||||
if(intoxication > AE_DROWSY*SR) // Drowsyness - periodically falling asleep
|
||||
drowsyness = max(drowsyness, 20)
|
||||
|
||||
if(intoxication > AE_VOMIT*SR)//Vomiting, the body's natural defense mechanism against poisoning.
|
||||
if (life_tick % 4 == 1)//Only process vomit chance periodically
|
||||
var/chance = BASE_VOMIT_CHANCE + ((intoxication - AE_VOMIT)*VOMIT_CHANCE_SCALE)
|
||||
if (prob(chance))
|
||||
delayed_vomit()
|
||||
|
||||
if(intoxication > AE_OVERDOSE*SR) // Toxic dose
|
||||
add_chemical_effect(CE_ALCOHOL_TOXIC, 1)
|
||||
|
||||
if(intoxication > AE_BLACKOUT*SR) // Pass out
|
||||
paralysis = max(paralysis, 20)
|
||||
sleeping = max(sleeping, 30)
|
||||
@@ -910,6 +910,12 @@
|
||||
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
|
||||
if(!(status_flags & GODMODE)) adjustToxLoss(total_phoronloss)
|
||||
|
||||
if (intoxication)
|
||||
handle_intoxication()
|
||||
else if (alcohol_clumsy)//This var is defined in intoxication.dm, its set true when alcohol has caused clumsiness
|
||||
mutations.Remove(CLUMSY)
|
||||
alcohol_clumsy = 0
|
||||
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
|
||||
var/obj/item/organ/diona/node/light_organ = locate() in internal_organs
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
var/holder_type
|
||||
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
|
||||
var/rarity_value = 1 // Relative rarity/collector value for this species.
|
||||
var/ethanol_resistance = 1 // How well the mob resists alcohol, lower values get drunk faster, higher values need to drink more
|
||||
|
||||
// Determines the organs that the species spawns with and
|
||||
var/list/has_organ = list( // which required-organ checks are conducted.
|
||||
"heart" = /obj/item/organ/heart,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
primitive_form = "Stok"
|
||||
darksight = 3
|
||||
gluttonous = 1
|
||||
ethanol_resistance = 1.5
|
||||
|
||||
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
|
||||
Uuosa-Eso system, which roughly translates to 'burning mother'.<br/><br/>Coming from a harsh, radioactive \
|
||||
@@ -76,6 +77,7 @@
|
||||
darksight = 8
|
||||
slowdown = -1
|
||||
brute_mod = 1.2
|
||||
ethanol_resistance = 0.8//Gets drunk a little faster
|
||||
|
||||
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
|
||||
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
|
||||
@@ -132,6 +134,7 @@
|
||||
base_color = "#006666"
|
||||
|
||||
reagent_tag = IS_SKRELL
|
||||
ethanol_resistance = 0.5//gets drunk faster
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
@@ -147,6 +150,7 @@
|
||||
siemens_coefficient = 0.3
|
||||
eyes = "blank_eyes"
|
||||
show_ssd = "completely quiescent"
|
||||
ethanol_resistance = -1//Can't get drunk
|
||||
|
||||
|
||||
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
|
||||
@@ -232,6 +236,7 @@
|
||||
language = "Tradeband"
|
||||
unarmed_types = list(/datum/unarmed_attack/punch)
|
||||
rarity_value = 2
|
||||
ethanol_resistance = -1//Can't get drunk
|
||||
|
||||
eyes = "blank_eyes"
|
||||
brute_mod = 0.5
|
||||
@@ -284,6 +289,7 @@
|
||||
warning_low_pressure = 50
|
||||
hazard_low_pressure = 0
|
||||
siemens_coefficient = 0 //attempting to mimic the old insulation feature.
|
||||
ethanol_resistance = 2
|
||||
breath_type = "oxygen"
|
||||
poison_type = "null" //a species that breathes plasma shouldn't be poisoned by it.
|
||||
blurb = "Vaurca are a bipedal insectoid species from the first moon of Sedantis I. \
|
||||
|
||||
@@ -711,6 +711,9 @@ proc/is_blind(A)
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
nutrition -= 40
|
||||
if (intoxication)//The pain and system shock of vomiting, sobers you up a little
|
||||
intoxication *= 0.8
|
||||
|
||||
if (istype(src, /mob/living/carbon/human))
|
||||
ingested.trans_to_turf(location,30)//Vomiting empties the stomach, transferring 30u reagents to the floor where you vomited
|
||||
else
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
|
||||
move_delay = world.time + tickcomp
|
||||
//drunk driving
|
||||
if(mob.confused)
|
||||
if(mob.confused && prob(20))
|
||||
direct = pick(cardinal)
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
if((!l_hand || l_hand.is_stump()) && (!r_hand || r_hand.is_stump()))
|
||||
return // No hands to drive your chair? Tough luck!
|
||||
//drunk wheelchair driving
|
||||
if(mob.confused)
|
||||
if(mob.confused && prob(20))
|
||||
direct = pick(cardinal)
|
||||
move_delay += 2
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
@@ -338,7 +338,7 @@
|
||||
M.animate_movement = 2
|
||||
return
|
||||
|
||||
else if(mob.confused)
|
||||
else if(mob.confused && prob(20))
|
||||
step(mob, pick(cardinal))
|
||||
else
|
||||
. = mob.SelfMove(n, direct)
|
||||
|
||||
Reference in New Issue
Block a user