From e5b6732d3bbe23bba43bc11cb2ad0d30e8722a2c Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:10:16 -0600 Subject: [PATCH] Fixes overloading and deconstructing of the master RND server not affecting research rate (#73569) ## About The Pull Request Only a traitor removing the HDD would affect the income modifier of the stored research web. Updated it so `on_deconstruction` with an HDD present or a ninja overloading with an HDD preset will also negatively affect the income modifier. ## Why It's Good For The Game Fixes #73338 Round impact! ## Changelog :cl: Melbert fix: Deconstructing (or overloading) the Master RND server with an HDD preset will correctly half research rate /:cl: --- code/modules/research/server.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index d611ea0bf96..b97affd87ca 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -124,9 +124,7 @@ add_overlay("RD-server-objective-stripes") /obj/machinery/rnd/server/master/Destroy() - if (source_code_hdd && (deconstruction_state == HDD_OVERLOADED)) - QDEL_NULL(source_code_hdd) - + QDEL_NULL(source_code_hdd) return ..() /obj/machinery/rnd/server/master/get_status_text() @@ -228,6 +226,8 @@ /obj/machinery/rnd/server/master/on_deconstruction() // If the machine contains a source code HDD, destroying it will negatively impact research speed. Safest to log this. if(source_code_hdd) + // Destroyed with a hard drive inside = harm income + stored_research.income_modifier *= 0.5 // If there's a usr, this was likely a direct deconstruction of some sort. Extra logging info! if(usr) var/mob/user = usr @@ -245,6 +245,8 @@ /obj/machinery/rnd/server/master/proc/overload_source_code_hdd() if(source_code_hdd) QDEL_NULL(source_code_hdd) + // Overloaded = harm income + stored_research.income_modifier *= 0.5 if(deconstruction_state == HDD_PANEL_CLOSED) add_overlay("RD-server-hdd-panel-open")