From cb5401467d913d6e27b71fe8a1e35a202483dbbd Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 18 Nov 2015 22:29:20 -0500 Subject: [PATCH] Species selection wasn't saving properly. Why? Because species_list used id as a reference, but roundstart_species used name. THESE AREN'T THE SAME THINGS. Both lists now use id, and savefiles will properly look for/save said ids --- code/__HELPERS/global_lists.dm | 2 +- code/modules/client/preferences_savefile.dm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ec2f9ccd639..7c16a19b2ca 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -33,7 +33,7 @@ continue var/datum/species/S = new spath() if(S.roundstart) - roundstart_species[S.name] = S.type + roundstart_species[S.id] = S.type species_list[S.id] = S.type //Surgeries diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index ba1d7bea8b1..e5db8d7ded4 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -235,10 +235,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car return 0 //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] + var/species_id + S["species"] >> species_id + if(config.mutant_races && species_id && (species_id in roundstart_species)) + var/newtype = roundstart_species[species_id] pref_species = new newtype() else pref_species = new /datum/species/human() @@ -375,7 +375,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["undershirt"] << undershirt S["socks"] << socks S["backbag"] << backbag - S["species"] << pref_species.name + S["species"] << pref_species.id S["feature_mcolor"] << features["mcolor"] S["feature_lizard_tail"] << features["tail_lizard"] S["feature_human_tail"] << features["tail_human"]