<commit_before>/mob/living/carbon/human
	name = "Unknown"
	real_name = "Unknown"
	voice_name = "Unknown"
	icon = 'icons/mob/human.dmi'
	icon_state = "caucasian1_m_s"



/mob/living/carbon/human/dummy
	real_name = "Test Dummy"
	status_flags = GODMODE|CANPUSH



/mob/living/carbon/human/New()
	verbs += /mob/living/proc/mob_sleep
	verbs += /mob/living/proc/lay_down

	//initialize dna. for spawned humans; overwritten by other code
	create_dna(src)
	randomize_human(src)
	dna.initialize_dna()

	//initialise organs
	organs = newlist(/obj/item/organ/limb/chest, /obj/item/organ/limb/head, /obj/item/organ/limb/l_arm,
					 /obj/item/organ/limb/r_arm, /obj/item/organ/limb/r_leg, /obj/item/organ/limb/l_leg)

	for(var/obj/item/organ/limb/O in organs)
		O.owner = src

	//initialise teeth
	var/obj/item/organ/limb/head/U = locate() in organs
	if(istype(U))
		U.teeth_list.Cut() //Clear out their mouth of teeth
		var/obj/item/stack/teeth/T = new dna.species.teeth_type(U)
		U.max_teeth = T.max_amount //Set max teeth for the head based on teeth spawntype
		T.amount = T.max_amount
		U.teeth_list += T

	internal_organs += new /obj/item/organ/internal/appendix
	internal_organs += new /obj/item/organ/internal/heart
	internal_organs += new /obj/item/organ/internal/brain
	internal_organs += new /obj/item/organ/internal/butt

	for(var/obj/item/organ/internal/I in internal_organs)
		I.Insert(src)

	make_blood()
	update_body()

	..()

	var/mob/M = src
	faction |= "\ref[M]"

/mob/living/carbon/human/prepare_data_huds()
	//Update med hud images...
	..()
	//...sec hud images...
	sec_hud_set_ID()
	sec_hud_set_implants()
	sec_hud_set_security_status()
	//...and display them.
	add_to_all_human_data_huds()

/mob/living/carbon/human/Destroy()
	for(var/atom/movable/organelle in organs)
		qdel(organelle)
	organs = list()
	return ..()

/mob/living/carbon/human/Stat()
	..()

	if(statpanel("Status"))
		stat(null, "Intent: [a_intent]")
		stat(null, "Move Mode: [m_intent]")
		if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
			var/datum/game_mode/malfunction/malf = ticker.mode
			if(malf.malf_mode_declared && (malf.apcs > 0))
				stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")

		if (internal)
			if (!internal.air_contents)
				qdel(internal)
			else
				stat("Internal Atmosphere Info", internal.name)
				stat("Tank Pressure", internal.air_contents.return_pressure())
				stat("Distribution Pressure", internal.distribute_pressure)
		if(mind)
			if(mind.changeling)
				stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
				stat("Absorbed DNA", mind.changeling.absorbedcount)
			if(mind.vampire)
				stat("Total Blood Stolen", "[mind.vampire.sucked_blood]cl")
				stat("Clean Blood", "[mind.vampire.clean_blood]cl")
				stat("Dirty Blood", "[mind.vampire.dirty_blood]cl")

				stat("Sanguine Regeneration", "[mind.vampire.fast_heal ? "ON" : "OFF"]")
				stat("Accelerated Recovery", "[mind.vampire.stun_reduction ? "ON" : "OFF"]")

	//NINJACODE
	if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja.
		var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit
		if(statpanel("SpiderOS"))
			stat("SpiderOS Status:","[SN.s_initialized ? "Initialized" : "Disabled"]")
			stat("Current Time:", "[worldtime2text()]")
			if(SN.s_initialized)
				//Suit gear
				stat("Energy Charge:", "[round(SN.cell.charge/100)]%")
				stat("Smoke Bombs:", "\Roman [SN.s_bombs]")
				//Ninja status
				stat("Fingerprints:", "[md5(dna.uni_identity)]")
				stat("Unique Identity:", "[dna.unique_enzymes]")
				stat("Overall Status:", "[stat > 1 ? "dead" : "[health]% healthy"]")
				stat("Nutrition Status:", "[nutrition]")
				stat("Oxygen Loss:", "[getOxyLoss()]")
				stat("Toxin Levels:", "[getToxLoss()]")
				stat("Burn Severity:", "[getFireLoss()]")
				stat("Brute Trauma:", "[getBruteLoss()]")
				stat("Radiation Levels:","[radiation] rad")
				stat("Body Temperature:","[bodytemperature-T0C] degrees C ([bodytemperature*1.8-459.67] degrees F)")

				//Virsuses
				if(viruses.len)
					stat("Viruses:", null)
					for(var/datum/disease/D in viruses)
						stat("*", "[D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]")


