<commit_before>/obj/item/fermichem/pHbooklet
	name = "pH indicator booklet"
	desc = "A booklet containing paper soaked in universal indicator."
	icon_state = "pHbooklet"
	icon = 'icons/obj/chemical.dmi'
	item_flags = NOBLUDGEON
	var/numberOfPages = 50
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY

//A little janky with pockets
/obj/item/fermichem/pHbooklet/attack_hand(mob/user)
	if(user.get_held_index_of_item(src))//Does this check pockets too..?
		if(numberOfPages == 50)
			icon_state = "pHbookletOpen"
		if(numberOfPages >= 1)
			var/obj/item/fermichem/pHpaper/P = new /obj/item/fermichem/pHpaper
			P.add_fingerprint(user)
			P.forceMove(user.loc)
			user.put_in_active_hand(P)
			to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
			numberOfPages--
			playsound(user.loc, 'sound/items/poster_ripped.ogg', 50, 1)
			add_fingerprint(user)
			if(numberOfPages == 0)
				icon_state = "pHbookletEmpty"
			return
		else
			to_chat(user, "<span class='warning'>[src] is empty!</span>")
			add_fingerprint(user)
			return
	. = ..()
	if(. & COMPONENT_NO_INTERACT)
		return
	var/I = user.get_active_held_item()
	if(!I)
		user.put_in_active_hand(src)

/obj/item/fermichem/pHbooklet/MouseDrop()
	var/mob/living/user = usr
	if(numberOfPages >= 1)
		var/obj/item/fermichem/pHpaper/P = new /obj/item/fermichem/pHpaper
		P.add_fingerprint(user)
		P.forceMove(user)
		user.put_in_active_hand(P)
		to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
		numberOfPages--
		playsound(user.loc, 'sound/items/poster_ripped.ogg', 50, 1)
		add_fingerprint(user)
		if(numberOfPages == 0)
			icon_state = "pHbookletEmpty"
		return
	else
		to_chat(user, "<span class='warning'>[src] is empty!</span>")
		add_fingerprint(user)
		return
	..()

/obj/item/fermichem/pHpaper
	name = "pH indicator strip"
	desc = "A piece of paper that will change colour depending on the pH of a solution."
	icon_state = "pHpaper"
	icon = 'icons/obj/chemical.dmi'
	item_flags = NOBLUDGEON
	color = "#f5c352"
	var/used = FALSE
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY

/obj/item/fermichem/pHpaper/afterattack(obj/item/reagent_containers/cont, mob/user, proximity)
	if(!istype(cont))
		return
	if(used == TRUE)
		to_chat(user, "<span class='warning'>[src] has already been used!</span>")
		return
	if(!LAZYLEN(cont.reagents.reagent_list))
		return
	switch(round(cont.reagents.pH, 1))
		if(14 to INFINITY)
			color = "#462c83"
		if(13 to 14)
			color = "#63459b"
		if(12 to 13)
			color = "#5a51a2"
		if(11 to 12)
			color = "#3853a4"
		if(10 to 11)
			color = "#3f93cf"
		if(9 to 10)
			color = "#0bb9b7"
		if(8 to 9)
			color = "#23b36e"
		if(7 to 8)
			color = "#3aa651"
		if(6 to 7)
			color = "#4cb849"
		if(5 to 6)
			color = "#b5d335"
		if(4 to 5)
			color = "#f7ec1e"
		if(3 to 4)
			color = "#fbc314"
		if(2 to 3)
			color = "#f26724"
		if(1 to 2)
			color = "#ef1d26"
		if(-INFINITY to 1)
			color = "#c6040c"
	desc += " The paper looks to be around a pH of [round(cont.reagents.pH, 1)]"
	name = "used " + name
	used = TRUE

/obj/item/fermichem/pHmeter
	name = "Chemistry Analyser"
	desc = "A a electrode attached to a small circuit box that will tell you the pH of a solution. The screen currently displays nothing."
	icon_state = "pHmeter"
	icon = 'icons/obj/chemical.dmi'
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY
	var/scanmode = 1

/obj/item/fermichem/pHmeter/attack_self(mob/user)
	if(!scanmode)
		to_chat(user, "<span class='notice'>You switch the chemical analyzer to give a detailed report.</span>")
		scanmode = 1
	else
		to_chat(user, "<span class='notice'>You switch the chemical analyzer to give a reduced report.</span>")
		scanmode = 0
<commit_msg>concatenation tweak<commit_after>/obj/item/fermichem/pHbooklet
	name = "pH indicator booklet"
	desc = "A booklet containing paper soaked in universal indicator."
	icon_state = "pHbooklet"
	icon = 'icons/obj/chemical.dmi'
	item_flags = NOBLUDGEON
	var/numberOfPages = 50
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY

