From 1fd16b60b572fc0d85a71a1746b9785216e9cfaf Mon Sep 17 00:00:00 2001
From: Killian <49700375+KillianKirilenko@users.noreply.github.com>
Date: Thu, 23 Mar 2023 09:08:24 +0000
Subject: [PATCH] phase 3
eh, who needs three traits? also, sanity checking on various boozetypes
---
.../species/station/traits_vr/neutral.dm | 15 +-
code/modules/reagents/reagents/dispenser.dm | 15 +-
code/modules/reagents/reagents/food_drinks.dm | 127 +++++++++-------
.../reagents/reagents/food_drinks_vr.dm | 139 +++++++++---------
4 files changed, 154 insertions(+), 142 deletions(-)
diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm
index dd39d19e9d..bf7f19c2a7 100644
--- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm
+++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm
@@ -192,30 +192,19 @@
/datum/trait/neutral/synth_ethanolburner
name = "Ethanol Burner"
- desc = "You are able to gain energy through consuming and processing alcohol. The more alcoholic it is, the more energy you gain. You still can't get drunk though."
+ desc = "You are able to gain energy through consuming and processing alcohol. The more alcoholic it is, the more energy you gain. Doesn't allow you to get drunk by itself (for that, take Ethanol Simulator)."
cost = 0
custom_only = FALSE
can_take = SYNTHETICS
var_changes = list("robo_ethanol_proc" = 1)
- excludes = list(/datum/trait/neutral/synth_ethanol_crude,/datum/trait/neutral/synth_ethanol_sim)
-
-/datum/trait/neutral/synth_ethanol_crude
- name = "Ethanol Burner (Crude)"
- desc = "You are able to gain energy through consuming and processing alcohol. The more alcoholic it is, the more energy you gain. You will suffer almost all the effects of drinking it as well, though you can't die of liver failure."
- cost = 0
- custom_only = FALSE
- can_take = SYNTHETICS
- var_changes = list("robo_ethanol_proc" = 1, "robo_ethanol_drunk" = 1)
- excludes = list(/datum/trait/neutral/synth_ethanolburner,/datum/trait/neutral/synth_ethanol_sim)
/datum/trait/neutral/synth_ethanol_sim
name = "Ethanol Simulator"
- desc = "An unusual modification allows your synthetic body to simulate all but the lethal effects of ingested alcohols."
+ desc = "An unusual modification allows your synthetic body to simulate all but the lethal effects of ingested alcohols. You'll get dizzy, slur your speech, suffer temporary loss of vision and even pass out! But hey, at least you don't have a liver to destroy."
cost = 0
custom_only = FALSE
can_take = SYNTHETICS
var_changes = list("robo_ethanol_drunk" = 1)
- excludes = list(/datum/trait/neutral/synth_ethanolburner,/datum/trait/neutral/synth_ethanol_crude)
/datum/trait/neutral/glowing_eyes
name = "Glowing Eyes"
diff --git a/code/modules/reagents/reagents/dispenser.dm b/code/modules/reagents/reagents/dispenser.dm
index 9602c36df9..2898247a72 100644
--- a/code/modules/reagents/reagents/dispenser.dm
+++ b/code/modules/reagents/reagents/dispenser.dm
@@ -177,14 +177,13 @@
M.Confuse(20)
if(effective_dose >= strength * 4) // Blurry vision
M.eye_blurry = max(M.eye_blurry, 10)
- if((M.species.robo_ethanol_drunk && M.species.robo_ethanol_proc) || !(M.isSynthetic()))
- if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep
- M.drowsyness = max(M.drowsyness, 20)
- if(effective_dose >= strength * 6) // Toxic dose
- M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity)
- if(effective_dose >= strength * 7) // Pass out
- M.Paralyse(20)
- M.Sleeping(30)
+ if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep
+ M.drowsyness = max(M.drowsyness, 20)
+ if(effective_dose >= strength * 6) // Toxic dose
+ M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity)
+ if(effective_dose >= strength * 7) // Pass out
+ M.Paralyse(20)
+ M.Sleeping(30)
if(druggy != 0)
M.druggy = max(M.druggy, druggy)
diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm
index d26773ecb0..e592e07c6c 100644
--- a/code/modules/reagents/reagents/food_drinks.dm
+++ b/code/modules/reagents/reagents/food_drinks.dm
@@ -2577,9 +2577,10 @@
/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(alien == IS_DIONA)
- return
- M.jitteriness = max(M.jitteriness - 3, 0)
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ if(alien == IS_DIONA)
+ return
+ M.jitteriness = max(M.jitteriness - 3, 0)
/datum/reagent/ethanol/beer/lite
name = "Lite Beer"
@@ -2639,7 +2640,8 @@
..()
if(alien == IS_DIONA)
return
- M.dizziness +=5
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ M.dizziness +=5
/datum/reagent/ethanol/firepunch
name = "Fire Punch"
@@ -2671,18 +2673,19 @@
allergen_type = ALLERGEN_COFFEE|ALLERGEN_STIMULANT //Contains coffee or is made from coffee
/datum/reagent/ethanol/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
- if(alien == IS_DIONA)
- return
- ..()
- M.dizziness = max(0, M.dizziness - 5)
- M.drowsyness = max(0, M.drowsyness - 3)
- M.AdjustSleeping(-2)
- if(M.bodytemperature > 310)
- M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
+ if(!(M.isSynthetic()))
+ if(alien == IS_DIONA)
+ return
+ ..()
+ M.dizziness = max(0, M.dizziness - 5)
+ M.drowsyness = max(0, M.drowsyness - 3)
+ M.AdjustSleeping(-2)
+ if(M.bodytemperature > 310)
+ M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
- //if(alien == IS_TAJARA)
- //M.adjustToxLoss(0.5 * removed)
- //M.make_jittery(4) //extra sensitive to caffine
+ //if(alien == IS_TAJARA)
+ //M.adjustToxLoss(0.5 * removed)
+ //M.make_jittery(4) //extra sensitive to caffine
/datum/reagent/ethanol/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
//if(alien == IS_TAJARA)
@@ -2696,7 +2699,8 @@
//if(alien == IS_TAJARA)
//M.adjustToxLoss(4 * REM)
//M.apply_effect(3, STUTTER) //VOREStation Edit end
- M.make_jittery(5)
+ if(!(M.isSynthetic()))
+ M.make_jittery(5)
/datum/reagent/ethanol/coffee/kahlua
name = "Kahlua"
@@ -2800,12 +2804,14 @@
/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(alien == IS_DIONA)
- return
- M.drowsyness = max(0, M.drowsyness - 7)
- if (M.bodytemperature > 310)
- M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
- M.make_jittery(5)
+
+ if(!(M.isSynthetic()))
+ if(alien == IS_DIONA)
+ return
+ M.drowsyness = max(0, M.drowsyness - 7)
+ if (M.bodytemperature > 310)
+ M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
+ M.make_jittery(5)
/datum/reagent/ethanol/vermouth
name = "Vermouth"
@@ -2835,7 +2841,8 @@
/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- M.apply_effect(max(M.radiation - 1 * removed, 0), IRRADIATE, check_protection = 0)
+ if(!(M.isSynthetic()))
+ M.apply_effect(max(M.radiation - 1 * removed, 0), IRRADIATE, check_protection = 0)
/datum/reagent/ethanol/whiskey
name = "Whiskey"
@@ -2904,16 +2911,18 @@
/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(dose > 30)
- M.adjustToxLoss(2 * removed)
- if(dose > 60 && ishuman(M) && prob(5))
- var/mob/living/carbon/human/H = M
- var/obj/item/organ/internal/heart/L = H.internal_organs_by_name[O_HEART]
- if (L && istype(L))
- if(dose < 120)
- L.take_damage(10 * removed, 0)
- else
- L.take_damage(100, 0)
+
+ if(!(M.isSynthetic()))
+ if(dose > 30)
+ M.adjustToxLoss(2 * removed)
+ if(dose > 60 && ishuman(M) && prob(5))
+ var/mob/living/carbon/human/H = M
+ var/obj/item/organ/internal/heart/L = H.internal_organs_by_name[O_HEART]
+ if (L && istype(L))
+ if(dose < 120)
+ L.take_damage(10 * removed, 0)
+ else
+ L.take_damage(100, 0)
/datum/reagent/ethanol/wine/champagne
name = "Champagne"
@@ -3112,7 +3121,9 @@
/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- M.Stun(2)
+
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ M.Stun(2)
/datum/reagent/ethanol/bilk
name = "Bilk"
@@ -3549,7 +3560,9 @@
/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- M.Weaken(3)
+
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ M.Weaken(3)
/datum/reagent/ethanol/patron
name = "Patron"
@@ -3799,16 +3812,18 @@
/datum/reagent/ethanol/unathiliquor/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(alien == IS_DIONA)
- return
- var/drug_strength = 10
- if(alien == IS_SKRELL)
- drug_strength = drug_strength * 0.8
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ if(alien == IS_DIONA)
+ return
- M.druggy = max(M.druggy, drug_strength)
- if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained())
- step(M, pick(cardinal))
+ var/drug_strength = 10
+ if(alien == IS_SKRELL)
+ drug_strength = drug_strength * 0.8
+
+ M.druggy = max(M.druggy, drug_strength)
+ if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained())
+ step(M, pick(cardinal))
/datum/reagent/ethanol/sakebomb
name = "Sake Bomb"
@@ -4337,19 +4352,21 @@
/datum/reagent/ethanol/godka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
+
+ if(!(M.isSynthetic()))
M.apply_effect(max(M.radiation - 5 * removed, 0), IRRADIATE, check_protection = 0)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(H.species.has_organ[O_LIVER])
- var/obj/item/organ/L = H.internal_organs_by_name[O_LIVER]
- if(!L)
- return
- var/adjust_liver = rand(-3, 2)
- if(prob(L.damage))
- to_chat(M, "You feel woozy...")
- L.damage = max(L.damage + (adjust_liver * removed), 0)
- var/adjust_tox = rand(-4, 2)
- M.adjustToxLoss(adjust_tox * removed)
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.species.has_organ[O_LIVER])
+ var/obj/item/organ/L = H.internal_organs_by_name[O_LIVER]
+ if(!L)
+ return
+ var/adjust_liver = rand(-3, 2)
+ if(prob(L.damage))
+ to_chat(M, "You feel woozy...")
+ L.damage = max(L.damage + (adjust_liver * removed), 0)
+ var/adjust_tox = rand(-4, 2)
+ M.adjustToxLoss(adjust_tox * removed)
/datum/reagent/ethanol/holywine
name = "Angel Ichor"
diff --git a/code/modules/reagents/reagents/food_drinks_vr.dm b/code/modules/reagents/reagents/food_drinks_vr.dm
index f395601c07..1f46f0cfbc 100644
--- a/code/modules/reagents/reagents/food_drinks_vr.dm
+++ b/code/modules/reagents/reagents/food_drinks_vr.dm
@@ -48,10 +48,11 @@
/datum/reagent/ethanol/deathbell/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(dose * strength >= strength) // Early warning
- M.make_dizzy(24) // Intentionally higher than normal to compensate for it's previous effects.
- if(dose * strength >= strength * 2.5) // Slurring takes longer. Again, intentional.
- M.slurring = max(M.slurring, 30)
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ if(dose * strength >= strength) // Early warning
+ M.make_dizzy(24) // Intentionally higher than normal to compensate for it's previous effects.
+ if(dose * strength >= strength * 2.5) // Slurring takes longer. Again, intentional.
+ M.slurring = max(M.slurring, 30)
/datum/reagent/ethanol/burnout
name = "Burnout"
@@ -70,22 +71,23 @@
/datum/reagent/ethanol/burnout/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
// Deathbell effects.
- if(dose * strength >= strength)
- M.make_dizzy(24)
- if(dose * strength >= strength * 2.5)
- M.slurring = max(M.slurring, 30)
- // Simulating heat effects of spice. Without spice.
- if(alien == IS_DIONA || alien == IS_ALRAUNE)
- return
- else if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(!H.can_feel_pain())
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ if(dose * strength >= strength)
+ M.make_dizzy(24)
+ if(dose * strength >= strength * 2.5)
+ M.slurring = max(M.slurring, 30)
+ // Simulating heat effects of spice. Without spice.
+ if(alien == IS_DIONA || alien == IS_ALRAUNE)
return
- else
- if((dose < 5) && (dose == metabolism || prob(5)))
- to_chat(M, "Your insides feel uncomfortably hot!")
- if(dose >= 5 && prob(5))
- M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", pick("You feel like your insides are burning!", "You feel like your insides are on fire!", "You feel like your belly is full of lava!"))
+ else if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(!H.can_feel_pain())
+ return
+ else
+ if((dose < 5) && (dose == metabolism || prob(5)))
+ to_chat(M, "Your insides feel uncomfortably hot!")
+ if(dose >= 5 && prob(5))
+ M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", pick("You feel like your insides are burning!", "You feel like your insides are on fire!", "You feel like your belly is full of lava!"))
/datum/reagent/ethanol/monstertamer
name = "Monster Tamer"
@@ -159,27 +161,28 @@
/datum/reagent/ethanol/monstertamer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(M.species.organic_food_coeff) //it's still food!
- switch(alien)
- if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein.
- if(IS_SKRELL)
- M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
- if(IS_TESHARI)
- M.adjust_nutrition(alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
- if(IS_UNATHI)
- M.adjust_nutrition(alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
- //Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
- //Chimera don't need their own case here since their factors for nutriment and protein cancel out.
- else
- M.adjust_nutrition(alt_nutriment_factor * removed)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(H.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
- H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
- if (H.feral <=0) //check if they're unferalled
- H.feral = 0
- to_chat(H, "Your mind starts to clear, soothed into a state of clarity as your senses return.")
- log_and_message_admins("is no longer feral.", H)
+ if(!(M.isSynthetic()))
+ if(M.species.organic_food_coeff) //it's still food!
+ switch(alien)
+ if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein.
+ if(IS_SKRELL)
+ M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
+ if(IS_TESHARI)
+ M.adjust_nutrition(alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
+ if(IS_UNATHI)
+ M.adjust_nutrition(alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
+ //Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
+ //Chimera don't need their own case here since their factors for nutriment and protein cancel out.
+ else
+ M.adjust_nutrition(alt_nutriment_factor * removed)
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
+ H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
+ if (H.feral <=0) //check if they're unferalled
+ H.feral = 0
+ to_chat(H, "Your mind starts to clear, soothed into a state of clarity as your senses return.")
+ log_and_message_admins("is no longer feral.", H)
/datum/reagent/ethanol/monstertamer/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
@@ -216,10 +219,11 @@
/datum/reagent/ethanol/galacticpanic/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(dose * strength >= strength) // Early warning
- M.make_dizzy(24) // Intentionally higher than normal to compensate for it's previous effects.
- if(dose * strength >= strength * 2.5) // Slurring takes longer. Again, intentional.
- M.slurring = max(M.slurring, 30)
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ if(dose * strength >= strength) // Early warning
+ M.make_dizzy(24) // Intentionally higher than normal to compensate for it's previous effects.
+ if(dose * strength >= strength * 2.5) // Slurring takes longer. Again, intentional.
+ M.slurring = max(M.slurring, 30)
/datum/reagent/ethanol/bulldog
name = "Space Bulldog"
@@ -309,7 +313,9 @@
/datum/reagent/ethanol/russianroulette/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- M.Stun(2)
+
+ if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
+ M.Stun(2)
/datum/reagent/ethanol/lovemaker
name = "The Love Maker"
@@ -460,27 +466,28 @@
/datum/reagent/ethanol/hairoftherat/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
- if(M.species.organic_food_coeff) //it's still food!
- switch(alien)
- if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein.
- if(IS_SKRELL)
- M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
- if(IS_TESHARI)
- M.nutrition += (alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
- if(IS_UNATHI)
- M.nutrition += (alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
- //Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
- //Chimera don't need their own case here since their factors for nutriment and protein cancel out.
- else
- M.nutrition += (alt_nutriment_factor * removed)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(H.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
- H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
- if (H.feral <=0) //check if they're unferalled
- H.feral = 0
- to_chat(H, "Your mind starts to clear, soothed into a state of clarity as your senses return.")
- log_and_message_admins("is no longer feral.", H)
+ if(!(M.isSynthetic()))
+ if(M.species.organic_food_coeff) //it's still food!
+ switch(alien)
+ if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein.
+ if(IS_SKRELL)
+ M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
+ if(IS_TESHARI)
+ M.nutrition += (alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
+ if(IS_UNATHI)
+ M.nutrition += (alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
+ //Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
+ //Chimera don't need their own case here since their factors for nutriment and protein cancel out.
+ else
+ M.nutrition += (alt_nutriment_factor * removed)
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
+ H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
+ if (H.feral <=0) //check if they're unferalled
+ H.feral = 0
+ to_chat(H, "Your mind starts to clear, soothed into a state of clarity as your senses return.")
+ log_and_message_admins("is no longer feral.", H)
/datum/reagent/ethanol/hairoftherat/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()