From bf647c38e8177a87d2185cbe364faed90b7dd548 Mon Sep 17 00:00:00 2001 From: Thalpy Date: Sun, 14 Apr 2019 19:52:23 +0100 Subject: [PATCH] Variables don't work as I thought and it makes me sad. --- code/modules/reagents/chemistry/holder.dm | 25 ++++++++++++++++--- .../reagents/chemistry/recipes/medicine.dm | 13 ---------- .../chemistry/reagents/fermi_reagents.dm | 4 ++- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index d5c44315c5..dd519c638f 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -53,9 +53,6 @@ var/addiction_tick = 1 var/list/datum/reagent/addiction_list = new/list() var/reagents_holder_flags - //FermiChem - var/purity = 1 - var/ammoReacted = 0 /datum/reagents/New(maximum=100) maximum_volume = maximum @@ -369,8 +366,28 @@ var/meets_temp_requirement = 0 var/has_special_react = C.special_react var/can_special_react = 0 + //FermiChem WHY ARE VARIBLES SO ESTRANGED it makes me sad + var/OptimalTempMin = C.OptimalTempMin // Lower area of bell curve for determining heat based rate reactions + var/OptimalTempMax = C.OptimalTempMax + var/ExplodeTemp = C.ExplodeTemp + var/OptimalpHMin = C.OptimalpHMin + var/OptimalpHMax = C.OptimalpHMax + var/ReactpHLim = C.ReactpHLim + //var/CatalystFact = C.CatalystFact + var/CurveSharpT = C.CurveSharpT + var/CurveSharppH = C.CurveSharppH + var/ThermicConstant = C.ThermicConstant + var/HIonRelease = C.HIonRelease + var/RateUpLim = C.RateUpLim + var/FermiChem = C.FermiChem + var/FermiExplod = C.FermiExplod + var/ImpureChem = C.ImpureChem + //FermiChem + var/purity = 1 + var/ammoReacted = 0 + var/deltaT = 0 var/deltapH = 0 var/stepChemAmmount = 0 @@ -459,7 +476,7 @@ //go to explode proc FermiExplode() - if (pH > 14) OR (pH < 0) + if (pH > 14 || pH < 0) //Create chemical sludge eventually(for now just destroy the beaker I guess?) //TODO Strong acids eat glass, make it so you NEED plastic beakers for superacids(for some reactions) FermiExplode() diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index deccc47768..dc7c32d925 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -208,19 +208,6 @@ id = "bicaridine" results = list("bicaridine" = 3) required_reagents = list("carbon" = 1, "oxygen" = 1, "sugar" = 1) - //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) - CurveSharp = 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 = 1 /datum/chemical_reaction/kelotane name = "Kelotane" 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 3d19514334..7eccf33083 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -29,7 +29,9 @@ ..() /datum/reagent/fermi/eigenstate/on_mob_life(mob/living/carbon/M) //Teleports to chemistry! - if (holder.!has_reagent("eigenstate")) + if (holder.has_reagent("eigenstate")) + do_sparks(5,FALSE,src) + else var/turf/open/T2 = get_turf(src) //sets up return point to_chat(M, "You feel your wavefunction split!") do_sparks(5,FALSE,src)