<commit_before>
/////////////
//DRONE SAY//
/////////////
//Drone speach
//Drone hearing


/mob/living/simple_animal/drone/say(message)
	return ..(message, "R")


/mob/living/simple_animal/drone/lang_treat(atom/movable/speaker, message_langs, raw_message) //This is so drones can understand humans without being able to speak human
	. = ..()
	var/hear_override_langs = HUMAN
	if(message_langs & hear_override_langs)
		return ..(speaker, languages, raw_message)


/mob/living/simple_animal/drone/handle_inherent_channels(message, message_mode)
	if(message_mode == MODE_BINARY)
		drone_chat(message)
		return ITALICS | REDUCE_RANGE
	else
		..()


/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
	for(var/mob/M in player_list)
		var/send_msg = 0

		if(istype(M, /mob/living/simple_animal/drone) && M.stat != DEAD)
			for(var/F in src.faction)
				if(F in M.faction)
					send_msg = 1
					break
		else if(dead_can_hear && (M in dead_mob_list))
			send_msg = 1

		if(send_msg)
			M << msg


/mob/living/simple_animal/drone/proc/drone_chat(msg)
	var/rendered = "<i><span class='game say'>DRONE CHAT: <span class='name'>[name]</span>: [msg]</span></i>"
	alert_drones(rendered, 1)<commit_msg>Drone messages now have a follow link for ghosts. GAME and SAY are not span classes that do anything.<commit_after>
/////////////
//DRONE SAY//
/////////////
//Drone speach
//Drone hearing


/mob/living/simple_animal/drone/say(message)
	return ..(message, "R")


/mob/living/simple_animal/drone/lang_treat(atom/movable/speaker, message_langs, raw_message) //This is so drones can understand humans without being able to speak human
	. = ..()
	var/hear_override_langs = HUMAN
	if(message_langs & hear_override_langs)
		return ..(speaker, languages, raw_message)


/mob/living/simple_animal/drone/handle_inherent_channels(message, message_mode)
	if(message_mode == MODE_BINARY)
		drone_chat(message)
		return ITALICS | REDUCE_RANGE
	else
		..()


/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
	for(var/mob/M in mob_list)
		if(istype(M, /mob/living/simple_animal/drone) && M.stat != DEAD)
			for(var/F in src.faction)
				if(F in M.faction)
					M << msg
		if(dead_can_hear && (M in dead_mob_list))
			M << "<a href='?src=\ref[M];follow=\ref[src]'>(F)</a> [msg]"


/mob/living/simple_animal/drone/proc/drone_chat(msg)
	var/rendered = "<i>DRONE CHAT: <span class='name'>[name]</span>: [msg]</i>"
	alert_drones(rendered, 1)
{'fraction_non_alphanumeric': 0.16117216117216118, 'fraction_numerical': 0.002849002849002849, 'mean_word_length': 3.8481262327416172, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3748009', 'n_tokens_mistral': 1031, 'n_tokens_neox': 929, 'n_words': 182}