<commit_before>/*
 * Copyright  2014 <NAME>
 * Distributed under the GNU Affero General Public License, version 3.
 * Your changes must be made public.
 * For the full license text, see LICENSE.txt.
 */
var/EventScheduler/scheduler = new()
atom/var/tmp/list/StatusEffect/LStatusEffects

atom/proc/AddStatusEffect(StatusEffect/pStatusEffect)
	if(src.LStatusEffects)
		src.LStatusEffects += pStatusEffect
	else
		src.LStatusEffects = list(pStatusEffect)

atom/proc/RemoveStatusEffect(StatusEffect/pStatusEffect)
	if(src.LStatusEffects)
		src.LStatusEffects -= pStatusEffect
		if(!LStatusEffects.len)
			LStatusEffects = null
Event
	e_StatusEffect
		var/StatusEffect/AttachedStatusEffect

		New(StatusEffect/pStatusEffect)
			//Set Event's parent to the StatusEffect
			..()
			src.AttachedStatusEffect = pStatusEffect

		fire()
			..()
			if(AttachedStatusEffect)AttachedStatusEffect.Deactivate()

	AFKCheck

		fire()
			..()
			spawn()
				AFK_Train_Scan()
				scheduler.schedule(src, world.tick_lag * rand(9000, 12000)) // 15 to 20 minutes

	ClanWars

		fire()
			..()
			spawn()
				toggle_clanwars()
				scheduler.schedule(src, world.tick_lag * 6048000) // 1 week

	Weather
		fire()
			..()
			spawn()<commit_msg>If afk check for some reason bumps a runtime, it will no longer stop the automation<commit_after>/*
 * Copyright  2014 <NAME>
 * Distributed under the GNU Affero General Public License, version 3.
 * Your changes must be made public.
 * For the full license text, see LICENSE.txt.
 */
var/EventScheduler/scheduler = new()
atom/var/tmp/list/StatusEffect/LStatusEffects

atom/proc/AddStatusEffect(StatusEffect/pStatusEffect)
	if(src.LStatusEffects)
		src.LStatusEffects += pStatusEffect
	else
		src.LStatusEffects = list(pStatusEffect)

atom/proc/RemoveStatusEffect(StatusEffect/pStatusEffect)
	if(src.LStatusEffects)
		src.LStatusEffects -= pStatusEffect
		if(!LStatusEffects.len)
			LStatusEffects = null
Event
	e_StatusEffect
		var/StatusEffect/AttachedStatusEffect

		New(StatusEffect/pStatusEffect)
			//Set Event's parent to the StatusEffect
			..()
			src.AttachedStatusEffect = pStatusEffect

		fire()
			..()
			if(AttachedStatusEffect)AttachedStatusEffect.Deactivate()

	AFKCheck

		fire()
			..()
			spawn()
				AFK_Train_Scan()
			scheduler.schedule(src, world.tick_lag * rand(9000, 12000) + 500) // 15 to 20 minutes

	ClanWars

		fire()
			..()
			spawn()
				toggle_clanwars()
				scheduler.schedule(src, world.tick_lag * 6048000) // 1 week

	Weather
		fire()
			..()
			spawn()
{'fraction_non_alphanumeric': 0.106187624750499, 'fraction_numerical': 0.021956087824351298, 'mean_word_length': 3.923379174852652, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3059394', 'n_tokens_mistral': 971, 'n_tokens_neox': 814, 'n_words': 179}