From 42c59b67b5cf203d85ffd8f5d2d9d4cc800b3182 Mon Sep 17 00:00:00 2001 From: oranges Date: Thu, 5 Oct 2017 11:54:45 +1300 Subject: [PATCH 1/4] Removes /datum/reagents/process(), changes cryostylane & pyrosium reaction speed --- code/modules/reagents/chemistry/holder.dm | 13 ++++++++++++- code/modules/reagents/chemistry/reagents.dm | 4 ---- .../chemistry/reagents/pyrotechnic_reagents.dm | 14 -------------- .../reagents/chemistry/recipes/pyrotechnics.dm | 17 +++++++++++++++++ 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 9bcd909faf..c383dd5a7d 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -16,8 +16,11 @@ /datum/reagents/New(maximum=100) maximum_volume = maximum +<<<<<<< HEAD if(!(flags_1 & REAGENT_NOREACT)) START_PROCESSING(SSobj, src) +======= +>>>>>>> b8ea267... Merge pull request #31281 from vuonojenmustaturska/clowncult //I dislike having these here but map-objects are initialised before world/New() is called. >_> if(!GLOB.chemical_reagents_list) @@ -54,7 +57,6 @@ /datum/reagents/Destroy() . = ..() - STOP_PROCESSING(SSobj, src) var/list/cached_reagents = reagent_list for(var/reagent in cached_reagents) var/datum/reagent/R = reagent @@ -288,6 +290,7 @@ C.update_stamina() update_total() +<<<<<<< HEAD /datum/reagents/process() var/list/cached_reagents = reagent_list if(flags_1 & REAGENT_NOREACT) @@ -307,6 +310,14 @@ else STOP_PROCESSING(SSobj, src) flags_1 |= REAGENT_NOREACT +======= + +/datum/reagents/proc/set_reacting(react = TRUE) + if(react) + flags &= ~(REAGENT_NOREACT) + else + flags |= REAGENT_NOREACT +>>>>>>> b8ea267... Merge pull request #31281 from vuonojenmustaturska/clowncult /datum/reagents/proc/conditional_update_move(atom/A, Running = 0) var/list/cached_reagents = reagent_list diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 342e2154f8..5f76a87654 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -80,10 +80,6 @@ /datum/reagent/proc/on_update(atom/A) return -// Called every time reagent containers process. -/datum/reagent/proc/on_tick(data) - return - // Called when the reagent container is hit by an explosion /datum/reagent/proc/on_ex_act(severity) return diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm index 36320459e8..4c1965058c 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm @@ -196,13 +196,6 @@ M.bodytemperature -= 15 ..() -/datum/reagent/cryostylane/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp -= 10 - holder.handle_reactions() - ..() - /datum/reagent/cryostylane/reaction_turf(turf/T, reac_volume) if(reac_volume >= 5) for(var/mob/living/simple_animal/slime/M in T) @@ -222,13 +215,6 @@ M.bodytemperature += 15 ..() -/datum/reagent/pyrosium/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp += 10 - holder.handle_reactions() - ..() - /datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective. name = "Teslium" id = "teslium" diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 8ca65a6588..aa97dd3180 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -342,6 +342,23 @@ holder.chem_temp = 20 // cools the fuck down return +/datum/chemical_reaction/cryostylane_oxygen + name = "ephemeral cryostylane reaction" + id = "cryostylane_oxygen" + results = list("cryostylane" = 1) + required_reagents = list("cryostylane" = 1, "oxygen" = 1) + +/datum/chemical_reaction/cryostylane_oxygen/on_reaction(datum/reagents/holder, created_volume) + holder.chem_temp -= 10*created_volume + +/datum/chemical_reaction/pyrosium_oxygen + name = "ephemeral pyrosium reaction" + id = "pyrosium_oxygen" + results = list("pyrosium" = 1) + required_reagents = list("pyrosium" = 1, "oxygen" = 1) + +/datum/chemical_reaction/pyrosium_oxygen/on_reaction(datum/reagents/holder, created_volume) + holder.chem_temp += 10*created_volume /datum/chemical_reaction/pyrosium name = "pyrosium" From 08f3503a810d27e5ff23ddc929b355fc6661a7c4 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 5 Oct 2017 05:14:27 -0500 Subject: [PATCH 2/4] Update holder.dm --- code/modules/reagents/chemistry/holder.dm | 29 ----------------------- 1 file changed, 29 deletions(-) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index c383dd5a7d..927ccb9994 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -16,12 +16,6 @@ /datum/reagents/New(maximum=100) maximum_volume = maximum -<<<<<<< HEAD - if(!(flags_1 & REAGENT_NOREACT)) - START_PROCESSING(SSobj, src) -======= ->>>>>>> b8ea267... Merge pull request #31281 from vuonojenmustaturska/clowncult - //I dislike having these here but map-objects are initialised before world/New() is called. >_> if(!GLOB.chemical_reagents_list) //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id @@ -290,34 +284,11 @@ C.update_stamina() update_total() -<<<<<<< HEAD -/datum/reagents/process() - var/list/cached_reagents = reagent_list - if(flags_1 & REAGENT_NOREACT) - STOP_PROCESSING(SSobj, src) - return - - for(var/reagent in cached_reagents) - var/datum/reagent/R = reagent - R.on_tick() - -/datum/reagents/proc/set_reacting(react = TRUE) - if(react) - // Order is important, process() can remove from processing if - // the flag is present - flags_1 &= ~(REAGENT_NOREACT) - START_PROCESSING(SSobj, src) - else - STOP_PROCESSING(SSobj, src) - flags_1 |= REAGENT_NOREACT -======= - /datum/reagents/proc/set_reacting(react = TRUE) if(react) flags &= ~(REAGENT_NOREACT) else flags |= REAGENT_NOREACT ->>>>>>> b8ea267... Merge pull request #31281 from vuonojenmustaturska/clowncult /datum/reagents/proc/conditional_update_move(atom/A, Running = 0) var/list/cached_reagents = reagent_list From 8e1a31c8af16a6ab92450f907e629733566ed736 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 5 Oct 2017 06:51:59 -0500 Subject: [PATCH 3/4] Update holder.dm --- code/modules/reagents/chemistry/holder.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 927ccb9994..42980f4f4d 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -11,7 +11,7 @@ var/last_tick = 1 var/addiction_tick = 1 var/list/datum/reagent/addiction_list = new/list() - var/flags_1 + var/flags /datum/reagents/New(maximum=100) maximum_volume = maximum From 3d364f08f22274c79bb12bf8e4f5a4abdaba6dd2 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 5 Oct 2017 07:11:14 -0500 Subject: [PATCH 4/4] Update holder.dm --- code/modules/reagents/chemistry/holder.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 42980f4f4d..eeb5016445 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -308,7 +308,7 @@ var/list/cached_reagents = reagent_list var/list/cached_reactions = GLOB.chemical_reactions_list var/datum/cached_my_atom = my_atom - if(flags_1 & REAGENT_NOREACT) + if(flags & REAGENT_NOREACT) return //Yup, no reactions here. No siree. var/reaction_occurred = 0