<commit_before>/datum/surgery/experimental_dissection
	name = "Experimental Dissection"
	desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database."
	steps = list(/datum/surgery_step/incise,
				/datum/surgery_step/retract_skin,
				/datum/surgery_step/clamp_bleeders,
				/datum/surgery_step/incise,
				/datum/surgery_step/dissection,
				/datum/surgery_step/close)
	possible_locs = list(BODY_ZONE_CHEST)
	target_mobtypes = list(/mob/living/carbon) //Feel free to dissect devils but they're magic.

/datum/surgery/experimental_dissection/can_start(mob/user, mob/living/carbon/target)
	. = ..()
	if(HAS_TRAIT(target, TRAIT_DISSECTED))
		return FALSE
	if(iscyborg(user))
		return FALSE //robots cannot be creative
						//(also this surgery shouldn't be consistently successful, and cyborgs have a 100% success rate on surgery)
	if(target.stat != DEAD)
		return FALSE

/datum/surgery_step/dissection
	name = "dissection"
	implements = list(/obj/item/scalpel = 60, /obj/item/kitchen/knife = 30, /obj/item/shard = 15)
	time = 125

/datum/surgery_step/dissection/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] starts dissecting [target].", "<span class='notice'>You start dissecting [target].</span>")

/datum/surgery_step/dissection/proc/check_value(mob/living/carbon/target)
	if(isalienroyal(target))
		return 10000
	else if(isalienadult(target))
		return 5000
	else if(ismonkey(target))
		return 1000
	else if(ishuman(target))
		var/mob/living/carbon/human/H = target
		if(H.dna && H.dna.species)
			if(isabductor(H))
				return 8000
			if(isgolem(H) || iszombie(H))
				return 4000
			if(isjellyperson(H) || ispodperson(H))
				return 3000
			return 2000

/datum/surgery_step/dissection/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] dissects [target]!", "<span class='notice'>You dissect [target], and add your discoveries to the research database!</span>")
	SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = check_value(target)))
	var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
	target.apply_damage(80, BRUTE, L)
	ADD_TRAIT(target, TRAIT_DISSECTED, "surgery")
	return TRUE

/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] dissects [target]!", "<span class='notice'>You dissect [target], but do not find anything particularly interesting.</span>")
	SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = (check_value(target) * 0.2)))
	var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
	target.apply_damage(80, BRUTE, L)
	ADD_TRAIT(target, TRAIT_DISSECTED, "surgery")
	return TRUE<commit_msg>Medical get money from exxperiemntal dissection (#9246)<commit_after>/datum/surgery/experimental_dissection
	name = "Experimental Dissection"
	desc = "A surgical procedure which deeply analyzes the biology of a corpse, and automatically adds new findings to the research database."
	steps = list(/datum/surgery_step/incise,
				/datum/surgery_step/retract_skin,
				/datum/surgery_step/clamp_bleeders,
				/datum/surgery_step/incise,
				/datum/surgery_step/dissection,
				/datum/surgery_step/close)
	possible_locs = list(BODY_ZONE_CHEST)
	target_mobtypes = list(/mob/living/carbon) //Feel free to dissect devils but they're magic.

/datum/surgery/experimental_dissection/can_start(mob/user, mob/living/carbon/target)
	. = ..()
	if(HAS_TRAIT(target, TRAIT_DISSECTED))
		return FALSE
	if(iscyborg(user))
		return FALSE //robots cannot be creative
						//(also this surgery shouldn't be consistently successful, and cyborgs have a 100% success rate on surgery)
	if(target.stat != DEAD)
		return FALSE

/datum/surgery_step/dissection
	name = "dissection"
	implements = list(/obj/item/scalpel = 60, /obj/item/kitchen/knife = 30, /obj/item/shard = 15)
	time = 125

/datum/surgery_step/dissection/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] starts dissecting [target].", "<span class='notice'>You start dissecting [target].</span>")

/datum/surgery_step/dissection/proc/check_value(mob/living/carbon/target)
	if(isalienroyal(target))
		return 10000
	else if(isalienadult(target))
		return 5000
	else if(ismonkey(target))
		return 1000
	else if(ishuman(target))
		var/mob/living/carbon/human/H = target
		if(H.dna && H.dna.species)
			if(isabductor(H))
				return 8000
			if(isgolem(H) || iszombie(H))
				return 4000
			if(isjellyperson(H) || ispodperson(H))
				return 3000
			return 2000

/datum/surgery_step/dissection/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] dissects [target]!", "<span class='notice'>You dissect [target], and add your discoveries to the research database!</span>")
	SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = check_value(target)))
	var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_MED)
	if(D)
		D.adjust_money(check_value(target))
	var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
	target.apply_damage(80, BRUTE, L)
	ADD_TRAIT(target, TRAIT_DISSECTED, "surgery")
	return TRUE

/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
	user.visible_message("[user] dissects [target]!", "<span class='notice'>You dissect [target], but do not find anything particularly interesting.</span>")
	SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = (check_value(target) * 0.2)))
	var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_MED)
	if(D)
		D.adjust_money(check_value(target))
	var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
	target.apply_damage(80, BRUTE, L)
	ADD_TRAIT(target, TRAIT_DISSECTED, "surgery")
	return TRUE

{'fraction_non_alphanumeric': 0.12526748971193416, 'fraction_numerical': 0.016131687242798353, 'mean_word_length': 5.395789473684211, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4433183', 'n_tokens_mistral': 2441, 'n_tokens_neox': 2144, 'n_words': 411}