From ef851d5744d5214a14ddae362144d4d5b64c82c2 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Tue, 26 Jun 2018 13:42:29 -0700
Subject: [PATCH] Destructive analyzers can now destroy anything again, even if
it has no materials (#38690)
* Update rdconsole.dm
* Update destructive_analyzer.dm
---
code/modules/research/destructive_analyzer.dm | 7 ++++++-
code/modules/research/rdconsole.dm | 6 +++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index d39b942807..37a83eb04f 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -130,7 +130,12 @@ Note: Must be placed within 3 tiles of the R&D Console
var/list/point_value = techweb_item_point_check(loaded_item)
if(linked_console.stored_research.deconstructed_items[loaded_item.type])
point_value = list()
- var/choice = input("Are you sure you want to destroy [loaded_item] for [length(point_value) ? "[json_encode(point_value)] points" : "material reclamation"]?") in list("Proceed", "Cancel")
+ var/user_mode_string = ""
+ if(length(point_value))
+ user_mode_string = " for [json_encode(point_value)] points"
+ else if(loaded_item.materials.len)
+ user_mode_string = " for material reclamation"
+ var/choice = input("Are you sure you want to destroy [loaded_item][user_mode_string]?") in list("Proceed", "Cancel")
if(choice == "Cancel")
return FALSE
if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src))
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index eb4c3b69a4..0ba9312314 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -594,9 +594,9 @@ Nothing else in the console has ID requirements.
l += "This item is worth:
[techweb_point_display_generic(point_values)]!"
l += "[RDSCREEN_NOBREAK]"
- var/list/materials = linked_destroy.loaded_item.materials
- if (materials.len)
- l += "