Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes Necrotic Revival surgery from Abductors #9670

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/abductor/abductor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/advanced/necrotic_revival.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down
20 changes: 18 additions & 2 deletions code/modules/surgery/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
..()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down