/* Destructive Analyzer It is used to destroy hand-held objects and advance technological research. Controls are in the linked R&D console. Note: Must be placed within 3 tiles of the R&D Console */ /obj/machinery/r_n_d/destructive_analyzer name = "destructive analyzer" desc = "Learn science by destroying things!" icon_state = "d_analyzer" circuit = /obj/item/circuitboard/machine/destructive_analyzer var/decon_mod = 0 /obj/machinery/r_n_d/destructive_analyzer/RefreshParts() var/T = 0 for(var/obj/item/stock_parts/S in component_parts) T += S.rating decon_mod = T /obj/machinery/r_n_d/destructive_analyzer/proc/ConvertReqString2List(list/source_list) var/list/temp_list = params2list(source_list) for(var/O in temp_list) temp_list[O] = text2num(temp_list[O]) return temp_list /obj/machinery/r_n_d/destructive_analyzer/disconnect_console() linked_console.linked_destroy = null ..() /obj/machinery/r_n_d/destructive_analyzer/Insert_Item(obj/item/O, mob/user) if(user.a_intent != INTENT_HARM) . = 1 if(!is_insertion_ready(user)) return if(!O.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") return var/list/temp_tech = ConvertReqString2List(O.origin_tech) if (temp_tech.len == 0) to_chat(user, "You cannot deconstruct this item!") return if(!user.drop_item()) to_chat(user, "\The [O] is stuck to your hand, you cannot put it in the [src.name]!") return busy = TRUE loaded_item = O O.forceMove(src) to_chat(user, "You add the [O.name] to the [src.name]!") flick("d_analyzer_la", src) addtimer(CALLBACK(src, .proc/finish_loading), 10) /obj/machinery/r_n_d/destructive_analyzer/proc/finish_loading() update_icon() busy = FALSE /obj/machinery/r_n_d/destructive_analyzer/update_icon() icon_state = "d_analyzer_l"