Skip to content

Commit

Permalink
Deletes roundstart chemical reaction callback thing (#146)
Browse files Browse the repository at this point in the history
* Deletes roundstart chemical reaction callback thing

* Modularize

* This does not belong

---------

Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: Giz <[email protected]>
  • Loading branch information
3 people authored and Iajret committed Jan 3, 2024
1 parent a006259 commit 420ce61
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 30 deletions.
22 changes: 0 additions & 22 deletions code/modules/reagents/chemistry/recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
15 changes: 8 additions & 7 deletions code/modules/reagents/chemistry/recipes/pyrotechnics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
"universal_scanner",
"voice_analyzer",
"watering_can",
"gbp_machine", // NOVA EDIT ADDITION
)
experiments_to_unlock = list(
/datum/experiment/autopsy/nonhuman,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
design_ids += list(
"polarizer",
"vox_gas_filter",
"gbp_machine",
)
return ..()

Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 420ce61

Please sign in to comment.