Fixes Character Saves not remembering Species

It now saves the name of the species instead of a reference.
This commit is contained in:
ikarrus
2014-09-28 19:42:17 -06:00
parent 0f5fd59c0c
commit 30d6e01a5f
+10 -6
View File
@@ -153,8 +153,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(needs_update == -2) //fatal, can't load any data
return 0
if(!S["species"] || !config.mutant_races)
S["species"] << new /datum/species/human()
//Species
var/species_name
S["species"] >> species_name
if(config.mutant_races && species_name && (species_name in roundstart_species))
var/newtype = roundstart_species[species_name]
pref_species = new newtype()
else
pref_species = new /datum/species/human()
if(!S["mutant_color"] || S["mutant_color"] == "#000")
S["mutant_color"] << "#FFF"
@@ -172,7 +179,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] >> facial_hair_style
S["underwear"] >> underwear
S["backbag"] >> backbag
S["species"] >> pref_species
S["mutant_color"] >> mutant_color
//Jobs
@@ -194,8 +200,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
if(!(pref_species in species_list))
pref_species = new /datum/species/human()
if(!mutant_color || mutant_color == "#000")
mutant_color = "#FFF"
if(!real_name) real_name = random_name(gender)
@@ -252,7 +256,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] << facial_hair_style
S["underwear"] << underwear
S["backbag"] << backbag
S["species"] << pref_species
S["species"] << pref_species.name
S["mutant_color"] << mutant_color
//Jobs