//A little janky with pockets
/obj/item/fermichem/pHbooklet/attack_hand(mob/user)
	if(user.get_held_index_of_item(src))//Does this check pockets too..?
		if(numberOfPages == 50)
			icon_state = "pHbookletOpen"
		if(numberOfPages >= 1)
			var/obj/item/fermichem/pHpaper/P = new /obj/item/fermichem/pHpaper
			P.add_fingerprint(user)
			P.forceMove(user.loc)
			user.put_in_active_hand(P)
			to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
			numberOfPages--
			playsound(user.loc, 'sound/items/poster_ripped.ogg', 50, 1)
			add_fingerprint(user)
			if(numberOfPages == 0)
				icon_state = "pHbookletEmpty"
			return
		else
			to_chat(user, "<span class='warning'>[src] is empty!</span>")
			add_fingerprint(user)
			return
	. = ..()
	if(. & COMPONENT_NO_INTERACT)
		return
	var/I = user.get_active_held_item()
	if(!I)
		user.put_in_active_hand(src)

/obj/item/fermichem/pHbooklet/MouseDrop()
	var/mob/living/user = usr
	if(numberOfPages >= 1)
		var/obj/item/fermichem/pHpaper/P = new /obj/item/fermichem/pHpaper
		P.add_fingerprint(user)
		P.forceMove(user)
		user.put_in_active_hand(P)
		to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
		numberOfPages--
		playsound(user.loc, 'sound/items/poster_ripped.ogg', 50, 1)
		add_fingerprint(user)
		if(numberOfPages == 0)
			icon_state = "pHbookletEmpty"
		return
	else
		to_chat(user, "<span class='warning'>[src] is empty!</span>")
		add_fingerprint(user)
		return
	..()

/obj/item/fermichem/pHpaper
	name = "pH indicator strip"
	desc = "A piece of paper that will change colour depending on the pH of a solution."
	icon_state = "pHpaper"
	icon = 'icons/obj/chemical.dmi'
	item_flags = NOBLUDGEON
	color = "#f5c352"
	var/used = FALSE
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY

/obj/item/fermichem/pHpaper/afterattack(obj/item/reagent_containers/cont, mob/user, proximity)
	if(!istype(cont))
		return
	if(used == TRUE)
		to_chat(user, "<span class='warning'>[src] has already been used!</span>")
		return
	if(!LAZYLEN(cont.reagents.reagent_list))
		return
	switch(round(cont.reagents.pH, 1))
		if(14 to INFINITY)
			color = "#462c83"
		if(13 to 14)
			color = "#63459b"
		if(12 to 13)
			color = "#5a51a2"
		if(11 to 12)
			color = "#3853a4"
		if(10 to 11)
			color = "#3f93cf"
		if(9 to 10)
			color = "#0bb9b7"
		if(8 to 9)
			color = "#23b36e"
		if(7 to 8)
			color = "#3aa651"
		if(6 to 7)
			color = "#4cb849"
		if(5 to 6)
			color = "#b5d335"
		if(4 to 5)
			color = "#f7ec1e"
		if(3 to 4)
			color = "#fbc314"
		if(2 to 3)
			color = "#f26724"
		if(1 to 2)
			color = "#ef1d26"
		if(-INFINITY to 1)
			color = "#c6040c"
	desc += " The paper looks to be around a pH of [round(cont.reagents.pH, 1)]"
	name = "used [name]"
	used = TRUE

/obj/item/fermichem/pHmeter
	name = "Chemistry Analyser"
	desc = "A a electrode attached to a small circuit box that will tell you the pH of a solution. The screen currently displays nothing."
	icon_state = "pHmeter"
	icon = 'icons/obj/chemical.dmi'
	resistance_flags = FLAMMABLE
	w_class = WEIGHT_CLASS_TINY
	var/scanmode = 1

/obj/item/fermichem/pHmeter/attack_self(mob/user)
	if(!scanmode)
		to_chat(user, "<span class='notice'>You switch the chemical analyzer to give a detailed report.</span>")
		scanmode = 1
	else
		to_chat(user, "<span class='notice'>You switch the chemical analyzer to give a reduced report.</span>")
		scanmode = 0

{'fraction_non_alphanumeric': 0.1368816195200429, 'fraction_numerical': 0.03190776243464272, 'mean_word_length': 3.927344782034346, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, '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': '3397617', 'n_tokens_mistral': 3414, 'n_tokens_neox': 2961, 'n_words': 677}