<commit_before>/datum/round_event_control/spawn_swarmer
	name = "Spawn Swarmer Shell"
	typepath = /datum/round_event/spawn_swarmer
	weight = 7
	max_occurrences = 1 //Only once okay fam
	earliest_start = 30 MINUTES
	min_players = 15


/datum/round_event/spawn_swarmer/start()
	if(find_swarmer())
		return 0
	var/list/obj/machinery/gravity_generator/main/gens = GLOB.gravity_generators["[pick(SSmapping.levels_by_trait(ZTRAIT_STATION))]"]
	if(!gens.len)
		return 0
	new /obj/effect/mob_spawn/swarmer(get_turf(pick(gens)))
	if(prob(25)) //25% chance to announce it to the crew
		var/swarmer_report = "<span class='big bold'>[command_name()] High-Priority Update</span>"
		swarmer_report += "<br><br>Our long-range sensors have detected an odd signal emanating from your station's gravity generator. We recommend immediate investigation of your gravity generator, as something may have come through." //Magnets man who knows how they work!
		print_command_report(swarmer_report, announce=TRUE)

/datum/round_event/spawn_swarmer/proc/find_swarmer()
	for(var/i in GLOB.mob_living_list)
		var/mob/living/L = i
		if(istype(L, /mob/living/simple_animal/hostile/swarmer) && L.client) //If there is a swarmer with an active client, we've found our swarmer
			return 1
	return 0<commit_msg>Makes swarmers spawn in spawn menu<commit_after>/datum/round_event_control/spawn_swarmer
	name = "Spawn Swarmer Shell"
	typepath = /datum/round_event/spawn_swarmer
	weight = 7
	max_occurrences = 1 //Only once okay fam
	earliest_start = 30 MINUTES
	min_players = 15

/datum/round_event/spawn_swarmer

/datum/round_event/spawn_swarmer/start()
	if(find_swarmer())
		return 0
	var/list/obj/machinery/gravity_generator/main/gens = GLOB.gravity_generators["[pick(SSmapping.levels_by_trait(ZTRAIT_STATION))]"]
	if(!gens.len)
		return 0
	new /obj/effect/mob_spawn/swarmer(get_turf(pick(gens)))
	if(prob(25)) //25% chance to announce it to the crew
		var/swarmer_report = "<span class='big bold'>[command_name()] High-Priority Update</span>"
		swarmer_report += "<br><br>Our long-range sensors have detected an odd signal emanating from your station's gravity generator. We recommend immediate investigation of your gravity generator, as something may have come through." //Magnets man who knows how they work!
		print_command_report(swarmer_report, announce=TRUE)

/datum/round_event/spawn_swarmer/proc/find_swarmer()
	for(var/i in GLOB.mob_living_list)
		var/mob/living/L = i
		if(istype(L, /mob/living/simple_animal/hostile/swarmer) && L.client) //If there is a swarmer with an active client, we've found our swarmer
			return 1
	return 0
{'fraction_non_alphanumeric': 0.10689655172413794, 'fraction_numerical': 0.010727969348659003, 'mean_word_length': 5.187203791469194, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1461283', 'n_tokens_mistral': 986, 'n_tokens_neox': 922, 'n_words': 225}