diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index d115d54b80d..c4e3856e295 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -790,7 +790,7 @@ body
if(result)
var/newtype = species_list[result]
- H.dna.species = new newtype()
+ hardset_dna(H, null, null, null, null, newtype)
H.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 4eac92f16b9..f8ab83fe5b0 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -202,7 +202,7 @@
if(ishuman(affected_mob))
var/mob/living/carbon/human/human = affected_mob
if(human.dna && human.dna.species.id != "slime")
- human.dna.species = new /datum/species/slime()
+ hardset_dna(human, null, null, null, null, /datum/species/slime)
human.regenerate_icons()
/datum/disease/transformation/corgi
diff --git a/code/game/dna.dm b/code/game/dna.dm
index 43f11afb6e7..28ff09569ac 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -35,7 +35,7 @@
destination.dna.unique_enzymes = unique_enzymes
destination.dna.uni_identity = uni_identity
destination.dna.blood_type = blood_type
- destination.dna.species = species
+ hardset_dna(destination, null, null, null, null, species)
destination.dna.mutant_color = mutant_color
destination.dna.real_name = real_name
destination.dna.mutations = mutations
@@ -78,7 +78,7 @@
if(istype(character, /mob/living/carbon/human))
var/mob/living/carbon/human/H = character
if(!H.dna.species)
- H.dna.species = new /datum/species/human()
+ hardset_dna(H, null, null, null, null, /datum/species/human)
if(!hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, hair_styles_list, hair_styles_male_list, hair_styles_female_list)
L[DNA_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.hair_style), hair_styles_list.len)
@@ -138,6 +138,9 @@
create_dna(owner, mrace)
if(mrace)
+ if(owner.dna.species.exotic_blood)
+ var/datum/reagent/exotic_blood = owner.dna.species.exotic_blood
+ owner.reagents.del_reagent(exotic_blood.id)
owner.dna.species = new mrace()
if(mcolor)
diff --git a/code/game/gamemodes/abduction/abduction.dm b/code/game/gamemodes/abduction/abduction.dm
index cd605c9e280..c51bafd91ac 100644
--- a/code/game/gamemodes/abduction/abduction.dm
+++ b/code/game/gamemodes/abduction/abduction.dm
@@ -88,7 +88,7 @@
H = agent.current
L = agent_landmarks[team_number]
H.loc = L.loc
- H.dna.species = new /datum/species/abductor()
+ hardset_dna(H, null, null, null, null, /datum/species/abductor)
S = H.dna.species
S.agent = 1
S.team = team_number
@@ -102,7 +102,7 @@
H = scientist.current
L = scientist_landmarks[team_number]
H.loc = L.loc
- H.dna.species = new /datum/species/abductor()
+ hardset_dna(H, null, null, null, null, /datum/species/abductor)
S = H.dna.species
S.scientist = 1
S.team = team_number
@@ -137,7 +137,7 @@
H = agent.current
L = agent_landmarks[team_number]
H.loc = L.loc
- H.dna.species = new /datum/species/abductor()
+ hardset_dna(H, null, null, null, null, /datum/species/abductor)
S = H.dna.species
S.agent = 1
S.team = team_number
@@ -151,7 +151,7 @@
H = scientist.current
L = scientist_landmarks[team_number]
H.loc = L.loc
- H.dna.species = new /datum/species/abductor()
+ hardset_dna(H, null, null, null, null, /datum/species/abductor)
S = H.dna.species
S.scientist = 1
S.team = team_number
diff --git a/code/game/gamemodes/abduction/gland.dm b/code/game/gamemodes/abduction/gland.dm
index 4a0110ac30b..7e075ff255b 100644
--- a/code/game/gamemodes/abduction/gland.dm
+++ b/code/game/gamemodes/abduction/gland.dm
@@ -106,7 +106,7 @@ obj/item/gland/slime/activate()
/obj/item/gland/pop/activate()
host << "You feel weird."
var/species = pick(list(/datum/species/lizard,/datum/species/slime,/datum/species/plant/pod,/datum/species/fly))
- host.dna.species = new species()
+ hardset_dna(host, null, null, null, null, species)
host.regenerate_icons()
return
diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm
index e567eaac5bf..7b13ecf03da 100644
--- a/code/game/gamemodes/changeling/powers/transform.dm
+++ b/code/game/gamemodes/changeling/powers/transform.dm
@@ -17,7 +17,7 @@
user.dna = chosen_dna
user.real_name = chosen_dna.real_name
- user.dna.species = new chosen_dna.species.type(user)
+ hardset_dna(user, null, null, null, null, chosen_dna.species.type)
user.dna.mutant_color = chosen_dna.mutant_color
updateappearance(user)
domutcheck(user)
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index e04ae94a755..022366ba2d8 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -302,7 +302,7 @@
var/mob/living/carbon/human/human = M
if(human.dna && human.dna.species.id == "human")
M << "You hear a buzzing in your ears."
- human.dna.species = new /datum/species/fly()
+ hardset_dna(human, null, null, null, null, /datum/species/fly)
human.regenerate_icons()
human.apply_effect((rand(120 - accurate * 40, 180 - accurate * 60)), IRRADIATE, 0)
calibrated = 0
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 050f225a6b4..2f54700210d 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -136,7 +136,7 @@
if(!newrace || !H.dna)
return
- H.dna.species = new newrace
+ hardset_dna(H, null, null, null, null, newrace)
if(H.dna.species.use_skintones)
var/new_s_tone = input(user, "What are we again?", "Race change") as null|anything in skin_tones
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 73b5e59c713..9f2ef4b0a30 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1798,7 +1798,7 @@
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
var/newtype = species_list[result]
for(var/mob/living/carbon/human/H in mob_list)
- H.dna.species = new newtype()
+ hardset_dna(H, null, null, null, null, newtype)
H.regenerate_icons()
if("corgi")
feedback_inc("admin_secrets_fun_used",1)
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index 2fa4f53b808..c17e1f6d7e0 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -80,19 +80,19 @@
user.dna.add_mutation(LASEREYES)
user.dna.add_mutation(COLDRES)
user.dna.add_mutation(XRAY)
- user.dna.species = new /datum/species/shadow()
+ hardset_dna(user, null, null, null, null, /datum/species/shadow)
user.regenerate_icons()
if("Wealth")
user << "Your wish is granted, but at a terrible cost..."
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
new /obj/structure/closet/syndicate/resources/everything(loc)
- user.dna.species = new /datum/species/shadow()
+ hardset_dna(user, null, null, null, null, /datum/species/shadow)
user.regenerate_icons()
if("Immortality")
user << "Your wish is granted, but at a terrible cost..."
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
user.verbs += /mob/living/carbon/proc/immortality
- user.dna.species = new /datum/species/shadow()
+ hardset_dna(user, null, null, null, null, /datum/species/shadow)
user.regenerate_icons()
if("To Kill")
user << "Your wish is granted, but at a terrible cost..."
@@ -107,7 +107,7 @@
for(var/datum/objective/OBJ in user.mind.objectives)
user << "Objective #[obj_count]: [OBJ.explanation_text]"
obj_count++
- user.dna.species = new /datum/species/shadow()
+ hardset_dna(user, null, null, null, null, /datum/species/shadow)
user.regenerate_icons()
if("Peace")
user << "Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence."
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index bd3044071c4..6b22286a77f 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -863,9 +863,9 @@ datum/preferences
if(character.dna)
character.dna.real_name = character.real_name
if(pref_species != /datum/species/human && config.mutant_races)
- character.dna.species = new pref_species.type()
+ hardset_dna(character, null, null, null, null, pref_species.type)
else
- character.dna.species = new /datum/species/human()
+ hardset_dna(character, null, null, null, null, /datum/species/human)
character.dna.mutant_color = mutant_color
character.update_mutcolor()
diff --git a/code/modules/events/wizard/race.dm b/code/modules/events/wizard/race.dm
index 96d8c5ea8ff..37d67c8815d 100644
--- a/code/modules/events/wizard/race.dm
+++ b/code/modules/events/wizard/race.dm
@@ -16,7 +16,7 @@
for(var/mob/living/carbon/human/H in mob_list) //yes, even the dead
if(H.dna)
- H.dna.species = new new_species
+ hardset_dna(H, null, null, null, null, new_species)
H.regenerate_icons()
H << "You feel somehow... different?"
if(!all_the_same)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index 85c96398045..4326f45dad2 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -48,7 +48,7 @@
/mob/living/carbon/human/proc/makeSkeleton()
if(!check_dna_integrity(src)) return
status_flags |= DISFIGURED
- dna.species = new /datum/species/skeleton(src)
+ hardset_dna(src, null, null, null, null, /datum/species/skeleton)
return 1
/mob/living/carbon/proc/ChangeToHusk()
diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm
index b9ca12ef44a..354598e5dfa 100644
--- a/code/modules/mob/living/carbon/human/species_types.dm
+++ b/code/modules/mob/living/carbon/human/species_types.dm
@@ -12,7 +12,7 @@
/datum/species/human/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "mutationtoxin")
H << "Your flesh rapidly mutates!"
- H.dna.species = new /datum/species/slime()
+ hardset_dna(H, null, null, null, null, /datum/species/slime)
H.regenerate_icons()
H.reagents.del_reagent(chem.type)
H.faction |= "slime"
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index a261287a103..c1492e1080f 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -145,9 +145,9 @@
domutcheck(O)
if(!dna.species)
- O.dna.species = new /datum/species/human()
+ hardset_dna(O, null, null, null, null, /datum/species/human)
else
- O.dna.species = new dna.species.type()
+ hardset_dna(O, null, null, null, null, dna.species.type)
dna = null
if(newname) //if there's a name as an argument, always take that one over the current name
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 1dd1129f74f..fc5a2c29298 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -230,7 +230,7 @@ proc/wabbajack(mob/living/M)
ready_dna(H)
if(H.dna && prob(50))
var/new_species = pick(typesof(/datum/species) - /datum/species)
- H.dna.species = new new_species()
+ hardset_dna(H, null, null, null, null, new_species)
H.update_icons()
else
return
diff --git a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm
index 43650c72067..eff42b80f9b 100644
--- a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm
@@ -270,12 +270,12 @@ datum/reagent/unstableslimetoxin/on_mob_life(var/mob/living/carbon/human/H as mo
H.visible_message("[H] falls to the ground and screams as their skin bubbles and froths!") //'froths' sounds painful when used with SKIN.
H.Weaken(3)
sleep(30)
- var/list/blacklisted_species = list(/datum/species/zombie, /datum/species/skeleton, /datum/species/human, /datum/species/golem, /datum/species/golem/adamantine, /datum/species/shadow)
+ var/list/blacklisted_species = list(/datum/species/zombie, /datum/species/skeleton, /datum/species/human, /datum/species/golem, /datum/species/golem/adamantine, /datum/species/shadow, /datum/species/shadow/ling, /datum/species)
var/list/possible_morphs = typesof(/datum/species/) - blacklisted_species
var/datum/species/mutation = pick(possible_morphs)
if(prob(90) && mutation && H.dna.species != /datum/species/golem && H.dna.species != /datum/species/golem/adamantine)
H << "The pain subsides. You feel... different."
- H.dna.species = new mutation()
+ hardset_dna(H, null, null, null, null, mutation)
H.regenerate_icons()
if(mutation == /datum/species/slime)
H.faction |= "slime"