<commit_before>////Deactivated swarmer shell////
/obj/item/device/unactivated_swarmer
	name = "unactivated swarmer"
	desc = "A currently unactivated swarmer. Swarmers can self activate at any time, it would be wise to immediately dispose of this."
	icon = 'icons/mob/swarmer.dmi'
	icon_state = "swarmer_unactivated"
	origin_tech = "bluespace=4;materials=4;programming=7"
	materials = list(MAT_METAL=10000, MAT_GLASS=4000)
	var/creator = 0


/obj/item/device/unactivated_swarmer/New()
	if(!crit_fail)
		notify_ghosts("An unactivated swarmer has been created in [get_area(src)]!", enter_link = "<a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
	..()

/obj/item/device/unactivated_swarmer/Topic(href, href_list)
	if(href_list["ghostjoin"])
		var/mob/dead/observer/ghost = usr
		if(istype(ghost))
			attack_ghost(ghost)

/obj/item/device/unactivated_swarmer/attackby(obj/item/weapon/W, mob/user, params)
	..()
	if(istype(W, /obj/item/weapon/screwdriver) && !crit_fail)
		user.visible_message("<span class='warning'>[usr.name] deactivates [src].</span>",
			"<span class='notice'>After some fiddling, you find a way to disable [src]'s power source.</span>",
			"<span class='italics'>You hear clicking.</span>")
		name = "deactivated swarmer"
		desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
		crit_fail = 1

/obj/item/device/unactivated_swarmer/attack_ghost(mob/user)
	if(crit_fail)
		user << "This swarmer shell is completely depowered. You cannot activate it."
		return

	var/be_swarmer = alert("Become a swarmer? (Warning, You can no longer be cloned!)",,"Yes","No")
	if(be_swarmer == "No")
		return
	if(crit_fail)
		user << "Swarmer has been depowered."
		return
	if(qdeleted(src))
		user << "Swarmer has been occupied by someone else."
		return
	var/mob/living/simple_animal/hostile/swarmer/S = new /mob/living/simple_animal/hostile/swarmer(get_turf(loc))
	S.key = user.key
	S.creator = creator
	qdel(src)


/obj/item/device/unactivated_swarmer/deactivated
	name = "deactivated swarmer"
	desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
	crit_fail = 1


////The Mob itself////

/mob/living/simple_animal/hostile/swarmer
	name = "Swarmer"
	unique_name = 1
	icon = 'icons/mob/swarmer.dmi'
	desc = "A robot of unknown design, they seek only to consume materials and replicate themselves indefinitely."
	speak_emote = list("tones")
	bubble_icon = "swarmer"
	health = 40
	maxHealth = 40
	status_flags = list(CANPUSH)
	icon_state = "swarmer"
	icon_living = "swarmer"
	icon_dead = "swarmer_unactivated"
	icon_gib = null
	wander = 0
	harm_intent_damage = 5
	minbodytemp = 0
	maxbodytemp = 500
	atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
	unsuitable_atmos_damage = 0
	melee_damage_lower = 15
	melee_damage_upper = 15
	melee_damage_type = STAMINA
	damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
	hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD)
	languages_spoken = SWARMER
	languages_understood = SWARMER
	environment_smash = 0
	attacktext = "shocks"
	attack_sound = 'sound/effects/EMPulse.ogg'
	friendly = "pinches"
	speed = 0
	faction = list("swarmer")
	AIStatus = AI_OFF
	pass_flags = PASSTABLE
	mob_size = MOB_SIZE_TINY
	ventcrawler = 2
	ranged = 1
	projectiletype = /obj/item/projectile/beam/disabler
	ranged_cooldown_time = 20
	projectilesound = 'sound/weapons/taser2.ogg'
	loot = list(/obj/effect/decal/cleanable/robot_debris, /obj/item/weapon/ore/bluespace_crystal/artificial)
	del_on_death = 1
	deathmessage = "explodes with a sharp pop!"
	var/resources = 0 //Resource points, generated by consuming metal/glass
	var/creator = 0
	var/max_resources = 100

/mob/living/simple_animal/hostile/swarmer/Login()
	..()
	src << "<b>You are a swarmer, a weapon of a long dead civilization. Until further orders from your original masters are received, you must continue to consume and replicate.</b>"
	src << "<b>Clicking on any object will try to consume it, either deconstructing it into its components, destroying it, or integrating any materials it has into you if successful.</b>"
	src << "<b>Ctrl-Clicking on a mob will attempt to remove it from the area and place it in a safe environment for storage.</b>"
	src << "<b>Objectives:</b>"
	if(creator)
		src << "1. Serve the one who created you at any cost."
	else
		src << "1. Consume resources and replicate until there are no more resources left."
		src << "2. Ensure that this location is fit for invasion at a later date; do not perform actions that would render it dangerous or inhospitable."
		src << "3. Biological resources will be harvested at a later date; do not harm them."
