From f091f5c4d8558fe1976808514965f97c65376147 Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Wed, 4 Nov 2020 18:32:47 -0500
Subject: [PATCH 1/4] Adds some flaming hot logging
---
.../reagents/chemistry/reagents/misc.dm | 10 ++++
.../chemistry/reagents/pyrotechnic.dm | 58 +++++++++++++++++++
.../chemistry/recipes/pyrotechnics.dm | 20 +++++++
3 files changed, 88 insertions(+)
diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm
index f7cdfa11404..ab95625b7ea 100644
--- a/code/modules/reagents/chemistry/reagents/misc.dm
+++ b/code/modules/reagents/chemistry/reagents/misc.dm
@@ -215,6 +215,16 @@
var/turf/T = get_turf(holder.my_atom)
holder.my_atom.visible_message("The oil burns!")
fireflash(T, min(max(0, volume / 40), 8))
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
var/datum/effect_system/smoke_spread/bad/BS = new
BS.set_up(1, 0, T)
BS.start()
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
index 9d85459f465..dfd2c3be0d1 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
@@ -16,6 +16,15 @@
return
var/radius = min(max(0, volume / size_divisor), 8)
fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500)
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(holder.chem_temp <= T0C - 50)
@@ -56,6 +65,16 @@
if(exposed_temperature > T0C + 100)
var/radius = min(max(0, volume * 0.15), 8)
fireflash_sm(get_turf(holder.my_atom), radius, rand(3000, 6000), 500)
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
if(holder)
holder.del_reagent(id)
@@ -148,6 +167,16 @@
/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
if(holder)
holder.del_reagent(id)
@@ -190,6 +219,16 @@
var/datum/reagents/Holder = holder
var/Id = id
var/Volume = volume
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
Holder.del_reagent(Id)
fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1)
@@ -240,6 +279,15 @@
return
var/radius = min((volume - 3) * 0.15, 3)
fireflash_sm(T, radius, 4500 + volume * 500, 350)
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
/datum/reagent/clf3/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH || method == REAGENT_INGEST)
@@ -437,6 +485,16 @@
/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
if(holder)
holder.del_reagent(id)
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 4be84e21d2c..9506caf0c8e 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -82,6 +82,16 @@
min_temp = T0C + 150
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
fireflash(holder.my_atom, 1, 7000)
/datum/chemical_reaction/sorium
@@ -230,6 +240,16 @@
mix_message = "The substance erupts into wild flames."
/datum/chemical_reaction/phlogiston_fire/on_reaction(datum/reagents/holder, created_volume)
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ var/more = ""
+ if(M)
+ more = " "
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
fireflash(get_turf(holder.my_atom), min(max(2, round(created_volume / 10)), 8))
/datum/chemical_reaction/napalm
From 176f5d88053a2e033c9c52491edea6bdc2eba271 Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Wed, 4 Nov 2020 19:30:17 -0500
Subject: [PATCH 2/4] Procs it, un-more's it, sticks it in a stew
---
code/modules/reagents/chemistry/reagents.dm | 9 +++
.../reagents/chemistry/reagents/misc.dm | 11 +---
.../chemistry/reagents/pyrotechnic.dm | 64 ++-----------------
code/modules/reagents/chemistry/recipes.dm | 10 +++
.../chemistry/recipes/pyrotechnics.dm | 22 +------
5 files changed, 28 insertions(+), 88 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 7073fdf3902..9212319aefd 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -97,6 +97,15 @@
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
return
+/datum/reagent/proc/fire_flash_log(datum/reagents/holder) //Call this whenever a chemical makes a fire flash
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
+
// Called when this reagent is first added to a mob
/datum/reagent/proc/on_mob_add(mob/living/L)
return
diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm
index ab95625b7ea..471a047a9c2 100644
--- a/code/modules/reagents/chemistry/reagents/misc.dm
+++ b/code/modules/reagents/chemistry/reagents/misc.dm
@@ -215,16 +215,7 @@
var/turf/T = get_turf(holder.my_atom)
holder.my_atom.visible_message("The oil burns!")
fireflash(T, min(max(0, volume / 40), 8))
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
var/datum/effect_system/smoke_spread/bad/BS = new
BS.set_up(1, 0, T)
BS.start()
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
index dfd2c3be0d1..269acbeec67 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
@@ -16,15 +16,7 @@
return
var/radius = min(max(0, volume / size_divisor), 8)
fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500)
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+ fire_flash_log(holder)
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(holder.chem_temp <= T0C - 50)
@@ -65,16 +57,7 @@
if(exposed_temperature > T0C + 100)
var/radius = min(max(0, volume * 0.15), 8)
fireflash_sm(get_turf(holder.my_atom), radius, rand(3000, 6000), 500)
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
if(holder)
holder.del_reagent(id)
@@ -167,16 +150,7 @@
/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
if(holder)
holder.del_reagent(id)
@@ -219,16 +193,7 @@
var/datum/reagents/Holder = holder
var/Id = id
var/Volume = volume
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
Holder.del_reagent(Id)
fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1)
@@ -279,15 +244,7 @@
return
var/radius = min((volume - 3) * 0.15, 3)
fireflash_sm(T, radius, 4500 + volume * 500, 350)
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+ fire_flash_log(holder)
/datum/reagent/clf3/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH || method == REAGENT_INGEST)
@@ -485,16 +442,7 @@
/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
if(holder)
holder.del_reagent(id)
diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm
index 2d99b4025bd..c457bc5f016 100644
--- a/code/modules/reagents/chemistry/recipes.dm
+++ b/code/modules/reagents/chemistry/recipes.dm
@@ -20,6 +20,16 @@
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume)
return
+/datum/chemical_reaction/proc/fire_flash_log(datum/reagents/holder) //Call this whenever a chemical makes a fire flash
+ if(holder.my_atom)
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
+
+
+
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon", random = TRUE)
if(holder && holder.my_atom)
var/atom/A = holder.my_atom
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 9506caf0c8e..ee30f1a3bef 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -82,16 +82,7 @@
min_temp = T0C + 150
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
fireflash(holder.my_atom, 1, 7000)
/datum/chemical_reaction/sorium
@@ -240,16 +231,7 @@
mix_message = "The substance erupts into wild flames."
/datum/chemical_reaction/phlogiston_fire/on_reaction(datum/reagents/holder, created_volume)
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- var/more = ""
- if(M)
- more = " "
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast][more]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+ fire_flash_log(holder)
fireflash(get_turf(holder.my_atom), min(max(2, round(created_volume / 10)), 8))
/datum/chemical_reaction/napalm
From b83a134d6be8b2edf06560c34d1946e2fa67d1ce Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Wed, 4 Nov 2020 19:54:35 -0500
Subject: [PATCH 3/4] Removes un-needed holder
---
code/modules/reagents/chemistry/reagents.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 9212319aefd..2345e6cb1da 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -97,7 +97,7 @@
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
return
-/datum/reagent/proc/fire_flash_log(datum/reagents/holder) //Call this whenever a chemical makes a fire flash
+/datum/reagent/proc/fire_flash_log() //Call this whenever a chemical makes a fire flash
if(holder.my_atom)
if(holder.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
From 83267f45d6be1c768c223f86c0e8a5a7c5fd40b7 Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Fri, 6 Nov 2020 17:49:01 -0500
Subject: [PATCH 4/4] Steel and henks stuff
---
code/modules/reagents/chemistry/reagents.dm | 24 ++++++++++++-------
.../reagents/chemistry/reagents/misc.dm | 2 +-
.../chemistry/reagents/pyrotechnic.dm | 12 +++++-----
code/modules/reagents/chemistry/recipes.dm | 9 -------
.../chemistry/recipes/pyrotechnics.dm | 4 ++--
5 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 2345e6cb1da..fdde6c8abe6 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -97,14 +97,22 @@
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
return
-/datum/reagent/proc/fire_flash_log() //Call this whenever a chemical makes a fire flash
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
+/**
+ * Flashfire is a proc used to log fire causing chemical reactions.
+ *
+ * Call this whenever you have a chemical reaction that makes fire flashes.
+ * Arguments:
+ * * holder: the beaker that the reagent is in
+ * * name: name of the reagent / reaction
+ */
+/proc/fire_flash_log(datum/reagents/holder, name)
+ if(!holder.my_atom)
+ return
+ if(holder.my_atom.fingerprintslast)
+ var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
+ add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [name]. Last associated key is [holder.my_atom.fingerprintslast]", ATKLOG_FEW)
+ log_game("Flashfire reaction ([holder.my_atom], reagent type: [name]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
+ holder.my_atom.investigate_log("A Flashfire reaction, (reagent type [name]) last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
// Called when this reagent is first added to a mob
/datum/reagent/proc/on_mob_add(mob/living/L)
diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm
index 471a047a9c2..830db05a9bc 100644
--- a/code/modules/reagents/chemistry/reagents/misc.dm
+++ b/code/modules/reagents/chemistry/reagents/misc.dm
@@ -215,7 +215,7 @@
var/turf/T = get_turf(holder.my_atom)
holder.my_atom.visible_message("The oil burns!")
fireflash(T, min(max(0, volume / 40), 8))
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "oil")
var/datum/effect_system/smoke_spread/bad/BS = new
BS.set_up(1, 0, T)
BS.start()
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
index 269acbeec67..cb8739fba55 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm
@@ -16,7 +16,7 @@
return
var/radius = min(max(0, volume / size_divisor), 8)
fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500)
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "phlogiston")
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(holder.chem_temp <= T0C - 50)
@@ -57,7 +57,7 @@
if(exposed_temperature > T0C + 100)
var/radius = min(max(0, volume * 0.15), 8)
fireflash_sm(get_turf(holder.my_atom), radius, rand(3000, 6000), 500)
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "napalm")
if(holder)
holder.del_reagent(id)
@@ -150,7 +150,7 @@
/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
- fire_flash_log(holder)
+ fire_flash_log(fire_flash_log(holder, name = "plasma"))
if(holder)
holder.del_reagent(id)
@@ -193,7 +193,7 @@
var/datum/reagents/Holder = holder
var/Id = id
var/Volume = volume
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "thermite")
Holder.del_reagent(Id)
fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1)
@@ -244,7 +244,7 @@
return
var/radius = min((volume - 3) * 0.15, 3)
fireflash_sm(T, radius, 4500 + volume * 500, 350)
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "clf3")
/datum/reagent/clf3/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH || method == REAGENT_INGEST)
@@ -442,7 +442,7 @@
/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "plasma dust")
if(holder)
holder.del_reagent(id)
diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm
index c457bc5f016..b743da3cecf 100644
--- a/code/modules/reagents/chemistry/recipes.dm
+++ b/code/modules/reagents/chemistry/recipes.dm
@@ -20,15 +20,6 @@
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume)
return
-/datum/chemical_reaction/proc/fire_flash_log(datum/reagents/holder) //Call this whenever a chemical makes a fire flash
- if(holder.my_atom)
- if(holder.my_atom.fingerprintslast)
- var/mob/M = get_mob_by_key(holder.my_atom.fingerprintslast)
- add_attack_logs(M, COORD(holder.my_atom.loc), "Caused a flashfire reaction of [id]. Last associated key is [holder.my_atom.fingerprintslast]", ATKLOG_FEW)
- log_game("Flashfire reaction ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
- holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
-
-
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon", random = TRUE)
if(holder && holder.my_atom)
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index ee30f1a3bef..2a64f99643a 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -82,7 +82,7 @@
min_temp = T0C + 150
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "clf3")
fireflash(holder.my_atom, 1, 7000)
/datum/chemical_reaction/sorium
@@ -231,7 +231,7 @@
mix_message = "The substance erupts into wild flames."
/datum/chemical_reaction/phlogiston_fire/on_reaction(datum/reagents/holder, created_volume)
- fire_flash_log(holder)
+ fire_flash_log(holder, name = "phlogiston fire")
fireflash(get_turf(holder.my_atom), min(max(2, round(created_volume / 10)), 8))
/datum/chemical_reaction/napalm