diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index e689ee8e7c0cb..a90ffc7f24bf0 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -208,7 +208,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_THERMAL_VISION "thermal_vision" #define TRAIT_ABDUCTOR_TRAINING "abductor-training" #define TRAIT_ABDUCTOR_SCIENTIST_TRAINING "abductor-scientist-training" -#define TRAIT_SURGEON "surgeon" +#define TRAIT_SURGEON "surgeon" //Grants access to all surgeries +#define TRAIT_ABDUCTOR_SURGEON "abductor-surgery-training" //Grants access to all surgeries except for certain blacklisted ones #define TRAIT_STRONG_GRABBER "strong_grabber" #define TRAIT_CALCIUM_HEALER "calcium_healer" #define TRAIT_MAGIC_CHOKE "magic_choke" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index a5d41e1e507d3..a307fb935c902 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -85,6 +85,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_ABDUCTOR_TRAINING" = TRAIT_ABDUCTOR_TRAINING, "TRAIT_ABDUCTOR_SCIENTIST_TRAINING" = TRAIT_ABDUCTOR_SCIENTIST_TRAINING, "TRAIT_SURGEON" = TRAIT_SURGEON, + "TRAIT_ABDUCTOR_SURGEON" = TRAIT_ABDUCTOR_SURGEON, "TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER, "TRAIT_CALCIUM_HEALER" = TRAIT_CALCIUM_HEALER, "TRAIT_MAGIC_CHOKE" = TRAIT_MAGIC_CHOKE, diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm index a7a0854c31ca2..c5604b4248201 100644 --- a/code/modules/antagonists/abductor/abductor.dm +++ b/code/modules/antagonists/abductor/abductor.dm @@ -100,12 +100,12 @@ /datum/antagonist/abductor/scientist/on_gain() ADD_TRAIT(owner, TRAIT_ABDUCTOR_SCIENTIST_TRAINING, ABDUCTOR_ANTAGONIST) - ADD_TRAIT(owner, TRAIT_SURGEON, ABDUCTOR_ANTAGONIST) + ADD_TRAIT(owner, TRAIT_ABDUCTOR_SURGEON, ABDUCTOR_ANTAGONIST) . = ..() /datum/antagonist/abductor/scientist/on_removal() REMOVE_TRAIT(owner, TRAIT_ABDUCTOR_SCIENTIST_TRAINING, ABDUCTOR_ANTAGONIST) - REMOVE_TRAIT(owner, TRAIT_SURGEON, ABDUCTOR_ANTAGONIST) + REMOVE_TRAIT(owner, TRAIT_ABDUCTOR_SURGEON, ABDUCTOR_ANTAGONIST) . = ..() /datum/antagonist/abductor/admin_add(datum/mind/new_owner,mob/admin) diff --git a/code/modules/surgery/advanced/necrotic_revival.dm b/code/modules/surgery/advanced/necrotic_revival.dm index 449065ba487f3..87e7e8f8ff0e1 100644 --- a/code/modules/surgery/advanced/necrotic_revival.dm +++ b/code/modules/surgery/advanced/necrotic_revival.dm @@ -9,6 +9,7 @@ /datum/surgery_step/close) possible_locs = list(BODY_ZONE_HEAD) + abductor_surgery_blacklist = TRUE /datum/surgery/advanced/necrotic_revival/can_start(mob/user, mob/living/carbon/target) . = ..() diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 215d4f1a5dea7..d829cc8afff28 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -20,6 +20,10 @@ var/requires_tech = FALSE //handles techweb-oriented surgeries, previously restricted to the /advanced subtype (You still need to add designs) var/replaced_by //type; doesn't show up if this type exists. Set to /datum/surgery if you want to hide a "base" surgery (useful for typing parents IE healing.dm just make sure to null it out again) var/failed_step = FALSE //used for bypassing the 'poke on help intent' on failing a surgery step and forcing the doctor to damage the patient + var/abductor_surgery_blacklist = FALSE + //Blacklisted surgeries aren't innately known by Abductor Scientists + //However, they can still be used by them if they meet the normal requirements to access the surgery + /datum/surgery/New(surgery_target, surgery_location, surgery_bodypart) ..() @@ -49,10 +53,17 @@ return FALSE else return TRUE + //Grants the user innate access to all surgeries + + if(HAS_TRAIT(user, TRAIT_ABDUCTOR_SURGEON) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_SURGEON))) + if(replaced_by) + return FALSE + else if(!abductor_surgery_blacklist) + return TRUE + //Grants the user innate access to all surgeries except for certain blacklisted ones. Used by Abductors if(!requires_tech && !replaced_by) return TRUE - // True surgeons (like abductor scientists) need no instructions if(requires_tech) . = FALSE @@ -138,9 +149,14 @@ if(!..()) return FALSE // True surgeons (like abductor scientists) need no instructions - if(HAS_TRAIT(user, TRAIT_SURGEON) || HAS_TRAIT(user.mind, TRAIT_SURGEON)) + if(HAS_TRAIT(user, TRAIT_SURGEON) || (user.mind && HAS_TRAIT(user.mind, TRAIT_SURGEON))) return TRUE + if(HAS_TRAIT(user, TRAIT_ABDUCTOR_SURGEON) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_SURGEON))) + if(!abductor_surgery_blacklist) + return TRUE + //Grants the user innate access to all surgeries except for certain blacklisted ones. Used by Abductors + if(iscyborg(user)) var/mob/living/silicon/robot/R = user var/obj/item/surgical_processor/SP = locate() in R.module.modules