<commit_msg>Swarmers move a little slower<commit_after>////Deactivated swarmer shell////
/obj/item/device/unactivated_swarmer
	name = "unactivated swarmer"
	desc = "A currently unactivated swarmer. Swarmers can self activate at any time, it would be wise to immediately dispose of this."
	icon = 'icons/mob/swarmer.dmi'
	icon_state = "swarmer_unactivated"
	origin_tech = "bluespace=4;materials=4;programming=7"
	materials = list(MAT_METAL=10000, MAT_GLASS=4000)
	var/creator = 0


/obj/item/device/unactivated_swarmer/New()
	if(!crit_fail)
		notify_ghosts("An unactivated swarmer has been created in [get_area(src)]!", enter_link = "<a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
	..()

/obj/item/device/unactivated_swarmer/Topic(href, href_list)
	if(href_list["ghostjoin"])
		var/mob/dead/observer/ghost = usr
		if(istype(ghost))
			attack_ghost(ghost)

/obj/item/device/unactivated_swarmer/attackby(obj/item/weapon/W, mob/user, params)
	..()
	if(istype(W, /obj/item/weapon/screwdriver) && !crit_fail)
		user.visible_message("<span class='warning'>[usr.name] deactivates [src].</span>",
			"<span class='notice'>After some fiddling, you find a way to disable [src]'s power source.</span>",
			"<span class='italics'>You hear clicking.</span>")
		name = "deactivated swarmer"
		desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
		crit_fail = 1

/obj/item/device/unactivated_swarmer/attack_ghost(mob/user)
	if(crit_fail)
		user << "This swarmer shell is completely depowered. You cannot activate it."
		return

	var/be_swarmer = alert("Become a swarmer? (Warning, You can no longer be cloned!)",,"Yes","No")
	if(be_swarmer == "No")
		return
	if(crit_fail)
		user << "Swarmer has been depowered."
		return
	if(qdeleted(src))
		user << "Swarmer has been occupied by someone else."
		return
	var/mob/living/simple_animal/hostile/swarmer/S = new /mob/living/simple_animal/hostile/swarmer(get_turf(loc))
	S.key = user.key
	S.creator = creator
	qdel(src)


/obj/item/device/unactivated_swarmer/deactivated
	name = "deactivated swarmer"
	desc = "A shell of swarmer that was completely powered down. It no longer can activate itself."
	crit_fail = 1


////The Mob itself////

/mob/living/simple_animal/hostile/swarmer
	name = "Swarmer"
	unique_name = 1
	icon = 'icons/mob/swarmer.dmi'
	desc = "A robot of unknown design, they seek only to consume materials and replicate themselves indefinitely."
	speak_emote = list("tones")
	bubble_icon = "swarmer"
	health = 40
	maxHealth = 40
	status_flags = list(CANPUSH)
	icon_state = "swarmer"
	icon_living = "swarmer"
	icon_dead = "swarmer_unactivated"
	icon_gib = null
	wander = 0
	harm_intent_damage = 5
	minbodytemp = 0
	maxbodytemp = 500
	atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
	unsuitable_atmos_damage = 0
	melee_damage_lower = 15
	melee_damage_upper = 15
	melee_damage_type = STAMINA
	damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
	hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD)
	languages_spoken = SWARMER
	languages_understood = SWARMER
	environment_smash = 0
	attacktext = "shocks"
	attack_sound = 'sound/effects/EMPulse.ogg'
	friendly = "pinches"
	speed = 1
	faction = list("swarmer")
	AIStatus = AI_OFF
	pass_flags = PASSTABLE
	mob_size = MOB_SIZE_TINY
	ventcrawler = 2
	ranged = 1
	projectiletype = /obj/item/projectile/beam/disabler
	ranged_cooldown_time = 20
	projectilesound = 'sound/weapons/taser2.ogg'
	loot = list(/obj/effect/decal/cleanable/robot_debris, /obj/item/weapon/ore/bluespace_crystal/artificial)
	del_on_death = 1
	deathmessage = "explodes with a sharp pop!"
	var/resources = 0 //Resource points, generated by consuming metal/glass
	var/creator = 0
	var/max_resources = 100

/mob/living/simple_animal/hostile/swarmer/Login()
	..()
	src << "<b>You are a swarmer, a weapon of a long dead civilization. Until further orders from your original masters are received, you must continue to consume and replicate.</b>"
	src << "<b>Clicking on any object will try to consume it, either deconstructing it into its components, destroying it, or integrating any materials it has into you if successful.</b>"
	src << "<b>Ctrl-Clicking on a mob will attempt to remove it from the area and place it in a safe environment for storage.</b>"
	src << "<b>Objectives:</b>"
	if(creator)
		src << "1. Serve the one who created you at any cost."
	else
		src << "1. Consume resources and replicate until there are no more resources left."
		src << "2. Ensure that this location is fit for invasion at a later date; do not perform actions that would render it dangerous or inhospitable."
		src << "3. Biological resources will be harvested at a later date; do not harm them."

{'fraction_non_alphanumeric': 0.11699049193881769, 'fraction_numerical': 0.013848697809011988, 'mean_word_length': 4.495173197047133, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 35, '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': '5521050', 'n_tokens_mistral': 3727, 'n_tokens_neox': 3446, 'n_words': 974}