anchor.diff:  /obj/machinery/rnd/destructive_analyzer/proc/reclaim_materials_from(obj/item/thing)
   	. = 0
   	var/datum/component/material_container/storage = linked_console?.linked_lathe?.materials.mat_container
  -	if(storage) //Also sends salvaged materials to a linked protolathe, if any.
  -		for(var/material in thing.custom_materials)
  -			var/can_insert = min((storage.max_amount - storage.total_amount), (min(thing.custom_materials[material]*(decon_mod/10), thing.custom_materials[material])))
  -			storage.insert_amount_mat(can_insert, material)
  -			. += can_insert
  -		if (.)
  -			linked_console.linked_lathe.materials.silo_log(src, "reclaimed", 1, "[thing.name]", thing.custom_materials)
  +	if(!storage) // If we have no storage drop out
  +		return
  +	// sends salvaged materials to a linked protolathe, if any.
  +	for(var/material in thing.custom_materials)
  +		var/can_insert = 0 // the amount of material to insert
  +		if(istype(thing, /obj/item/stack/sheet))
  +			var/obj/item/stack/sheet/stack = thing
  +			if(stack.mats_per_unit)
  +				can_insert += stack.mats_per_unit[material]
  +			can_insert = min((storage.max_amount - storage.total_amount), (min(can_insert*(decon_mod/10), can_insert)))
  +		else
  +			can_insert = min((storage.max_amount - storage.total_amount), (min(thing.custom_materials[material]*(decon_mod/10), thing.custom_materials[material])))
  +		storage.insert_amount_mat(can_insert, material)
  +		. += can_insert
  +	if (.)
  +		linked_console.linked_lathe.materials.silo_log(src, "reclaimed", 1, "[thing.name]", thing.custom_materials)
   
   /obj/machinery/rnd/destructive_analyzer/proc/destroy_item(obj/item/thing, innermode = FALSE)
   	if(QDELETED(thing) || QDELETED(src) || QDELETED(linked_console))
  
positive.code: 		if(destroy_item(loaded_item))
  			linked_console.stored_research.add_point_list(point_value)
  			linked_console.stored_research.deconstructed_items[loaded_type] = point_value
  	return TRUE
  
  /obj/machinery/rnd/destructive_analyzer/proc/unload_item()
  
negative.code: 	if(istype(thing, /obj/item/stack/sheet))
  		var/obj/item/stack/sheet/S = thing
  		if(S.amount > 1 && !innermode)
  			S.use(1, check=FALSE)
  			loaded_item = S
  		else
  			qdel(thing)
  			loaded_item = null
  	else
  		qdel(thing)
  		loaded_item = null
  	if (!innermode)
  		update_icon()
  	return TRUE
  