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

Fix mitocholide runtime when applied to dismembered limb #28010

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_CAN_STRIP "can_strip" // This mob can strip other mobs.
#define TRAIT_CLING_BURSTING "cling_bursting" // This changeling is about to burst into a headslug, block cremation / gibber to prevent nullspace issues
#define TRAIT_I_WANT_BRAINS "mob_zombie" // A general trait for tracking if the mob is a zombie.
#define TRAIT_I_WANT_BRAINS_ORGAN "zombie_organ" // A general trait for tracking whether a zombie owned the organ or limb
#define TRAIT_NON_INFECTIOUS_ZOMBIE "non_infectious_zombie" // A trait for checking if a zombie shouldn't be able to infect other people
#define TRAIT_NPC_ZOMBIE "npc_zombie" // A trait for checking if a zombie should act like an NPC and attack
#define TRAIT_ABSTRACT_HANDS "abstract_hands" // Mobs with this trait can only pick up abstract items.
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CAN_STRIP" = TRAIT_CAN_STRIP,
"TRAIT_CLING_BURSTING" = TRAIT_CLING_BURSTING,
"TRAIT_I_WANT_BRAINS" = TRAIT_I_WANT_BRAINS,
"TRAIT_I_WANT_BRAINS_ORGAN" = TRAIT_I_WANT_BRAINS_ORGAN,
"TRAIT_ABSTRACT_HANDS" = TRAIT_ABSTRACT_HANDS,
"TRAIT_LANGUAGE_LOCKED" = TRAIT_LANGUAGE_LOCKED,
"TRAIT_NON_INFECTIOUS_ZOMBIE" = TRAIT_NON_INFECTIOUS_ZOMBIE,
Expand Down
2 changes: 2 additions & 0 deletions code/datums/diseases/zombie_virus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
for(var/obj/item/organ/limb as anything in H.bodyparts)
if(!(limb.status & ORGAN_DEAD) && !limb.vital && !limb.is_robotic())
limb.necrotize()
if(!HAS_TRAIT(limb, TRAIT_I_WANT_BRAINS_ORGAN))
ADD_TRAIT(limb, TRAIT_I_WANT_BRAINS_ORGAN, ZOMBIE_TRAIT)
return FALSE

for(var/obj/item/organ/limb as anything in H.bodyparts)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/organs/organ_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,15 @@ This function completely restores a damaged organ to perfect condition.
surgeryize()
if(is_robotic()) //Robotic organs stay robotic.
status = ORGAN_ROBOT
else if(HAS_TRAIT(owner, TRAIT_I_WANT_BRAINS))
else if(HAS_TRAIT(src, TRAIT_I_WANT_BRAINS_ORGAN))
status = ORGAN_DEAD
else
status = 0
germ_level = 0
perma_injury = 0
brute_dam = 0
burn_dam = 0
if(!HAS_TRAIT(owner, TRAIT_I_WANT_BRAINS)) // zombies's wounds don't close. Because thats cool.
if(!HAS_TRAIT(src, TRAIT_I_WANT_BRAINS_ORGAN)) // zombies's wounds don't close. Because thats cool.
open = ORGAN_CLOSED //Closing all wounds.

// handle internal organs
Expand Down
Loading