From bbdd501fe01999ca38b27bb1f62b6e53e2f31392 Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sat, 20 Oct 2018 22:56:29 +0200 Subject: [PATCH 1/8] teslium and liquid dark matter --- .../reagents/chemistry/recipes/pyrotechnics.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index b08e96a8d9e..3901bdffc3e 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -97,9 +97,9 @@ /datum/chemical_reaction/sorium/on_reaction(datum/reagents/holder, created_volume) if(holder.has_reagent("stabilizing_agent")) return - holder.remove_reagent("sorium", created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, 5, 6) + goonchem_vortex(T, 1, round(created_volume / 33), round(created_volume / 25)) + holder.remove_reagent("sorium", created_volume) /datum/chemical_reaction/sorium_vortex name = "sorium_vortex" @@ -110,7 +110,7 @@ /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, 5, 6) + goonchem_vortex(T, 1, round(created_volume / 33), round(created_volume / 25)) /datum/chemical_reaction/liquid_dark_matter name = "Liquid Dark Matter" @@ -121,10 +121,10 @@ /datum/chemical_reaction/liquid_dark_matter/on_reaction(datum/reagents/holder, created_volume) if(holder.has_reagent("stabilizing_agent")) - return - holder.remove_reagent("liquid_dark_matter", created_volume) + return FALSE var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, 5, 6) + goonchem_vortex(T, 0, round(created_volume / 33), round(created_volume / 25)) + holder.remove_reagent("liquid_dark_matter", created_volume) /datum/chemical_reaction/ldm_vortex name = "LDM Vortex" @@ -135,7 +135,7 @@ /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, 5, 6) + goonchem_vortex(T, 0, round(created_volume / 33), round(created_volume / 25)) /datum/chemical_reaction/blackpowder name = "Black Powder" @@ -411,9 +411,9 @@ datum/chemical_reaction/flash_powder /datum/chemical_reaction/shock_explosion/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - for(var/mob/living/carbon/C in view(6, T)) + for(var/mob/living/carbon/C in view(max(1, round(created_volume / 3)), T)) C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. - C.electrocute_act(3.5, "electrical blast") + C.electrocute_act(max(1, round(created_volume / 5)), "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") From 17ecbdcfc558f2e92ab931aadfcfb50fddd8c3a1 Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sat, 20 Oct 2018 23:43:13 +0200 Subject: [PATCH 2/8] removed FALSE --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 3901bdffc3e..ffd89d6419e 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -121,7 +121,7 @@ /datum/chemical_reaction/liquid_dark_matter/on_reaction(datum/reagents/holder, created_volume) if(holder.has_reagent("stabilizing_agent")) - return FALSE + return var/turf/simulated/T = get_turf(holder.my_atom) goonchem_vortex(T, 0, round(created_volume / 33), round(created_volume / 25)) holder.remove_reagent("liquid_dark_matter", created_volume) From 2f2546e3c019112b127381e5fd59c58be47dda29 Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sun, 21 Oct 2018 14:33:28 +0200 Subject: [PATCH 3/8] Cap it, instead of trying to do magic. --- .../reagents/chemistry/recipes/pyrotechnics.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index ffd89d6419e..720a897b3ab 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -98,7 +98,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, round(created_volume / 33), round(created_volume / 25)) + goonchem_vortex(T, 1, min(10, created_volume), min(12, round(created_volume * 2))) holder.remove_reagent("sorium", created_volume) /datum/chemical_reaction/sorium_vortex @@ -110,7 +110,7 @@ /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, round(created_volume / 33), round(created_volume / 25)) + goonchem_vortex(T, 1, min(10, created_volume), min(12, round(created_volume * 2))) /datum/chemical_reaction/liquid_dark_matter name = "Liquid Dark Matter" @@ -123,7 +123,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, round(created_volume / 33), round(created_volume / 25)) + goonchem_vortex(T, 0, min(10, created_volume), min(12, round(created_volume * 2))) holder.remove_reagent("liquid_dark_matter", created_volume) /datum/chemical_reaction/ldm_vortex @@ -135,7 +135,7 @@ /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, round(created_volume / 33), round(created_volume / 25)) + goonchem_vortex(T, 0, min(10, created_volume), min(12, round(created_volume * 2))) /datum/chemical_reaction/blackpowder name = "Black Powder" @@ -411,9 +411,9 @@ datum/chemical_reaction/flash_powder /datum/chemical_reaction/shock_explosion/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - for(var/mob/living/carbon/C in view(max(1, round(created_volume / 3)), T)) + for(var/mob/living/carbon/C in view(min(12, round(created_volume * 2)), T)) C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. - C.electrocute_act(max(1, round(created_volume / 5)), "electrical blast") + C.electrocute_act(min(7, created_volume, "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") From b6632428e07bffc6b8623c5a402a32346f239633 Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sun, 21 Oct 2018 14:42:00 +0200 Subject: [PATCH 4/8] actually closed min(). oops. --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 720a897b3ab..3b31bf8822a 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -413,7 +413,7 @@ datum/chemical_reaction/flash_powder var/turf/T = get_turf(holder.my_atom) for(var/mob/living/carbon/C in view(min(12, round(created_volume * 2)), T)) C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. - C.electrocute_act(min(7, created_volume, "electrical blast") + C.electrocute_act(min(7, created_volume), "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") From 437d192d2ff56297fb448262b277bfaa1ec7d25b Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sun, 21 Oct 2018 16:21:52 +0200 Subject: [PATCH 5/8] Revert electrocute_act --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 3b31bf8822a..15ce01da5dd 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -413,7 +413,7 @@ datum/chemical_reaction/flash_powder var/turf/T = get_turf(holder.my_atom) for(var/mob/living/carbon/C in view(min(12, round(created_volume * 2)), T)) C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. - C.electrocute_act(min(7, created_volume), "electrical blast") + C.electrocute_act(3.5, "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") From 90451e8a9549846b1941497577b817ac8b2a8425 Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sun, 21 Oct 2018 16:26:23 +0200 Subject: [PATCH 6/8] Maintains ratio of vortexes --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 15ce01da5dd..f531e597a03 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -98,7 +98,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(12, round(created_volume * 2))) + goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume++)) holder.remove_reagent("sorium", created_volume) /datum/chemical_reaction/sorium_vortex @@ -110,7 +110,7 @@ /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(12, round(created_volume * 2))) + goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume++)) /datum/chemical_reaction/liquid_dark_matter name = "Liquid Dark Matter" @@ -123,7 +123,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(12, round(created_volume * 2))) + goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume++)) holder.remove_reagent("liquid_dark_matter", created_volume) /datum/chemical_reaction/ldm_vortex @@ -135,7 +135,7 @@ /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(12, round(created_volume * 2))) + goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume++)) /datum/chemical_reaction/blackpowder name = "Black Powder" From a7715c7d1f6646c46bd887e0b242d3d9e07c3b5e Mon Sep 17 00:00:00 2001 From: lass9030 Date: Sun, 21 Oct 2018 16:28:42 +0200 Subject: [PATCH 7/8] shock reach is now max 8 --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index f531e597a03..ff8e995822e 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -411,7 +411,7 @@ datum/chemical_reaction/flash_powder /datum/chemical_reaction/shock_explosion/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - for(var/mob/living/carbon/C in view(min(12, round(created_volume * 2)), T)) + for(var/mob/living/carbon/C in view(min(8, round(created_volume * 2)), T)) C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. C.electrocute_act(3.5, "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. From 8a023482a4d34cbcafcf5f3f31732ad4878fb81d Mon Sep 17 00:00:00 2001 From: Alonefromhell Date: Mon, 22 Oct 2018 14:38:40 +0200 Subject: [PATCH 8/8] ++ =/= + 1 --- code/modules/reagents/chemistry/recipes/pyrotechnics.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index ff8e995822e..7dcdd1e81b6 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -98,7 +98,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume++)) + goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1)) holder.remove_reagent("sorium", created_volume) /datum/chemical_reaction/sorium_vortex @@ -110,7 +110,7 @@ /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume++)) + goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1)) /datum/chemical_reaction/liquid_dark_matter name = "Liquid Dark Matter" @@ -123,7 +123,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume++)) + goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1)) holder.remove_reagent("liquid_dark_matter", created_volume) /datum/chemical_reaction/ldm_vortex @@ -135,7 +135,7 @@ /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume++)) + goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1)) /datum/chemical_reaction/blackpowder name = "Black Powder"