anchor.diff:  	anchored = 1
   	density = 1
   	var/obj/item/weapon/book/cache		// Last scanned book
  +	var/stage = 0
   	
   /obj/machinery/libraryscanner/New()
   	..()
   	var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/libraryscanner(null)
   	B.apply_default_parts(src)
  -
  +	
  +/obj/machinery/libraryscanner/Destroy()
  +	..()
  +	
   /obj/item/weapon/circuitboard/machine/libraryscanner
   	name = "circuit board (Library Scanner)"
   	build_path = /obj/machinery/libraryscanner
  
positive.code: 		bind_book(user, O)
  	else if(default_unfasten_wrench(user, O))
  		return 1
  	else
  		return ..()
  
  
negative.code: 	req_components = list(
  		/obj/item/weapon/stock_parts/micro_laser = 1,
  		/obj/item/weapon/stock_parts/scanning_module = 1)
  		
  /obj/machinery/libraryscanner/attackby(obj/O, mob/user, params)
  	if(istype(O, /obj/item/weapon/book))
  		if(!user.drop_item())
  			return
  		O.loc = src
  	else if(default_unfasten_wrench(user, O))
  		return 1
  	else if(istype(O, /obj/item/weapon/screwdriver))
  		if(stage == 0)
  			playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
  			user << "<span class='caution'>You unscrew the maintenance cover.</span>"
  			stage = 1
  		else if(stage == 1)
  			playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
  			user << "<span class='caution'>You screw in the maintenance cover.</span>"
  			stage = 0
  	else if(istype(O, /obj/item/weapon/crowbar) && stage == 1)
  		playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
  		user << "<span class='notice'>You start disassembling [src]...</span>"
  		new /obj/item/stack/sheet/metal(get_turf(src))
  		new /obj/item/weapon/stock_parts/micro_laser(get_turf(src))
  		new /obj/item/weapon/stock_parts/scanning_module(get_turf(src))
  		qdel(src)
  	else
  		return ..()
  
  