Merge pull request #7262 from Citadel-Station-13/upstream-merge-38690

[MIRROR] Destructive analyzers can now destroy anything again, even if it has no materials
This commit is contained in:
LetterJay
2018-07-01 09:31:12 -05:00
committed by GitHub
2 changed files with 9 additions and 4 deletions
@@ -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))
+3 -3
View File
@@ -594,9 +594,9 @@ Nothing else in the console has ID requirements.
l += "This item is worth: <BR>[techweb_point_display_generic(point_values)]!"
l += "</div>[RDSCREEN_NOBREAK]"
var/list/materials = linked_destroy.loaded_item.materials
if (materials.len)
l += "<div class='statusDisplay'><A href='?src=[REF(src)];deconstruct=[RESEARCH_MATERIAL_RECLAMATION_ID]'>Material Reclamation</A>"
if(!(linked_destroy.loaded_item.resistance_flags & INDESTRUCTIBLE))
var/list/materials = linked_destroy.loaded_item.materials
l += "<div class='statusDisplay'><A href='?src=[REF(src)];deconstruct=[RESEARCH_MATERIAL_RECLAMATION_ID]'>[materials.len? "Material Reclamation" : "Destroy Item"]</A>"
for (var/M in materials)
l += "* [CallMaterialName(M)] x [materials[M]]"
l += "</div>[RDSCREEN_NOBREAK]"