From b093439c732eef51038e3709b9eeba7c2027fb63 Mon Sep 17 00:00:00 2001 From: Sishen Date: Sun, 25 Aug 2019 16:27:02 -0400 Subject: [PATCH] aaaaaaaa --- code/__DEFINES/reactions.dm | 3 ++- code/modules/atmospherics/gasmixtures/reactions.dm | 11 +++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index 1c36120a0c..7cebc37d94 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -25,7 +25,8 @@ #define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense. //Research point amounts #define NOBLIUM_RESEARCH_AMOUNT 1000 -#define BZ_RESEARCH_AMOUNT 150 +#define BZ_RESEARCH_SCALE 4 +#define BZ_RESEARCH_MAX_AMOUNT 400 #define MIASMA_RESEARCH_AMOUNT 160 #define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 5ad97fb7c8..cdf1a766d9 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -364,15 +364,10 @@ var/list/cached_gases = air.gases var/temperature = air.temperature var/pressure = air.return_pressure() - var/old_heat_capacity = air.heat_capacity() var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2) var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED - if(cached_gases[/datum/gas/miasma] && cached_gases[/datum/gas/miasma] > 0) - energy_released /= cached_gases[/datum/gas/miasma]*0.1 - if(cached_gases[/datum/gas/bz] && cached_gases[/datum/gas/bz] > 0) - energy_released *= cached_gases[/datum/gas/bz]*0.1 - if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/nitrous_oxide][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/bz] += reaction_efficency if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide]) @@ -381,7 +376,7 @@ cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency cached_gases[/datum/gas/plasma] -= 2*reaction_efficency - SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (reaction_efficency**0.5)*BZ_RESEARCH_AMOUNT) + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((reaction_efficency**2)*BZ_RESEARCH_SCALE),BZ_RESEARCH_MAX_AMOUNT) if(energy_released > 0) var/new_heat_capacity = air.heat_capacity() @@ -477,4 +472,4 @@ //Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable air.temperature += cleaned_air * 0.002 - SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists \ No newline at end of file + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists