<commit_before>#define DRYING_TIME 5 * 60*10			//for 1 unit of depth in puddle (amount var)


/obj/effect/decal/cleanable/blood
	name = "blood"
	desc = "It's red and gooey. Perhaps it's the chef's cooking?"
	gender = PLURAL
	density = 0
	anchored = 1
	layer = 2
	icon = 'icons/effects/blood.dmi'
	icon_state = "floor1"
	random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
	var/list/viruses = list()
	blood_DNA = list()
	var/list/datum/disease2/disease/virus2 = list()
	var/amount = 5

/obj/effect/decal/cleanable/blood/Destroy()
	for(var/datum/disease/D in viruses)
		D.cure(0)
		D.holder = null
	..()

/obj/effect/decal/cleanable/blood/New()
	..()
	if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
		return
	if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
		return // We handle our own drying.
	if(src.type == /obj/effect/decal/cleanable/blood)
		if(src.loc && isturf(src.loc))
			for(var/obj/effect/decal/cleanable/blood/B in src.loc)
				if(B != src)
					if (B.blood_DNA)
						blood_DNA |= B.blood_DNA.Copy()
					del(B)
	spawn(DRYING_TIME * (amount+1))
		dry()

/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
	if (!istype(perp))
		return
	if(amount < 1)
		return

	if(perp.shoes)
		perp.shoes:track_blood = max(amount,perp.shoes:track_blood)		//Adding blood to shoes
		if(!perp.shoes.blood_overlay)
			perp.shoes.generate_blood_overlay()
		if(!perp.shoes.blood_DNA)
			perp.shoes.blood_DNA = list()
			perp.shoes.overlays += perp.shoes.blood_overlay
			perp.update_inv_shoes(1,0)
		perp.shoes.blood_DNA |= blood_DNA.Copy()
	else
		perp.track_blood = max(amount,perp.track_blood)				//Or feet
		if(!perp.feet_blood_DNA)
			perp.feet_blood_DNA = list()
		perp.feet_blood_DNA |= blood_DNA.Copy()

	amount--

/obj/effect/decal/cleanable/blood/proc/dry()
	name = "dried [src]"
	desc = "It's dark red and crusty. Someone is not doing their job."
	var/icon/I = icon(icon,icon_state)
	I.SetIntensity(0.7)
	icon = I
	amount = 0
	spawn(DRYING_TIME)
		Destroy()

/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
	..()
	if (amount && istype(user))
		add_fingerprint(user)
		if (user.gloves)
			return
		var/taken = rand(1,amount)
		amount -= taken
		user << "<span class='notice'>You get some blood on your hands.</span>"
		if (!user.blood_DNA)
			user.blood_DNA = list()
		user.blood_DNA |= blood_DNA.Copy()
		user.bloody_hands += taken
		user.update_inv_gloves(1)
		user.verbs += /mob/living/carbon/human/proc/bloody_doodle

/obj/effect/decal/cleanable/blood/splatter
	random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
	amount = 2

/obj/effect/decal/cleanable/blood/writing
	icon_state = "tracks"
	desc = "It looks like a writing in blood."
	gender = NEUTER
	random_icon_states = list("writing1","writing2","writing3","writing4","writing5")
	amount = 0
	var/message

/obj/effect/decal/cleanable/blood/writing/New()
	..()
	for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
		random_icon_states.Remove(W.icon_state)
	icon_state = pick(random_icon_states)

/obj/effect/decal/cleanable/blood/writing/examine()
	..()
	usr << "It reads: <font color='#600000'>\"[message]\"<font>"


/obj/effect/decal/cleanable/blood/green
	name = "green blood"
	desc = "It's green and gooey. Perhaps it's the chef's cooking?"
	icon_state = "xfloor1"
	random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")

/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
	if (!istype(perp))
		return
	if(amount < 1)
		return

	if(perp.shoes)
		perp.shoes:track_blood_green= max(amount,perp.shoes:track_blood_green)		//Adding blood to shoes
		if(!perp.shoes.blood_overlay)
			perp.shoes.blood_overlay_color = 1
			perp.shoes.generate_blood_overlay()
		if(!perp.shoes.blood_DNA)
			perp.shoes.blood_DNA = list()
			perp.shoes.overlays += perp.shoes.blood_overlay
			perp.update_inv_shoes(1,1)
		perp.shoes.blood_DNA |= blood_DNA.Copy()
	else
		perp.track_blood_green = max(amount,perp.track_blood_green)				//Or feet
		if(!perp.feet_blood_DNA)
			perp.feet_blood_DNA = list()
		perp.feet_blood_DNA |= blood_DNA.Copy()

	amount--

/obj/effect/decal/cleanable/blood/drip/green
	name = "drips of blood"
	desc = "It's green."
	gender = PLURAL
	icon = 'icons/effects/drip.dmi'
	icon_state = "g1"
	amount = 0
<commit_msg>Fixes blood on wheelchair<commit_after>#define DRYING_TIME 5 * 60*10			//for 1 unit of depth in puddle (amount var)


/obj/effect/decal/cleanable/blood
	name = "blood"
	desc = "It's red and gooey. Perhaps it's the chef's cooking?"
	gender = PLURAL
	density = 0
	anchored = 1
	layer = 2
	icon = 'icons/effects/blood.dmi'
	icon_state = "floor1"
	random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
	var/list/viruses = list()
	blood_DNA = list()
	var/list/datum/disease2/disease/virus2 = list()
	var/amount = 5

