From 0700e0c0804503808c6097d5b7b5dffe2146a8e1 Mon Sep 17 00:00:00 2001 From: Fermi Date: Sat, 18 May 2019 03:02:14 +0100 Subject: [PATCH] Near completion - missing Neko's pH paper and reaction vars. --- code/modules/reagents/chemistry/recipes.dm | 31 ++- .../code/datums/mood_events/chem_events.dm | 8 + .../chemistry/reagents/fermi_reagents.dm | 47 +++- .../reagents/chemistry/recipes/FermiCalc.Py | 4 + .../reagents/chemistry/recipes/fermi.dm | 255 ++++++++++++++---- 5 files changed, 267 insertions(+), 78 deletions(-) diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index c0af043757..32155c9b89 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -18,22 +18,21 @@ var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable //FermiChem! - var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions - var/OptimalTempMax = 800 - var/ExplodeTemp = 900 //If any reaction is this hot, it explodes! - var/OptimalpHMin = 5 - var/OptimalpHMax = 10 - var/ReactpHLim = 3 - //var/CatalystFact = C.CatalystFact - var/CatalystFact = 0 - var/CurveSharpT = 2 - var/CurveSharppH = 2 - var/ThermicConstant = 1 - var/HIonRelease = 0.1 - var/RateUpLim = 10 - var/FermiChem = FALSE //If the chemical uses the Fermichem reaction mechanics - var/FermiExplode = FALSE //If the chemical explodes in a special way as a result of - var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this. + var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions + var/OptimalTempMax = 800 // Upper end for above + var/ExplodeTemp = 900 // Temperature at which reaction explodes - If any reaction is this hot, it explodes! + var/OptimalpHMin = 5 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + var/OptimalpHMax = 10 // Higest value for above + var/ReactpHLim = 3 // How far out pH wil react, giving impurity place (Exponential phase) + var/CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst)//Not implemented yet + var/CurveSharpT = 2 // How sharp the temperature exponential curve is (to the power of value) + var/CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value) + var/ThermicConstant = 1 // Temperature change per 1u produced + var/HIonRelease = 0.1 // pH change per 1u reaction + var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect + var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics + var/FermiExplode = FALSE // If the chemical explodes in a special way + var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this. /datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact) diff --git a/modular_citadel/code/datums/mood_events/chem_events.dm b/modular_citadel/code/datums/mood_events/chem_events.dm index e0e4622495..79d8c115d5 100644 --- a/modular_citadel/code/datums/mood_events/chem_events.dm +++ b/modular_citadel/code/datums/mood_events/chem_events.dm @@ -31,3 +31,11 @@ /datum/mood_event/enthrallmissing4 mood_change = -25 description = "I'm all alone, It's so hard to continute without Master...\n" + +/datum/mood_event/InLove + mood_change = 10 + description = "I'm in love!!\n" + +/datum/mood_event/MissingLove + mood_change = -10 + description = "I can't keep my crush off my mind, I need to see them again!\n" diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm index d03b07b8e1..bf0aace161 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -582,7 +582,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING //TODO - fail reaction explosion makes breasts and baps you with them. /datum/reagent/fermi/BElarger name = "Sucubus milk" - id = "BEenlager" + id = "BElarger" description = "A volatile collodial mixture derived from milk that encourages mammary production via a potent estrogen mix." color = "#E60584" // rgb: 96, 0, 255 taste_description = "a milky ice cream like flavour." @@ -800,9 +800,9 @@ Buginess level: works as intended - except teleport makes sparks for some reason /datum/reagent/fermi/astral/on_mob_life(mob/living/M) // Gives you the ability to astral project for a moment! M.alpha = 255//Reset addiction + antiGenetics = 255 switch(current_cycle) if(0)//Require a minimum - M.alpha = 255 origin = M if (G == null) G = new(get_turf(M.loc)) @@ -1023,7 +1023,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y /datum/reagent/fermi/enthrall name = "MKUltra" - id = "enthral" + id = "enthrall" description = "A forbidden deep red mixture that overwhelms a foreign body with waves of pleasure, intoxicating them into servitude. When taken by the creator, it will enhance the draw of their voice to those affected by it." color = "#2C051A" // rgb: , 0, 255 taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses" @@ -1111,11 +1111,46 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y M.adjustBrainLoss(0.2) ..() +//Creates a gas cloud when the reaction blows up, causing everyone in it to fall in love with someone/something while it's in their system. +/datum/reagent/fermi/enthrallExplo//Created in a gas cloud when it explodes + name = "MKUltra" + id = "enthrallExplo" + description = "A forbidden deep red mixture that overwhelms a foreign body with waves of pleasure, intoxicating them into servitude. When taken by the creator, it will enhance the draw of their voice to those affected by it." + color = "#2C051A" // rgb: , 0, 255 + metabolization_rate = 0.1 + taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses" + var/mob/living/carbon/love + +/datum/reagent/fermi/enthrallExplo/on_mob_life(mob/living/carbon/M)//Love gas, only affects while it's in your system. + if(!M.has_status_effect(STATUS_EFFECT_INLOVE)) + var/list/seen = viewers(7, get_turf(M))//Sound and sight checkers + if(!seen) + return + love = seen + M.apply_status_effect(STATUS_EFFECT_INLOVE, love) + to_chat(M, "You develop deep feelings for [love], your heart beginning to race as you look upon them with new eyes.") + else + if(get_dist(M, love) < 8) + //if(M.has_trait(TRAIT_NYMPHO)) //Add this back when merged/updated. + M.adjustArousalLoss(5) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "InLove", /datum/mood_event/InLove) + SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "MissingLove") + else + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "MissingLove", /datum/mood_event/MissingLove) + SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "InLove") + ..() + +/datum/reagent/fermi/enthrallExplo/on_mob_delete(mob/living/carbon/M) + M.remove_status_effect(STATUS_EFFECT_INLOVE) + SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "InLove") + SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "MissingLove") + ..() + /datum/reagent/fermi/enthrall/proc/FallInLove(mob/living/carbon/Lover, mob/living/carbon/Love) if(Lover.has_status_effect(STATUS_EFFECT_INLOVE)) - to_chat(Lover, "You are already fully devoted to your love!") + to_chat(Lover, "You are already fully devoted to someone else!") return - to_chat(Lover, "You develop feelings for [Love], and anyone they like.") + to_chat(Lover, "You develop deep feelings for [Love], your heart beginning to race as you look upon them with new eyes.") if(Lover.mind) Lover.mind.store_memory("You are in love with [Love].") Lover.faction |= "[REF(Love)]" @@ -1282,6 +1317,8 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y ..() +/////////////////////////////////////////////////////////////////////////////////////////////// +// MISC FERMICHEM CHEMS FOR SPECIFIC INTERACTIONS ONLY /////////////////////////////////////////////////////////////////////////////////////////////// /datum/reagent/fermi/fermiAcid diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/FermiCalc.Py b/modular_citadel/code/modules/reagents/chemistry/recipes/FermiCalc.Py index d78b49ff30..9ffc057743 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/FermiCalc.Py +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/FermiCalc.Py @@ -5,3 +5,7 @@ Created on Fri May 17 05:12:17 2019 @author: Fermi """ +import numpy +import matplotlib as mpl +import matplotlib.pyplot as plt + diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index 6758c7311a..1d7c4fbf11 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -70,7 +70,7 @@ E.location_created = location //serum -/datum/chemical_reaction/SDGF +/datum/chemical_reaction/fermi/SDGF name = "synthetic-derived growth factor" id = "SDGF" results = list("SDGF" = 3) @@ -91,74 +91,129 @@ RateUpLim = 5 // Optimal/max rate possible if all conditions are perfect FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics FermiExplode = TRUE // If the chemical explodes in a special way + PurityMin = 0.25 -/datum/chemical_reaction/BElarger - name = "" - id = "e" +/datum/chemical_reaction/fermi/SDGF/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction)//Spawns an angery teratoma!! Spooky..! be careful!! TODO: Add teratoma slime subspecies + var/turf/T = get_turf(holder.my_atom) + var/mob/living/simple_animal/slime/S = new(T,"grey")//should work, in theory + S.damage_coeff = list(BRUTE = 0.9 , BURN = 2, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)//I dunno how slimes work cause fire is burny + S.name = "Living teratoma" + S.real_name = "Living teratoma"//horrifying!! + S.rabid = 1//Make them an angery boi, grr grr + to_chat("The cells clump up into a horrifying tumour!") + +/datum/chemical_reaction/fermi/BElarger + name = "Sucubus milk" + id = "BElarger" results = list("Eigenstasium" = 6) required_reagents = list("salglu_solution" = 1, "milk" = 5, "synthflesh" = 2, "silicon" = 2, "aphro" = 2) //FermiChem vars: - OptimalTempMin = 350 // Lower area of bell curve for determining heat based rate reactions - OptimalTempMax = 500 // Upper end for above - ExplodeTemp = 550 //Temperature at which reaction explodes - OptimalpHMin = 4 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) - OptimalpHMax = 9.5 // Higest value for above - ReactpHLim = 2 // How far out pH wil react, giving impurity place (Exponential phase) - CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst) - CurveSharpT = 4 // How sharp the exponential curve is (to the power of value) - ThermicConstant = -2.5 //Temperature change per 1u produced - HIonRelease = 0.01 //pH change per 1u reaction - RateUpLim = 50 //Optimal/max rate possible if all conditions are perfect - FermiChem = TRUE + OptimalTempMin = 200 + OptimalTempMax = 800 + ExplodeTemp = 900 + OptimalpHMin = 5 + OptimalpHMax = 10 + ReactpHLim = 3 + CatalystFact = 0 + CurveSharpT = 2 + CurveSharppH = 2 + ThermicConstant = 1 + HIonRelease = 0.1 + RateUpLim = 10 + FermiChem = FALSE + FermiExplode = TRUE + PurityMin = 0.1 -//Nano-b-gone -/datum/chemical_reaction/naninte_b_gone - name = "Naninte bain" - id = "naninte_b_gone" - results = list("naninte_b_gone" = 5) - required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "salglu_solution" = 3) - mix_message = "the blood and sugar mixes catalysting a hard coating around the synth flesh" - //FermiChem vars: - OptimalTempMin = 450 - OptimalTempMax = 600 - ExplodeTemp = 700 - OptimalpHMin = 6 - OptimalpHMax = 8 - ReactpHLim = 1 - CatalystFact = 0 //To do 1 - CurveSharpT = 4 - CurveSharppH = 2 - ThermicConstant = -2.5 - HIonRelease = 0.01 - RateUpLim = 5 - FermiChem = TRUE - FermiExplode = FALSE +/datum/chemical_reaction/fermi/BElarger/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction) + //var/obj/item/organ/genital/breasts/B = + new /obj/item/organ/genital/breasts(holder.my_atom) + var/list/seen = viewers(5, get_turf(holder.my_atom)) + for(var/mob/M in seen) + to_chat(M, "The reaction suddenly condenses, creating a pair of breasts!")//OwO + ..() -/datum/chemical_reaction/enthral - name = "need a name" - id = "enthral" - results = list("enthral" = 3) +/datum/chemical_reaction/fermi/PElarger //Vars needed + name = "Incubus draft" + id = "PElarger" + results = list("PElarger" = 3) required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1) required_catalysts = list("blood" = 1) //required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10) //FermiChem vars: - OptimalTempMin = 350 // Lower area of bell curve for determining heat based rate reactions - OptimalTempMax = 500 // Upper end for above - ExplodeTemp = 550 // Temperature at which reaction explodes - OptimalpHMin = 4 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) - OptimalpHMax = 9.5 // Higest value for above - ReactpHLim = 2 // How far out pH wil react, giving impurity place (Exponential phase) - CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst) - CurveSharpT = 4 // How sharp the temperature exponential curve is (to the power of value) - CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value) - ThermicConstant = 20 // Temperature change per 1u produced - HIonRelease = 0.01 // pH change per 1u reaction - RateUpLim = 5 // Optimal/max rate possible if all conditions are perfect - FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics - FermiExplode = FALSE // If the chemical explodes in a special way + OptimalTempMin = 200 + OptimalTempMax = 800 + ExplodeTemp = 900 + OptimalpHMin = 5 + OptimalpHMax = 10 + ReactpHLim = 3 + CatalystFact = 0 + CurveSharpT = 2 + CurveSharppH = 2 + ThermicConstant = 1 + HIonRelease = 0.1 + RateUpLim = 10 + FermiChem = FALSE + FermiExplode = TRUE + PurityMin = 0.1 + +/datum/chemical_reaction/fermi/PElarger/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction) + //var/obj/item/organ/genital/penis/nP = + new /obj/item/organ/genital/penis(holder.my_atom) + var/list/seen = viewers(5, get_turf(holder.my_atom)) + for(var/mob/M in seen) + to_chat(M, "The reaction suddenly condenses, creating a penis!")//OwO + ..() + +/datum/chemical_reaction/fermi/astral //Vars needed + name = "Astrogen" + id = "astral" + results = list("astral" = 3) + required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1) + required_catalysts = list("blood" = 1) + //required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10) + //FermiChem vars: + OptimalTempMin = 200 + OptimalTempMax = 800 + ExplodeTemp = 900 + OptimalpHMin = 5 + OptimalpHMax = 10 + ReactpHLim = 3 + CatalystFact = 0 + CurveSharpT = 2 + CurveSharppH = 2 + ThermicConstant = 1 + HIonRelease = 0.1 + RateUpLim = 10 + FermiChem = FALSE + FermiExplode = TRUE + PurityMin = 0.25 -/datum/chemical_reaction/enthral/on_reaction(datum/reagents/holder) +/datum/chemical_reaction/fermi/enthrall //Vars needed + name = "need a name" + id = "enthrall" + results = list("enthrall" = 3) + required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1) + required_catalysts = list("blood" = 1) + //required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10) + //FermiChem vars: + OptimalTempMin = 200 + OptimalTempMax = 800 + ExplodeTemp = 900 + OptimalpHMin = 5 + OptimalpHMax = 10 + ReactpHLim = 3 + CatalystFact = 0 + CurveSharpT = 2 + CurveSharppH = 2 + ThermicConstant = 1 + HIonRelease = 0.1 + RateUpLim = 10 + FermiChem = FALSE + FermiExplode = TRUE + PurityMin = 0.15 + +/datum/chemical_reaction/fermi/enthrall/on_reaction(datum/reagents/holder) message_admins("On reaction for enthral proc'd") var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in holder.reagent_list @@ -170,4 +225,90 @@ E.creatorID = B.["ckey"] var/mob/living/creator = holder E.creator = creator + ..() //var/enthrallID = B.get_blood_data() + +/datum/chemical_reaction/fermi/enthrall/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction) + var/turf/T = get_turf(holder.my_atom) + var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new + s.set_up("enthrallExplo", volume, pH*10, T) + s.start() + ..() + +/datum/chemical_reaction/fermi/hatmium + name = "Hat growth serium" + id = "hatmium" + results = list("hatmium" = 5) + //required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3) + //mix_message = "" + //FermiChem vars: + OptimalTempMin = 450 + OptimalTempMax = 600 + ExplodeTemp = 700 + OptimalpHMin = 6 + OptimalpHMax = 8 + ReactpHLim = 1 + //CatalystFact = 0 //To do 1 + CurveSharpT = 4 + CurveSharppH = 2 + ThermicConstant = -2.5 + HIonRelease = 0.01 + RateUpLim = 5 + FermiChem = TRUE + //FermiExplode = FALSE + //PurityMin = 0.15 + +/datum/chemical_reaction/fermi/hatmium/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction) + var/obj/item/clothing/head/hattip/hat = new /obj/item/clothing/head/hattip(get_turf(holder.my_atom)) + hat.animate_atom_living() + var/list/seen = viewers(5, get_turf(holder.my_atom)) + for(var/mob/M in seen) + to_chat(M, "The makes an off sounding pop, as a hat suddenly climbs out of the beaker!") + ..() + +/datum/chemical_reaction/fermi/furranium //low temp and medium pH + name = "Furranium" + id = "furranium" + results = list("furranium" = 5) + //required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3) + //mix_message = "" + //FermiChem vars: + OptimalTempMin = 450 + OptimalTempMax = 600 + ExplodeTemp = 700 + OptimalpHMin = 6 + OptimalpHMax = 8 + ReactpHLim = 1 + //CatalystFact = 0 //To do 1 + CurveSharpT = 4 + CurveSharppH = 2 + ThermicConstant = -2.5 + HIonRelease = 0.01 + RateUpLim = 5 + FermiChem = TRUE + //FermiExplode = FALSE + //PurityMin = 0.15 + +//Nano-b-gone +/datum/chemical_reaction/fermi/naninte_b_gone + name = "Naninte bain" + id = "naninte_b_gone" + results = list("naninte_b_gone" = 5) + required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3) + mix_message = "the blood and sugar nucleates a hard coating of synth flesh inside the beaker." + //FermiChem vars: + OptimalTempMin = 450 + OptimalTempMax = 600 + ExplodeTemp = 700 + OptimalpHMin = 6 + OptimalpHMax = 8 + ReactpHLim = 1 + //CatalystFact = 0 //To do 1 + CurveSharpT = 4 + CurveSharppH = 2 + ThermicConstant = -2.5 + HIonRelease = 0.01 + RateUpLim = 5 + FermiChem = TRUE + //FermiExplode = FALSE + //PurityMin = 0.15