<commit_before>/turf/space
	icon = 'icons/turf/space.dmi'
	name = "\proper space"
	icon_state = "0"
	intact = 0

	temperature = TCMB
	thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
	heat_capacity = 700000

	var/transition //These is used in transistions as a way to tell where on the "cube" of space you're transitioning from/to
	var/destination_x
	var/destination_y

/turf/space/New()
	if(!istype(src, /turf/space/transit))
		icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
	if(config)
		if(config.starlight)
			update_starlight()

/turf/space/proc/update_starlight()
	if(config)
		if(config.starlight)
			for(var/turf/T in orange(src,1))
				if(istype(T,/turf/simulated))
					SetLuminosity(3)
					return
			SetLuminosity(0)

/turf/space/attack_paw(mob/user as mob)
	return src.attack_hand(user)

/turf/space/attackby(obj/item/C, mob/user, params)
	..()
	if(istype(C, /obj/item/stack/rods))
		var/obj/item/stack/rods/R = C
		var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
		var/obj/structure/lattice/catwalk/W = locate(/obj/structure/lattice/catwalk, src)
		if(W)
			user << "<span class='warning'>There is already a catwalk here.</span>"
			return
		if(L)
			if(R.use(1))
				user << "<span class='notice'>Constructing catwalk...</span>"
				playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
				qdel(L)
				ReplaceWithCatwalk()
			else
				user << "<span class='warning'>You need two rods to build a catwalk.</span>"
			return
		if(R.use(1))
			user << "<span class='notice'>Constructing support lattice...</span>"
			playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
			ReplaceWithLattice()
		else
			user << "<span class='warning'>You need one rod to build a lattice.</span>"
		return
	if(istype(C, /obj/item/stack/tile/plasteel))
		var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
		if(L)
			var/obj/item/stack/tile/plasteel/S = C
			if(S.use(1))
				qdel(L)
				playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
				user << "<span class='notice'>You build a floor.</span>"
				ChangeTurf(/turf/simulated/floor/plating)
			else
				user << "<span class='warning'>You need one floor tile to build a floor.</span>"
		else<commit_msg>Add delay to catwalk construction<commit_after>/turf/space
	icon = 'icons/turf/space.dmi'
	name = "\proper space"
	icon_state = "0"
	intact = 0

	temperature = TCMB
	thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
	heat_capacity = 700000

	var/transition //These is used in transistions as a way to tell where on the "cube" of space you're transitioning from/to
	var/destination_x
	var/destination_y

/turf/space/New()
	if(!istype(src, /turf/space/transit))
		icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
	if(config)
		if(config.starlight)
			update_starlight()

/turf/space/proc/update_starlight()
	if(config)
		if(config.starlight)
			for(var/turf/T in orange(src,1))
				if(istype(T,/turf/simulated))
					SetLuminosity(3)
					return
			SetLuminosity(0)

/turf/space/attack_paw(mob/user as mob)
	return src.attack_hand(user)

/turf/space/attackby(obj/item/C, mob/user, params)
	..()
	if(istype(C, /obj/item/stack/rods))
		var/obj/item/stack/rods/R = C
		var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
		var/obj/structure/lattice/catwalk/W = locate(/obj/structure/lattice/catwalk, src)
		if(W)
			user << "<span class='warning'>There is already a catwalk here.</span>"
			return
		if(L)
			if(R.use(1))
				user << "<span class='notice'>Constructing catwalk...</span>"
				playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
				if(do_after(user, 10, 5, 0))
					qdel(L)
					ReplaceWithCatwalk()
					user << "<span class='notice'>Catwalk constructed</span>"

			else
				user << "<span class='warning'>You need two rods to build a catwalk.</span>"
			return
		if(R.use(1))
			user << "<span class='notice'>Constructing support lattice...</span>"
			playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
			ReplaceWithLattice()
		else
			user << "<span class='warning'>You need one rod to build a lattice.</span>"
		return
	if(istype(C, /obj/item/stack/tile/plasteel))
		var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
		if(L)
			var/obj/item/stack/tile/plasteel/S = C
			if(S.use(1))
				qdel(L)
				playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
				user << "<span class='notice'>You build a floor.</span>"
				ChangeTurf(/turf/simulated/floor/plating)
			else
				user << "<span class='warning'>You need one floor tile to build a floor.</span>"
		else
{'fraction_non_alphanumeric': 0.1595625976344566, 'fraction_numerical': 0.012050881499665253, 'mean_word_length': 3.703043022035677, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 33, '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': '1439560', 'n_tokens_mistral': 1962, 'n_tokens_neox': 1681, 'n_words': 351}