From e77c820fe31507d443fb2d70eace3eb1ef0df9f6 Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Thu, 23 Mar 2023 01:06:29 +0000 Subject: [PATCH] phase 1 --- .../living/carbon/human/species/species_vr.dm | 3 + .../species/station/traits_vr/neutral.dm | 27 +++++ code/modules/reagents/reagents/dispenser.dm | 104 ++++++++++-------- 3 files changed, 90 insertions(+), 44 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/species_vr.dm b/code/modules/mob/living/carbon/human/species/species_vr.dm index 9d8703d617..ccd2a764be 100644 --- a/code/modules/mob/living/carbon/human/species/species_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_vr.dm @@ -8,6 +8,9 @@ var/organic_food_coeff = 1 var/synthetic_food_coeff = 0 + var/robo_ethanol_proc = 0 //can we get fuel from booze, as a synth? + var/robo_ethanol_drunk = 0 //can we get *drunk* from booze, as a synth? + //var/vore_numbing = 0 var/metabolism = 0.0015 var/lightweight = FALSE //Oof! Nonhelpful bump stumbles. 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 1c3818324a..9781281c16 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 @@ -148,6 +148,33 @@ can_take = SYNTHETICS var_changes = list("organic_food_coeff" = 0, "synthetic_food_coeff" = 0.25) +/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." + 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." + 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" desc = "Your eyes show up above darkness. SPOOKY! And kinda edgey too." diff --git a/code/modules/reagents/reagents/dispenser.dm b/code/modules/reagents/reagents/dispenser.dm index abc0522886..b59f51019e 100644 --- a/code/modules/reagents/reagents/dispenser.dm +++ b/code/modules/reagents/reagents/dispenser.dm @@ -106,6 +106,8 @@ glass_desc = "A well-known alcohol with a variety of applications." allergen_factor = 0.5 //simulates mixed drinks containing less of the allergen, as they have only a single actual reagent unlike food + affects_robots = 1 //VOREStation Addition/Edit + /datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount) ..() if(istype(L)) @@ -124,40 +126,52 @@ strength_mod = 0 if(alien == IS_SLIME) strength_mod *= 2 // VOREStation Edit - M.adjustToxLoss(removed) - - M.add_chemical_effect(CE_ALCOHOL, 1) + + //VOREStation Edits Start var/effective_dose = dose * strength_mod * (1 + volume/60) //drinking a LOT will make you go down faster + if(M.species.robo_ethanol_proc) //failsafe to make sure boozy-bots don't get rekt, since they process out of bloodstream + effective_dose = dose - if(effective_dose >= strength) // Early warning - M.make_dizzy(18) // It is decreased at the speed of 3 per tick - if(effective_dose >= strength * 2) // Slurring - M.slurring = max(M.slurring, 90) - if(effective_dose >= strength * 3) // Confusion - walking in random directions - M.Confuse(60) - if(effective_dose >= strength * 4) // Blurry vision - M.eye_blurry = max(M.eye_blurry, 30) - if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep - M.drowsyness = max(M.drowsyness, 60) - if(effective_dose >= strength * 6) // Toxic dose - M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity*3) - if(effective_dose >= strength * 7) // Pass out - M.Paralyse(60) - M.Sleeping(90) + if(M.isSynthetic() && M.nutrition < 500 && M.species.robo_ethanol_proc) + M.adjust_nutrition(round(max(0,80 - strength) * removed)/30) //the stronger it is, the more juice you gain; really weak stuff gets you nothing + to_world("[M] gained [round(max(0,80-strength))] multiplied by [removed], divided by 30 = [round(max(0,80 - strength) * removed)/30] nutrition this processing tick.") - if(druggy != 0) - M.druggy = max(M.druggy, druggy*3) + if(!(M.isSynthetic()) || M.species.robo_ethanol_drunk) + M.add_chemical_effect(CE_ALCOHOL, 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(effective_dose >= strength) // Early warning + M.make_dizzy(18) // It is decreased at the speed of 3 per tick + if(effective_dose >= strength * 2) // Slurring + M.slurring = max(M.slurring, 90) + if(effective_dose >= strength * 3) // Confusion - walking in random directions + M.Confuse(60) + if(effective_dose >= strength * 4) // Blurry vision + M.eye_blurry = max(M.eye_blurry, 30) - if(halluci) - M.hallucination = max(M.hallucination, halluci*3) + if(druggy != 0) + M.druggy = max(M.druggy, druggy*3) + + 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(halluci) + M.hallucination = max(M.hallucination, halluci*3) + + if(!(M.isSynthetic()) || (M.species.robo_ethanol_drunk && M.species.robo_ethanol_proc)) + if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep + M.drowsyness = max(M.drowsyness, 60) + if(effective_dose >= strength * 6) // Toxic dose + M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity*3) + if(effective_dose >= strength * 7) // Pass out + M.Paralyse(60) + M.Sleeping(90) + //VOREStation Edits End /datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(issmall(M)) removed *= 2 - if(!(M.species.allergens & allergen_type)) //assuming it doesn't cause a horrible reaction, we get the nutrition effects + if(!(M.species.allergens & allergen_type) && !(M.isSynthetic())) //assuming it doesn't cause a horrible reaction, we get the nutrition effects - VOREStation Edit (added synth check) M.adjust_nutrition(nutriment_factor * removed) var/strength_mod = 1 * M.species.alcohol_mod if(alien == IS_SKRELL) @@ -171,26 +185,28 @@ if(alien == IS_SLIME) strength_mod *= 2 // VOREStation Edit - M.adjustToxLoss(removed * 2) - M.add_chemical_effect(CE_ALCOHOL, 1) + if(!(M.isSynthetic())) + M.add_chemical_effect(CE_ALCOHOL, 1) - if(dose * strength_mod >= strength) // Early warning - M.make_dizzy(6) // It is decreased at the speed of 3 per tick - if(dose * strength_mod >= strength * 2) // Slurring - M.slurring = max(M.slurring, 30) - if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions - M.Confuse(20) - if(dose * strength_mod >= strength * 4) // Blurry vision - M.eye_blurry = max(M.eye_blurry, 10) - if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep - M.drowsyness = max(M.drowsyness, 20) - if(dose * strength_mod >= strength * 6) // Toxic dose - M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity) - if(dose * strength_mod >= strength * 7) // Pass out - M.Paralyse(20) - M.Sleeping(30) + if(dose * strength_mod >= strength) // Early warning + M.make_dizzy(6) // It is decreased at the speed of 3 per tick + if(dose * strength_mod >= strength * 2) // Slurring + M.slurring = max(M.slurring, 30) + if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions + M.Confuse(20) + if(dose * strength_mod >= strength * 4) // Blurry vision + M.eye_blurry = max(M.eye_blurry, 10) + if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + M.drowsyness = max(M.drowsyness, 20) + if(dose * strength_mod >= strength * 6) // Toxic dose + M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity) + if(dose * strength_mod >= strength * 7) // Pass out + M.Paralyse(20) + M.Sleeping(30) - if(druggy != 0) - M.druggy = max(M.druggy, druggy) + if(druggy != 0) + M.druggy = max(M.druggy, druggy) + //VOREStation Edits End 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))