From 420ce61dd2c00380da3fb8c3d680c847377451c1 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Thu, 28 Dec 2023 13:23:00 -0500 Subject: [PATCH] Deletes roundstart chemical reaction callback thing (#146) * Deletes roundstart chemical reaction callback thing * Modularize * This does not belong --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> --- code/modules/reagents/chemistry/recipes.dm | 22 ------------------- .../chemistry/recipes/pyrotechnics.dm | 15 +++++++------ code/modules/research/techweb/all_nodes.dm | 1 - .../modules/reagents/chemistry/recipes.dm | 6 +++++ .../modules/research/techweb/all_nodes.dm | 1 + tgstation.dme | 1 + 6 files changed, 16 insertions(+), 30 deletions(-) create mode 100644 modular_nova/master_files/code/modules/reagents/chemistry/recipes.dm diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 7dbfb790cbb..c7732e0908a 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -60,28 +60,6 @@ ///A bitflag var for tagging reagents for the reagent loopup functon var/reaction_tags = NONE - //NOVA EDIT ADDITION - ///If defined, it'll emitt that pollutant on reaction - var/pollutant_type - ///How much amount per volume of the pollutant shall we emitt if `pollutant_type` is defined - var/pollutant_amount = 1 - //NOVA EDIT END - -/datum/chemical_reaction/New() - . = ..() - SSticker.OnRoundstart(CALLBACK(src, PROC_REF(update_info))) - -/** - * Updates information during the roundstart - * - * This proc is mainly used by explosives but can be used anywhere else - * You should generally use the special reactions in [/datum/chemical_reaction/randomized] - * But for simple variable edits, like changing the temperature or adding/subtracting required reagents it is better to use this. - */ -/datum/chemical_reaction/proc/update_info() - return - - ///REACTION PROCS /** diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 78942431bb8..8e74b0ad6f8 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -77,8 +77,9 @@ required_temp = 450 strengthdiv = 3 -/datum/chemical_reaction/reagent_explosion/tatp/update_info() - required_temp = 450 + rand(-49, 49) //this gets loaded only on round start +/datum/chemical_reaction/reagent_explosion/tatp/New() + . = ..() + required_temp = 450 + rand(-49, 49) /datum/chemical_reaction/reagent_explosion/tatp/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) if(holder.has_reagent(/datum/reagent/exotic_stabilizer, created_volume / 50)) // we like exotic stabilizer @@ -93,12 +94,12 @@ /datum/chemical_reaction/reagent_explosion/tatp_explosion/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/strengthdiv_adjust = created_volume / ( 2100 / initial(strengthdiv)) - strengthdiv = max(initial(strengthdiv) - strengthdiv_adjust + 1.5 ,1.5) //Slightly better than nitroglycerin - . = ..() - return + strengthdiv = max(initial(strengthdiv) - strengthdiv_adjust + 1.5, 1.5) //Slightly better than nitroglycerin + return ..() -/datum/chemical_reaction/reagent_explosion/tatp_explosion/update_info() - required_temp = 550 + rand(-49,49) +/datum/chemical_reaction/reagent_explosion/tatp_explosion/New() + . = ..() + required_temp = 550 + rand(-49, 49) /datum/chemical_reaction/reagent_explosion/penthrite_explosion_epinephrine required_reagents = list(/datum/reagent/medicine/c2/penthrite = 1, /datum/reagent/medicine/epinephrine = 1) diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 0366259157f..c0041aae7d7 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -129,7 +129,6 @@ "universal_scanner", "voice_analyzer", "watering_can", - "gbp_machine", // NOVA EDIT ADDITION ) experiments_to_unlock = list( /datum/experiment/autopsy/nonhuman, diff --git a/modular_nova/master_files/code/modules/reagents/chemistry/recipes.dm b/modular_nova/master_files/code/modules/reagents/chemistry/recipes.dm new file mode 100644 index 00000000000..e710b9d0eac --- /dev/null +++ b/modular_nova/master_files/code/modules/reagents/chemistry/recipes.dm @@ -0,0 +1,6 @@ +// Pollution vars +/datum/chemical_reaction + /// If defined, it'll emit that pollutant on reaction + var/pollutant_type + /// How much amount per volume of the pollutant shall we emit if `pollutant_type` is defined + var/pollutant_amount = 1 diff --git a/modular_nova/master_files/code/modules/research/techweb/all_nodes.dm b/modular_nova/master_files/code/modules/research/techweb/all_nodes.dm index 3a7d072b7fa..5ee944941e9 100644 --- a/modular_nova/master_files/code/modules/research/techweb/all_nodes.dm +++ b/modular_nova/master_files/code/modules/research/techweb/all_nodes.dm @@ -30,6 +30,7 @@ design_ids += list( "polarizer", "vox_gas_filter", + "gbp_machine", ) return ..() diff --git a/tgstation.dme b/tgstation.dme index c5f1f270634..6c5b21e14e1 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6450,6 +6450,7 @@ #include "modular_nova\master_files\code\modules\reagents\chemistry\colors.dm" #include "modular_nova\master_files\code\modules\reagents\chemistry\holder.dm" #include "modular_nova\master_files\code\modules\reagents\chemistry\reagents.dm" +#include "modular_nova\master_files\code\modules\reagents\chemistry\recipes.dm" #include "modular_nova\master_files\code\modules\reagents\medicine_reagents\medicine_reagents.dm" #include "modular_nova\master_files\code\modules\reagents\withdrawal\generic_addictions.dm" #include "modular_nova\master_files\code\modules\religion\religious_sects.dm"