anchor.diff:  	model = "Cleanbot"
   	bot_core_type = /obj/machinery/bot_core/cleanbot
   	window_id = "autoclean"
  -	window_name = "Automatic Station Cleaner v1.1"
  +	window_name = "Automatic Station Cleaner v1.2"
   	pass_flags = PASSMOB
   
   	var/blood = 1
  +	var/trash = 0
  +	var/pests = 0
  +
   	var/list/target_types = list()
   	var/obj/effect/decal/cleanable/target
   	var/max_targets = 50 //Maximum number of targets a cleanbot can ignore.
  
positive.code: 
  	if(target && loc == target.loc)
  		if(!(check_bot(target) && prob(50)))	//Target is not defined at the parent. 50% chance to still try and clean so we dont get stuck on the last blood drop.
  			clean(target)	//Rather than check at every step of the way, let's check before we do an action, so we can rescan before the other bot.
  		else
  			shuffle = TRUE	//Shuffle the list the next time we scan so we dont both go the same way.
  		path = list()
  		target = null
  
  	oldloc = loc
  
  /mob/living/simple_animal/bot/cleanbot/proc/get_targets()
  	target_types = new/list()
  
  	target_types += /obj/effect/decal/cleanable/oil
  	target_types += /obj/effect/decal/cleanable/vomit
  	target_types += /obj/effect/decal/cleanable/robot_debris
  	target_types += /obj/effect/decal/cleanable/crayon
  	target_types += /obj/effect/decal/cleanable/molten_item
  	target_types += /obj/effect/decal/cleanable/tomato_smudge
  	target_types += /obj/effect/decal/cleanable/egg_smudge
  	target_types += /obj/effect/decal/cleanable/pie_smudge
  	target_types += /obj/effect/decal/cleanable/flour
  	target_types += /obj/effect/decal/cleanable/ash
  	target_types += /obj/effect/decal/cleanable/greenglow
  	target_types += /obj/effect/decal/cleanable/dirt
  	target_types += /obj/effect/decal/cleanable/deadcockroach
  
  	if(blood)
  		target_types += /obj/effect/decal/cleanable/xenoblood/
  		target_types += /obj/effect/decal/cleanable/xenoblood/xgibs
  		target_types += /obj/effect/decal/cleanable/blood/
  		target_types += /obj/effect/decal/cleanable/blood/gibs/
  		target_types += /obj/effect/decal/cleanable/blood/drip/
  		target_types += /obj/effect/decal/cleanable/trail_holder
  
  /mob/living/simple_animal/bot/cleanbot/proc/clean(obj/effect/decal/cleanable/target)
  	anchored = 1
  	icon_state = "cleanbot-c"
  	visible_message("<span class='notice'>[src] begins to clean up [target].</span>")
  	mode = BOT_CLEANING
  	spawn(50)
  		if(mode == BOT_CLEANING)
  			qdel(target)
  			anchored = 0
  			target = null
  		mode = BOT_IDLE
  		icon_state = "cleanbot[on]"
  
  /mob/living/simple_animal/bot/cleanbot/explode()
  	on = 0
  
negative.code: 	dat += hack(user)
  	dat += showpai(user)
  	dat += text({"
  Status: <A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A><BR>
  Behaviour controls are [locked ? "locked" : "unlocked"]<BR>
  Maintenance panel panel is [open ? "opened" : "closed"]"})
  	if(!locked || issilicon(user)|| IsAdminGhost(user))
  		dat += "<BR>Clean Blood: <A href='?src=\ref[src];operation=blood'>[blood ? "Yes" : "No"]</A>"
  		dat += "<BR>Clean Trash: <A href='?src=\ref[src];operation=trash'>[trash ? "Yes" : "No"]</A>"
  		dat += "<BR>Exterminate Pests: <A href='?src=\ref[src];operation=pests'>[pests ? "Yes" : "No"]</A>"
  		dat += "<BR><BR>Patrol Station: <A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "Yes" : "No"]</A>"
  	return dat
  
  /mob/living/simple_animal/bot/cleanbot/Topic(href, href_list)
  	if(..())
  		return 1
  	if(href_list["operation"])
  		switch(href_list["operation"])
  			if("blood")
  				blood = !blood
  			if("pests")
  				pests = !pests
  			if("trash")
  				trash = !trash
  		get_targets()
  		update_controls()
  