<commit_before>
/mob/living/simple_animal/Life()

	//Health
	if(stat == DEAD)
		if(health > 0)
			icon_state = icon_living
			stat = CONSCIOUS
			density = 1
		return
	else if(health < 1)
		Die()
	else if(health > maxHealth)
		health = maxHealth

	//Movement
	if(!ckey && !stop_automated_movement)
		if(isturf(src.loc) && !resting && !buckled && canmove)		//This is so it only moves if it's not inside a closet, gentics machine, etc.
			turns_since_move++
			if(turns_since_move >= turns_per_move)
				Move(get_step(src,pick(cardinal)))
				turns_since_move = 0

	//Speaking
	if(prob(speak_chance))
		var/length = speak.len + emote_hear.len + emote_see.len
		if(speak.len && prob((speak.len / length) * 100))
			say(pick(speak))
		else if(emote_see.len && prob((emote_see.len / length) * 100))
			emote("auto",1,pick(emote_see))
		else if(emote_hear.len)
			emote("auto",2,pick(emote_hear))
			//var/act,var/m_type=1,var/message = null

	//Atmos
	var/atmos_suitable = 1

	var/atom/A = src.loc
	if(isturf(A))
		var/turf/T = A
		var/areatemp = T.temperature
		if( abs(areatemp - bodytemperature) > 50 )
			var/diff = areatemp - bodytemperature
			diff = diff / 5
			//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
			bodytemperature += diff

		if(istype(T,/turf/simulated))<commit_msg>possible fix for recent crash /shrug<commit_after>
/mob/living/simple_animal/Life()

	//Health
	if(stat == DEAD)
		if(health > 0)
			icon_state = icon_living
			stat = CONSCIOUS
			density = 1
		return
	else if(health < 1)
		Die()
	else if(health > maxHealth)
		health = maxHealth

	//Movement
	if(!ckey && !stop_automated_movement)
		if(isturf(src.loc) && !resting && !buckled && canmove)		//This is so it only moves if it's not inside a closet, gentics machine, etc.
			turns_since_move++
			if(turns_since_move >= turns_per_move)
				Move(get_step(src,pick(cardinal)))
				turns_since_move = 0

	//Speaking
	if(prob(speak_chance))
		var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0)
		if(speak && speak.len && prob((speak.len / length) * 100))
			say(pick(speak))
		else if(emote_see && emote_see.len && prob((emote_see.len / length) * 100))
			emote("auto",1,pick(emote_see))
		else if(emote_hear && emote_hear.len)
			emote("auto",2,pick(emote_hear))
			//var/act,var/m_type=1,var/message = null

	//Atmos
	var/atmos_suitable = 1

	var/atom/A = src.loc
	if(isturf(A))
		var/turf/T = A
		var/areatemp = T.temperature
		if( abs(areatemp - bodytemperature) > 50 )
			var/diff = areatemp - bodytemperature
			diff = diff / 5
			//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
			bodytemperature += diff

		if(istype(T,/turf/simulated))
{'fraction_non_alphanumeric': 0.14613702623906705, 'fraction_numerical': 0.01348396501457726, 'mean_word_length': 3.66044142614601, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6197270', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1074, 'n_words': 223}