/mob/living/carbon/human/ex_act(severity, ex_target)
	var/b_loss = null
	var/f_loss = null
	var/bombarmor = getarmor(null, "bomb")
	switch (severity)
		if (1)
			b_loss += 500
			if (prob(getarmor(null, "bomb")))
				shred_clothing(1,150)
				var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
				throw_at(target, 200, 4)
			else
				gib()
				return

		if (2)
			b_loss += 60

			f_loss += 60
			if (getarmor(null, "bomb"))
				b_loss = max(b_loss-0.6*bombarmor, 20)
				f_loss = max(f_loss-0.6*bombarmor, 20)
				shred_clothing(1,25)
			else
				shred_clothing(1,50)

			if (!istype(ears, /obj/item/clothing/ears/earmuffs))
				adjustEarDamage(30, 120)
			if (prob(max(70-bombarmor, 0)))
				Paralyse(10)

		if(3)
			b_loss += 30
			if (getarmor(null, "bomb"))
				b_loss = b_loss-0.6*bombarmor
			if (!istype(ears, /obj/item/clothing/ears/earmuffs))
				adjustEarDamage(15,60)
			if (prob(max(50-bombarmor, 0)))
				Paralyse(10)

	var/update = 0
	var/dismember_chance = 50/severity //50, 25, 17~
	for(var/obj/item/organ/limb/temp in organs)
		if(prob(dismember_chance) && temp.body_part != HEAD && temp.body_part != CHEST && temp.dismember())
			continue // don't damage this limb further
		switch(temp.body_part)
			if(HEAD)
				update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2)
			if(CHEST)
				update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4)
			if(ARM_LEFT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(ARM_RIGHT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(LEG_LEFT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(LEG_RIGHT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)<commit_msg>agag<commit_after>/mob/living/carbon/human
	name = "Unknown"
	real_name = "Unknown"
	voice_name = "Unknown"
	icon = 'icons/mob/human.dmi'
	icon_state = "caucasian1_m_s"



/mob/living/carbon/human/dummy
	real_name = "Test Dummy"
	status_flags = GODMODE|CANPUSH



/mob/living/carbon/human/New()
	verbs += /mob/living/proc/mob_sleep
	verbs += /mob/living/proc/lay_down

	//initialize dna. for spawned humans; overwritten by other code
	create_dna(src)
	randomize_human(src)
	dna.initialize_dna()

	//initialise organs
	organs = newlist(/obj/item/organ/limb/chest, /obj/item/organ/limb/head, /obj/item/organ/limb/l_arm,
					 /obj/item/organ/limb/r_arm, /obj/item/organ/limb/r_leg, /obj/item/organ/limb/l_leg)

	for(var/obj/item/organ/limb/O in organs)
		O.owner = src

	//initialise teeth
	var/obj/item/organ/limb/head/U = locate() in organs
	if(istype(U))
		U.teeth_list.Cut() //Clear out their mouth of teeth
		var/obj/item/stack/teeth/T = new dna.species.teeth_type(U)
		U.max_teeth = T.max_amount //Set max teeth for the head based on teeth spawntype
		T.amount = T.max_amount
		U.teeth_list += T

	internal_organs += new /obj/item/organ/internal/appendix
	internal_organs += new /obj/item/organ/internal/heart
	internal_organs += new /obj/item/organ/internal/brain
	internal_organs += new /obj/item/organ/internal/butt

	for(var/obj/item/organ/internal/I in internal_organs)
		I.Insert(src)

	make_blood()
	update_body()

	..()

	var/mob/M = src
	faction |= "\ref[M]"

/mob/living/carbon/human/prepare_data_huds()
	//Update med hud images...
	..()
	//...sec hud images...
	sec_hud_set_ID()
	sec_hud_set_implants()
	sec_hud_set_security_status()
	//...and display them.
	add_to_all_human_data_huds()

/mob/living/carbon/human/Destroy()
	for(var/atom/movable/organelle in organs)
		qdel(organelle)
	organs = list()
	return ..()

/mob/living/carbon/human/Stat()
	..()

	if(statpanel("Status"))
		stat(null, "Intent: [a_intent]")
		stat(null, "Move Mode: [m_intent]")
		if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
			var/datum/game_mode/malfunction/malf = ticker.mode
			if(malf.malf_mode_declared && (malf.apcs > 0))
				stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")

		if (internal)
			if (!internal.air_contents)
				qdel(internal)
			else
				stat("Internal Atmosphere Info", internal.name)
				stat("Tank Pressure", internal.air_contents.return_pressure())
				stat("Distribution Pressure", internal.distribute_pressure)
		if(mind)
			if(mind.changeling)
				stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
				stat("Absorbed DNA", mind.changeling.absorbedcount)
			if(mind.vampire)
				stat("Total Blood Stolen", "[mind.vampire.sucked_blood]cl")
				stat("Clean Blood", "[mind.vampire.clean_blood]cl")
				stat("Dirty Blood", "[mind.vampire.dirty_blood]cl")

				stat("Sanguine Regeneration", "[mind.vampire.fast_heal ? "ON" : "OFF"]")
				stat("Accelerated Recovery", "[mind.vampire.stun_reduction ? "ON" : "OFF"]")

	//NINJACODE
	if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja.
		var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit
		if(statpanel("SpiderOS"))
			stat("SpiderOS Status:","[SN.s_initialized ? "Initialized" : "Disabled"]")
			stat("Current Time:", "[worldtime2text()]")
			if(SN.s_initialized)
				//Suit gear
				stat("Energy Charge:", "[round(SN.cell.charge/100)]%")
				stat("Smoke Bombs:", "\Roman [SN.s_bombs]")
				//Ninja status
				stat("Fingerprints:", "[md5(dna.uni_identity)]")
				stat("Unique Identity:", "[dna.unique_enzymes]")
				stat("Overall Status:", "[stat > 1 ? "dead" : "[health]% healthy"]")
				stat("Nutrition Status:", "[nutrition]")
				stat("Oxygen Loss:", "[getOxyLoss()]")
				stat("Toxin Levels:", "[getToxLoss()]")
				stat("Burn Severity:", "[getFireLoss()]")
				stat("Brute Trauma:", "[getBruteLoss()]")
				stat("Radiation Levels:","[radiation] rad")
				stat("Body Temperature:","[bodytemperature-T0C] degrees C ([bodytemperature*1.8-459.67] degrees F)")

				//Virsuses
				if(viruses.len)
					stat("Viruses:", null)
					for(var/datum/disease/D in viruses)
						stat("*", "[D.name], Type: [D.spread_text], Stage: [D.stage]/[D.max_stages], Possible Cure: [D.cure_text]")


/mob/living/carbon/human/ex_act(severity, ex_target)
	var/b_loss = null
	var/f_loss = null
	var/bombarmor = getarmor(null, "bomb")
	switch (severity)
		if (1)
			b_loss += 500
			if (prob(getarmor(null, "bomb")))
				shred_clothing(1,150)
				var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
				throw_at(target, 200, 4)
			else
				gib()
				return

		if (2)
			b_loss += 60
			f_loss += 60
			if (bombarmor)
				b_loss = max(b_loss-0.6*bombarmor, 15) // If you're this close, still always take damgae
				f_loss = max(f_loss-0.6*bombarmor, 15)
				shred_clothing(1,25-(bombarmor/8))
			else
				shred_clothing(1,50)

			if (!istype(ears, /obj/item/clothing/ears/earmuffs))
				adjustEarDamage(30, 120)
			if (prob(70-(bombarmor/2)) // Still a 20% chance even with a bomb suit
				Paralyse(10)

		if(3)
			b_loss += 30
			if (bombarmor)
				b_loss = max(b_loss-0.6*bombarmor, 10)
			if (!istype(ears, /obj/item/clothing/ears/earmuffs))
				adjustEarDamage(15,60)
			if (prob(max(50-(bombarmor/1.5),0)))
				Paralyse(10)

	var/update = 0
	var/dismember_chance = (50/severity)-(bombarmor/4) //50, 25, 17~
	for(var/obj/item/organ/limb/temp in organs)
		if(prob(dismember_chance) && temp.body_part != HEAD && temp.body_part != CHEST && temp.dismember())
			continue // don't damage this limb further
		switch(temp.body_part)
			if(HEAD)
				update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2)
			if(CHEST)
				update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4)
			if(ARM_LEFT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(ARM_RIGHT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(LEG_LEFT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
			if(LEG_RIGHT)
				update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
{'fraction_non_alphanumeric': 0.16811522224981376, 'fraction_numerical': 0.01936925751179538, 'mean_word_length': 3.877674606378684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5207700', 'n_tokens_mistral': 5599, 'n_tokens_neox': 4782, 'n_words': 835}