From c5e11eceedea49b702b316e71f708d88a02652f9 Mon Sep 17 00:00:00 2001 From: oranges Date: Wed, 1 Nov 2017 09:29:47 +1300 Subject: [PATCH 1/4] Some minor contamination fixes --- code/__DEFINES/logging.dm | 33 +++++++++++++------------ code/controllers/subsystem/radiation.dm | 21 +++++++++++----- code/datums/radiation_wave.dm | 3 ++- code/modules/admin/admin_investigate.dm | 2 +- 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm index 24e10a24d1..787aee5408 100644 --- a/code/__DEFINES/logging.dm +++ b/code/__DEFINES/logging.dm @@ -1,20 +1,21 @@ //Investigate logging defines -#define INVESTIGATE_ATMOS "atmos" -#define INVESTIGATE_BOTANY "botany" -#define INVESTIGATE_CARGO "cargo" -#define INVESTIGATE_EXPERIMENTOR "experimentor" -#define INVESTIGATE_GRAVITY "gravity" -#define INVESTIGATE_RECORDS "records" -#define INVESTIGATE_SINGULO "singulo" -#define INVESTIGATE_SUPERMATTER "supermatter" -#define INVESTIGATE_TELESCI "telesci" -#define INVESTIGATE_WIRES "wires" +#define INVESTIGATE_ATMOS "atmos" +#define INVESTIGATE_BOTANY "botany" +#define INVESTIGATE_CARGO "cargo" +#define INVESTIGATE_EXPERIMENTOR "experimentor" +#define INVESTIGATE_GRAVITY "gravity" +#define INVESTIGATE_RECORDS "records" +#define INVESTIGATE_SINGULO "singulo" +#define INVESTIGATE_SUPERMATTER "supermatter" +#define INVESTIGATE_TELESCI "telesci" +#define INVESTIGATE_WIRES "wires" #define INVESTIGATE_PORTAL "portals" -#define INVESTIGATE_HALLUCINATIONS "hallucinations" +#define INVESTIGATE_HALLUCINATIONS "hallucinations" +#define INVESTIGATE_RADIATION "radiation" //Individual logging defines -#define INDIVIDUAL_ATTACK_LOG "Attack log" -#define INDIVIDUAL_SAY_LOG "Say log" -#define INDIVIDUAL_EMOTE_LOG "Emote log" -#define INDIVIDUAL_OOC_LOG "OOC log" -#define INDIVIDUAL_SHOW_ALL_LOG "All logs" +#define INDIVIDUAL_ATTACK_LOG "Attack log" +#define INDIVIDUAL_SAY_LOG "Say log" +#define INDIVIDUAL_EMOTE_LOG "Emote log" +#define INDIVIDUAL_OOC_LOG "OOC log" +#define INDIVIDUAL_SHOW_ALL_LOG "All logs" \ No newline at end of file diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm index 1dbe564169..0fded96d95 100644 --- a/code/controllers/subsystem/radiation.dm +++ b/code/controllers/subsystem/radiation.dm @@ -4,16 +4,21 @@ PROCESSING_SUBSYSTEM_DEF(radiation) priority = 25 var/list/warned_atoms = list() - var/list/next_warn = list() - var/last_warn = 0 -/datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive) - if(!radioactive || QDELETED(radioactive)) +/datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive/contamination) + if(!contamination || QDELETED(contamination)) return +<<<<<<< HEAD if(warned_atoms["\ref[radioactive.parent]"]) +======= + var/ref = REF(contamination.parent) + if(warned_atoms[ref]) +>>>>>>> b78e060... Merge pull request #32247 from ninjanomnom/minor-rad-fixes return - var/atom/master = radioactive.parent + warned_atoms[ref] = TRUE + var/atom/master = contamination.parent SSblackbox.add_details("contaminated", "[master.type]") +<<<<<<< HEAD next_warn["\ref[master]"] = "\ref[radioactive]" var/wait_time = max(0, 500-(world.time-last_warn))+20 // wait at least 20 ticks, longer if we just messaged addtimer(CALLBACK(src, .proc/send_warn), wait_time, TIMER_UNIQUE | TIMER_OVERRIDE) @@ -38,4 +43,8 @@ PROCESSING_SUBSYSTEM_DEF(radiation) warned_atoms += next_warn src.next_warn = list() last_warn = world.time - message_admins(msg) \ No newline at end of file + message_admins(msg) +======= + var/msg = "has become contamintaed with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]" + master.investigate_log(msg, INVESTIGATE_RADIATION) +>>>>>>> b78e060... Merge pull request #32247 from ninjanomnom/minor-rad-fixes diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm index ffc6b75fcb..f065ccfeab 100644 --- a/code/datums/radiation_wave.dm +++ b/code/datums/radiation_wave.dm @@ -98,7 +98,8 @@ /obj/structure/cable, /obj/machinery/atmospherics, /obj/item/ammo_casing, - /obj/item/implant + /obj/item/implant, + /obj/singularity )) if(!can_contaminate || blacklisted[thing.type]) continue diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 2ca0593e8d..aeaf00337d 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -5,7 +5,7 @@ F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" -/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) ) +/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION) ) set name = "Investigate" set category = "Admin" if(!holder) From ed2ba5e3f58f91e999c54c0b40af3aeb7ca306ca Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 2 Nov 2017 02:21:07 -0500 Subject: [PATCH 2/4] Update radiation.dm --- code/controllers/subsystem/radiation.dm | 32 ------------------------- 1 file changed, 32 deletions(-) diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm index 0fded96d95..2953b388d1 100644 --- a/code/controllers/subsystem/radiation.dm +++ b/code/controllers/subsystem/radiation.dm @@ -8,43 +8,11 @@ PROCESSING_SUBSYSTEM_DEF(radiation) /datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive/contamination) if(!contamination || QDELETED(contamination)) return -<<<<<<< HEAD - if(warned_atoms["\ref[radioactive.parent]"]) -======= var/ref = REF(contamination.parent) if(warned_atoms[ref]) ->>>>>>> b78e060... Merge pull request #32247 from ninjanomnom/minor-rad-fixes return warned_atoms[ref] = TRUE var/atom/master = contamination.parent SSblackbox.add_details("contaminated", "[master.type]") -<<<<<<< HEAD - next_warn["\ref[master]"] = "\ref[radioactive]" - var/wait_time = max(0, 500-(world.time-last_warn))+20 // wait at least 20 ticks, longer if we just messaged - addtimer(CALLBACK(src, .proc/send_warn), wait_time, TIMER_UNIQUE | TIMER_OVERRIDE) - -/datum/controller/subsystem/processing/radiation/proc/send_warn() - var/msg = "Atom(s) have become contaminated by radiation and are strong enough they could pass it on:" - var/still_alive = FALSE - var/list/next_warn = src.next_warn // It's free performance! - for(var/i in next_warn) - var/atom/parent = locate(i) - var/datum/component/radioactive/radioactive = locate(next_warn[i]) - if(!parent || !istype(parent) || !radioactive || !istype(radioactive)) - continue - if(!still_alive) - msg += "\n" - still_alive = TRUE - else - msg += ", " - msg += "[parent][ADMIN_VV(parent)]source:[radioactive.source]" - if(!still_alive) - return - warned_atoms += next_warn - src.next_warn = list() - last_warn = world.time - message_admins(msg) -======= var/msg = "has become contamintaed with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]" master.investigate_log(msg, INVESTIGATE_RADIATION) ->>>>>>> b78e060... Merge pull request #32247 from ninjanomnom/minor-rad-fixes From f628779d36b1ebb3cae18af7d615445b3f070ebf Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 2 Nov 2017 03:20:33 -0500 Subject: [PATCH 3/4] Update radiation.dm --- code/controllers/subsystem/radiation.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm index 2953b388d1..700b2a32e7 100644 --- a/code/controllers/subsystem/radiation.dm +++ b/code/controllers/subsystem/radiation.dm @@ -8,7 +8,7 @@ PROCESSING_SUBSYSTEM_DEF(radiation) /datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive/contamination) if(!contamination || QDELETED(contamination)) return - var/ref = REF(contamination.parent) + var/ref = \ref(contamination.parent) if(warned_atoms[ref]) return warned_atoms[ref] = TRUE From 4946ce5070e5eba5a1999227cb24fe4cf59347db Mon Sep 17 00:00:00 2001 From: LetterJay Date: Fri, 3 Nov 2017 00:17:25 -0500 Subject: [PATCH 4/4] Update radiation.dm --- code/controllers/subsystem/radiation.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm index 700b2a32e7..2953b388d1 100644 --- a/code/controllers/subsystem/radiation.dm +++ b/code/controllers/subsystem/radiation.dm @@ -8,7 +8,7 @@ PROCESSING_SUBSYSTEM_DEF(radiation) /datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive/contamination) if(!contamination || QDELETED(contamination)) return - var/ref = \ref(contamination.parent) + var/ref = REF(contamination.parent) if(warned_atoms[ref]) return warned_atoms[ref] = TRUE