diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index ca0462ff6a49..da0b918c87fc 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -203,8 +203,13 @@ to_chat(user, "Invalid species, please pick something else.") return if(prev_species != active_character.species) - S = NS + S = new NS.type() + active_character.species_subtype = "None" active_character.age = clamp(active_character.age, S.min_age, S.max_age) + NS = GLOB.all_species[active_character.species_subtype] // Changing species resets subtype. + if(isnull(NS)) + NS = GLOB.all_species[active_character.species] + subtype = new NS.type() reset_styles(S) if("species_subtype") if(S.bodyflags & HAS_SPECIES_SUBTYPE) @@ -215,7 +220,7 @@ var/datum/species/NS = GLOB.all_species[active_character.species_subtype] if(isnull(NS)) NS = GLOB.all_species[active_character.species] - subtype = NS + subtype = new NS.type() reset_styles(subtype, S) if("speciesprefs") active_character.speciesprefs = !active_character.speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0. diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index f67f8dc53dcd..07fb8745987a 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -770,12 +770,12 @@ ) if(!isnull(target.dna)) - for(var/obj/item/organ/external/limb in target.bodyparts) // Update robotic limbs to match new sub species - limb.set_company(limb.model, target.dna.species.sprite_sheet_name) // Update the limbs to properly use their new sprite sheet. var/datum/species/subtype = GLOB.all_species[new_subtype] if(isnull(subtype)) subtype = GLOB.all_species[target.dna.species.name] - target.dna.species.updatespeciessubtype(src, new subtype.type()) + target.dna.species.updatespeciessubtype(target, new subtype.type()) + for(var/obj/item/organ/external/limb in target.bodyparts) // Update robotic limbs to match new sub species + limb.set_company(limb.model, target.dna.species.sprite_sheet_name) // Update the limbs to properly use their new sprite sheet. target.regenerate_icons() return SURGERY_STEP_CONTINUE