anchor.diff:  			maptext_x = 13
   		if(10 to 99)
   			maptext_x = 10
  -		if(100 to 999)
  +		if(100)
   			maptext_x = 8
   	maptext = "[current_number]" //Finally, apply the maptext
   
   /obj/machinery/ticket_machine/attackby(obj/item/I, mob/user, params)
   	..()
  -	if(ticket_number >= max_number)
  -		to_chat(user, "<span class='notice'>[src] refuses [I]!, perhaps it's already full?.</span>")
  -		return
   	if(istype(I, /obj/item/hand_labeler_refill))
  +		if(!(ticket_number >= max_number))
  +			to_chat(user, "<span class='notice'>[src] refuses [I]! There [max_number-ticket_number==1 ? "is" : "are"] still [max_number-ticket_number] ticket\s left!</span>")
  +			return
   		to_chat(user, "<span class='notice'>You start to refill [src]'s ticket holder (doing this will reset its ticket count!).</span>")
   		if(do_after(user, 30, target = src))
  -			to_chat(user, "<span class='notice'>You insert [I] into [src] as it whirrs nondescriptly.</span>")
  +			to_chat(user, "<span class='notice'>You insert [I] into [src] as it whirs nondescriptly.</span>")
   			qdel(I)
   			ticket_number = 0
   			current_number = 0
  +			if(tickets.len)
  +				for(var/obj/item/ticket_machine_ticket/ticket in tickets)
  +					ticket.visible_message("<span class='notice'>\the [ticket] disperses!</span>")
  +					qdel(ticket)
  +				tickets.Cut()
   			max_number = initial(max_number)
   			update_icon()
   			return
  -	if(istype(I, /obj/item/ticket_machine_ticket))
  -		to_chat(user, "<span class='warning'>You start to cram [I] into [src]'s recycling bin.</span>")
  -		if(do_after(user, 20, target = src)) //Slight delay so they don't accidentally dispose of their ticket and move to the BACK OF THE LINE
  -			qdel(I)
  -			return
   
   /obj/machinery/ticket_machine/proc/reset_cooldown()
   	ready = TRUE
  
positive.code: 	resistance_flags = FLAMMABLE
  	max_integrity = 50
  	var/saved_maptext = null
  
  /obj/item/ticket_machine_ticket/attack_hand(mob/user)
  	. = ..()
  
negative.code: 	if(current_number >= ticket_number)
  		return
  	playsound(src, 'sound/misc/announce_dig.ogg', 50, 0)
  	if(current_number && !(obj_flags & EMAGGED) && tickets[current_number])
  		tickets[current_number].visible_message("<span class='notice'>\the [tickets[current_number]] disperses!</span>")
  		qdel(tickets[current_number])
  	current_number ++ //Increment the one we're serving.
  	say("Now serving ticket #[current_number]!")
  	if(!(obj_flags & EMAGGED) && tickets[current_number])
  		tickets[current_number].visible_message("<span class='notice'>\the [tickets[current_number]] vibrates!</span>")
  	update_icon() //Update our icon here rather than when they take a ticket to show the current ticket number being served
  
  /obj/machinery/button/ticket_machine
  	name = "increment ticket counter"
  	desc = "Use this button after you've served someone to tell the next person to come forward."
  	device_type = /obj/item/assembly/control/ticket_machine
  	req_access = list()
  	id = "ticket_machine_default"
  