/obj/effect/decal/cleanable/blood/Destroy()
	for(var/datum/disease/D in viruses)
		D.cure(0)
		D.holder = null
	..()

/obj/effect/decal/cleanable/blood/New()
	..()
	if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
		return
	if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
		return // We handle our own drying.
	if(src.type == /obj/effect/decal/cleanable/blood)
		if(src.loc && isturf(src.loc))
			for(var/obj/effect/decal/cleanable/blood/B in src.loc)
				if(B != src)
					if (B.blood_DNA)
						blood_DNA |= B.blood_DNA.Copy()
					del(B)
	spawn(DRYING_TIME * (amount+1))
		dry()

/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
	if (!istype(perp))
		return
	if(amount < 1)
		return

	var/datum/organ/external/l_foot = perp.get_organ("l_foot")
	var/datum/organ/external/r_foot = perp.get_organ("r_foot")
	var/hasfeet = 1
	if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
		hasfeet = 0
	if(perp.shoes && !perp.buckled)//Adding blood to shoes
		perp.shoes:track_blood = max(amount,perp.shoes:track_blood)		//Adding blood to shoes
		if(!perp.shoes.blood_overlay)
			perp.shoes.generate_blood_overlay()
		if(!perp.shoes.blood_DNA)
			perp.shoes.blood_DNA = list()
			perp.shoes.overlays += perp.shoes.blood_overlay
			perp.update_inv_shoes(1,0)
		perp.shoes.blood_DNA |= blood_DNA.Copy()
	else if (hasfeet)//Or feet
		perp.track_blood = max(amount,perp.track_blood)				//Or feet
		if(!perp.feet_blood_DNA)
			perp.feet_blood_DNA = list()
		perp.feet_blood_DNA |= blood_DNA.Copy()
	else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
		var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
		W.bloodiness = 4

	amount--

/obj/effect/decal/cleanable/blood/proc/dry()
	name = "dried [src]"
	desc = "It's dark red and crusty. Someone is not doing their job."
	var/icon/I = icon(icon,icon_state)
	I.SetIntensity(0.7)
	icon = I
	amount = 0
	spawn(DRYING_TIME)
		Destroy()

/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
	..()
	if (amount && istype(user))
		add_fingerprint(user)
		if (user.gloves)
			return
		var/taken = rand(1,amount)
		amount -= taken
		user << "<span class='notice'>You get some blood on your hands.</span>"
		if (!user.blood_DNA)
			user.blood_DNA = list()
		user.blood_DNA |= blood_DNA.Copy()
		user.bloody_hands += taken
		user.update_inv_gloves(1)
		user.verbs += /mob/living/carbon/human/proc/bloody_doodle

/obj/effect/decal/cleanable/blood/splatter
	random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
	amount = 2

/obj/effect/decal/cleanable/blood/writing
	icon_state = "tracks"
	desc = "It looks like a writing in blood."
	gender = NEUTER
	random_icon_states = list("writing1","writing2","writing3","writing4","writing5")
	amount = 0
	var/message

/obj/effect/decal/cleanable/blood/writing/New()
	..()
	for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
		random_icon_states.Remove(W.icon_state)
	icon_state = pick(random_icon_states)

/obj/effect/decal/cleanable/blood/writing/examine()
	..()
	usr << "It reads: <font color='#600000'>\"[message]\"<font>"


/obj/effect/decal/cleanable/blood/green
	name = "green blood"
	desc = "It's green and gooey. Perhaps it's the chef's cooking?"
	icon_state = "xfloor1"
	random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")

/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
	if (!istype(perp))
		return
	if(amount < 1)
		return

	var/datum/organ/external/l_foot = perp.get_organ("l_foot")
	var/datum/organ/external/r_foot = perp.get_organ("r_foot")
	var/hasfeet = 1
	if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
		hasfeet = 0
	if(perp.shoes && !perp.buckled)//Adding blood to shoes
		perp.shoes:track_blood_green= max(amount,perp.shoes:track_blood_green)		//Adding blood to shoes
		if(!perp.shoes.blood_overlay)
			perp.shoes.blood_overlay_color = 1
			perp.shoes.generate_blood_overlay()
		if(!perp.shoes.blood_DNA)
			perp.shoes.blood_DNA = list()
			perp.shoes.overlays += perp.shoes.blood_overlay
			perp.update_inv_shoes(1,1)
		perp.shoes.blood_DNA |= blood_DNA.Copy()
	else if (hasfeet)//Or feet
		perp.track_blood_green = max(amount,perp.track_blood_green)				//Or feet
		if(!perp.feet_blood_DNA)
			perp.feet_blood_DNA = list()
		perp.feet_blood_DNA |= blood_DNA.Copy()
	else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
		var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
		W.bloodiness = 4

	amount--

/obj/effect/decal/cleanable/blood/drip/green
	name = "drips of blood"
	desc = "It's green."
	gender = PLURAL
	icon = 'icons/effects/drip.dmi'
	icon_state = "g1"
	amount = 0

{'fraction_non_alphanumeric': 0.15449150808266832, 'fraction_numerical': 0.013300593411090649, 'mean_word_length': 4.139327024185068, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 11, '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': '2975456', 'n_tokens_mistral': 4388, 'n_tokens_neox': 3870, 'n_words': 661}