<commit_before>/*
* Forcefield
*/

/obj/effect/hangar_forcefield
	name = "forcefield"
	icon = 'icons/effects/effects.dmi'
	icon_state = "bay_forcefield"
	unacidable = 1
	luminosity = 3
	anchored = 1
	density = 1
	layer = 3.3

	var/obj/machinery/hangar_forcefield_generator/generator

	CanAtmosPass()
		if(!generator)
			return 1
		return generator.CanAtmosPass()

	CanPass(var/atom/movable/M, var/turf/T, var/height = 0, var/air_group = 0)
		if(!generator)
			return 1
		return generator.CanPass(M, T, height, air_group)

	Move(newloc, dir)
		if(!generator)
			qdel(src)
			return 0
		generator.DestroyShields()

/*
* Forcefield generator
*/

/obj/machinery/hangar_forcefield_generator
	name = "forcefield generator"
	icon_state = "bay_forcefield_gen"
	anchored = 1
	unacidable = 1
	density = 0
	opacity = 0
	layer = 3.4
	req_access = list(access_heads)

	var/list/shields = list()
	var/list/permeable = list(/obj/pod)
	var/obj/machinery/hangar_forcefield_generator/linked
	var/list/req_passing_access = list() // Required access to pass through the shield.
	var/floor_type = /turf/simulated/floor

	New(loc, var/generate = 1)
		..()

		if(generate)
			GenerateShields()

		active_power_usage =  (500 * (length(shields))) / 2

	Del()
		..()
		DestroyShields()
		qdel(linked)

	CanAtmosPass()
		return ("Atmospherics" in permeable)

	process()
		if(stat & (NOPOWER|BROKEN))
			DestroyShields()

		listclearnulls(shields)

		if(!length(shields) && !stat)
			GenerateShields(0)

	CanPass(var/atom/movable/M, var/turf/T, var/height = 0, var/air_group = 0)
		if(air_group || (height==0)) return 1

		if(emagged)
			return 1

		var/in_permeable = 0
		for(var/type in permeable)
			if(istype(M, type))<commit_msg>- Fixes forcefield generators generating shields when they shouldnt<commit_after>/*
* Forcefield
*/

/obj/effect/hangar_forcefield
	name = "forcefield"
	icon = 'icons/effects/effects.dmi'
	icon_state = "bay_forcefield"
	unacidable = 1
	luminosity = 3
	anchored = 1
	density = 1
	layer = 3.3

	var/obj/machinery/hangar_forcefield_generator/generator

	CanAtmosPass()
		if(!generator)
			return 1
		return generator.CanAtmosPass()

	CanPass(var/atom/movable/M, var/turf/T, var/height = 0, var/air_group = 0)
		if(!generator)
			return 1
		return generator.CanPass(M, T, height, air_group)

	Move(newloc, dir)
		if(!generator)
			qdel(src)
			return 0
		generator.DestroyShields()

/*
* Forcefield generator
*/

/obj/machinery/hangar_forcefield_generator
	name = "forcefield generator"
	icon_state = "bay_forcefield_gen"
	anchored = 1
	unacidable = 1
	density = 0
	opacity = 0
	layer = 3.4
	req_access = list(access_heads)

	var/list/shields = list()
	var/list/permeable = list(/obj/pod)
	var/obj/machinery/hangar_forcefield_generator/linked
	var/list/req_passing_access = list() // Required access to pass through the shield.
	var/floor_type = /turf/simulated/floor
	var/generate_shields = 1

	New(loc, var/generate = 1)
		..()

		if(generate)
			GenerateShields()
		else
			generate_shields = 0

		active_power_usage =  (500 * (length(shields))) / 2

	Del()
		..()
		DestroyShields()
		qdel(linked)

	CanAtmosPass()
		return ("Atmospherics" in permeable)

	process()
		if(stat & (NOPOWER|BROKEN))
			DestroyShields()

		listclearnulls(shields)

		if(!length(shields) && !stat && generate_shields)
			GenerateShields(0)

	CanPass(var/atom/movable/M, var/turf/T, var/height = 0, var/air_group = 0)
		if(air_group || (height==0)) return 1

		if(emagged)
			return 1

		var/in_permeable = 0
		for(var/type in permeable)
			if(istype(M, type))
{'fraction_non_alphanumeric': 0.12644651425345751, 'fraction_numerical': 0.01693480101608806, 'mean_word_length': 3.922222222222222, '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': '6612599', 'n_tokens_mistral': 1554, 'n_tokens_neox': 1350, 'n_words': 269}