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

[PORT] Fix organs being replaced when not needed #2456

Merged
merged 1 commit into from
Jul 5, 2024
Merged
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
9 changes: 6 additions & 3 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,12 @@ GLOBAL_LIST_EMPTY(features_by_species)
qdel(existing_organ)
continue

if(!isnull(old_species) && !isnull(existing_organ))
if(existing_organ.type != old_species.get_mutant_organ_type_for_slot(slot))
continue // we don't want to remove organs that are not the default for this species
// we don't want to remove organs that are not the default for this species
if(!isnull(existing_organ))
if(!isnull(old_species) && existing_organ.type != old_species.get_mutant_organ_type_for_slot(slot))
continue
else if(!replace_current && existing_organ.type != get_mutant_organ_type_for_slot(slot))
continue

// at this point we already know new_organ is not null
if(existing_organ?.type == new_organ)
Expand Down
Loading