Surgery cleanup (#40788)

* Surgery cleanup

* Proper mobtype
This commit is contained in:
AnturK
2018-10-12 10:42:48 +02:00
committed by Linzolle
parent 94ceb9f275
commit 12a691d950
25 changed files with 58 additions and 39 deletions
@@ -5,6 +5,8 @@
/datum/surgery/advanced/bioware/can_start(mob/user, mob/living/carbon/human/target)
if(!..())
return FALSE
if(!istype(target))
return FALSE
for(var/X in target.bioware)
var/datum/bioware/B = X
if(B.mod_type == bioware_target)
@@ -1,4 +1,4 @@
/datum/surgery/advanced/bioware/experimental_dissection
/datum/surgery/advanced/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,
@@ -8,10 +8,12 @@
/datum/surgery_step/dissection,
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
bioware_target = BIOWARE_DISSECTION
target_mobtypes = list(/mob/living/carbon) //Feel free to dissect devils but they're magic.
/datum/surgery/advanced/bioware/experimental_dissection/can_start(mob/user, mob/living/carbon/target)
/datum/surgery/advanced/experimental_dissection/can_start(mob/user, mob/living/carbon/target)
. = ..()
if(target.has_trait(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)
@@ -53,7 +55,7 @@
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)
new /datum/bioware/dissected(target)
target.add_trait(TRAIT_DISSECTED)
return TRUE
/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -63,10 +65,5 @@
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)
new /datum/bioware/dissected(target)
return TRUE
/datum/bioware/dissected
name = "Dissected"
desc = "This body has been dissected and analyzed. It is no longer worth experimenting on."
mod_type = BIOWARE_DISSECTION
target.add_trait(TRAIT_DISSECTED)
return TRUE
@@ -12,8 +12,8 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/brainwash,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human)
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_HEAD)
/datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target)
if(!..())
+1 -1
View File
@@ -9,7 +9,7 @@
/datum/surgery_step/lobotomize,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target)
@@ -7,7 +7,8 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/pacify,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target)
@@ -37,4 +38,4 @@
"<span class='warning'>[user] screws up, causing brain damage!</span>",
"[user] completes the surgery on [target]'s brain.")
target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
return FALSE
return FALSE
@@ -11,7 +11,7 @@
/datum/surgery_step/reconstruct,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
requires_bodypart_type = 0
+2 -1
View File
@@ -8,7 +8,8 @@
/datum/surgery_step/incise,
/datum/surgery_step/revive,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/revival/can_start(mob/user, mob/living/carbon/target)
@@ -7,7 +7,8 @@
/datum/surgery_step/incise,
/datum/surgery_step/viral_bond,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
/datum/surgery/advanced/viral_bonding/can_start(mob/user, mob/living/carbon/target)
if(!..())