This commit is contained in:
Fox McCloud
2018-07-17 18:18:16 -04:00
parent f075ef7836
commit 0a613a8f42
17 changed files with 32 additions and 30 deletions
@@ -4,7 +4,7 @@
AC.ui_interact(user, state = state)
/mob/living/carbon/human/proc/change_species(datum/species/new_species)
if(!new_species || dna.species.type == new_species || !(initial(new_species.name) in all_species))
if(!new_species || dna.species.type == new_species || !ispath(new_species, /datum/species))
return FALSE
set_species(new_species, null, TRUE)
@@ -16,7 +16,7 @@
dna = new /datum/dna(null)
// Species name is handled by set_species()
set_species(new_species, 1, delay_icon_update = 1)
set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE)
..()
@@ -1274,7 +1274,10 @@
else
to_chat(usr, "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>")
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE)
/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE)
if(!skip_same_check)
if(dna.species.name == initial(new_species.name))
return
var/datum/species/oldspecies = dna.species
if(oldspecies)
@@ -1934,7 +1937,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
dna.deserialize(data["dna"])
real_name = dna.real_name
name = real_name
set_species(dna.species)
set_species(dna.species.type, skip_same_check = TRUE)
age = data["age"]
undershirt = data["ushirt"]
underwear = data["uwear"]
@@ -208,8 +208,8 @@
var/datum/dna/toDoppel = chosen.dna
T.real_name = toDoppel.real_name
T.set_species(chosen.dna.species.type)
T.dna = toDoppel.Clone()
T.set_species(chosen.dna.species)
T.body_accessory = chosen.body_accessory
T.UpdateAppearance()
domutcheck(T)