mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Fixes Character Saves not remembering Species
It now saves the name of the species instead of a reference.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user