<commit_before>/datum/round_event_control/grid_check
	name = "Grid Check"
	typepath = /datum/round_event/grid_check
	weight = 10
	min_players = 3
	earliest_start = 6000
	max_occurrences = 3

/datum/round_event/grid_check
	announceWhen	= 1
	startWhen = 1

/datum/round_event/grid_check/announce()
	priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/AI/poweroff.ogg')


/datum/round_event/grid_check/start()

	var/static/list/smes_skip = typecacheof(list(/area/engine/engine_smes, /area/turret_protected))

	for(var/V in smes_list)
		var/obj/machinery/power/smes/S = V

		var/area/A = get_area(S)
		if(is_type_in_typecache(A,smes_skip) || S.z != ZLEVEL_STATION)
			continue

		S.energy_fail(rand(15,30))

	var/static/list/skipped_areas = typecacheof(list(/area/engine/engineering, /area/turret_protected/ai))

	for(var/P in apcs_list)
		var/obj/machinery/power/apc/C = P
		if(C.cell && C.z == ZLEVEL_STATION)
			var/area/A = get_area(C)

			if(is_type_in_typecache(A,skipped_areas))
				continue

			C.energy_fail(rand(30,60))<commit_msg>Removes some limits and ups the max disable time to 2 minutes.<commit_after>/datum/round_event_control/grid_check
	name = "Grid Check"
	typepath = /datum/round_event/grid_check
	weight = 10
	max_occurrences = 3

/datum/round_event/grid_check
	announceWhen	= 1
	startWhen = 1

/datum/round_event/grid_check/announce()
	priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/AI/poweroff.ogg')


/datum/round_event/grid_check/start()

	var/static/list/smes_skip = typecacheof(list(/area/engine/engine_smes, /area/turret_protected))

	for(var/V in smes_list)
		var/obj/machinery/power/smes/S = V

		var/area/A = get_area(S)
		if(is_type_in_typecache(A,smes_skip) || S.z != ZLEVEL_STATION)
			continue

		S.energy_fail(rand(15,30))

	var/static/list/skipped_areas = typecacheof(list(/area/engine/engineering, /area/turret_protected/ai))

	for(var/P in apcs_list)
		var/obj/machinery/power/apc/C = P
		if(C.cell && C.z == ZLEVEL_STATION)
			var/area/A = get_area(C)

			if(is_type_in_typecache(A,skipped_areas))
				continue

			C.energy_fail(rand(30,120))
{'fraction_non_alphanumeric': 0.12301918265221018, 'fraction_numerical': 0.013761467889908258, 'mean_word_length': 4.725536992840095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6794171', 'n_tokens_mistral': 1013, 'n_tokens_neox': 909, 'n_words': 160}