diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 49e139a87a..297be2eddd 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -1,5 +1,5 @@ #define SAVEFILE_VERSION_MIN 8 -#define SAVEFILE_VERSION_MAX 26 +#define SAVEFILE_VERSION_MAX 27 //handles converting savefiles to new formats //MAKE SURE YOU KEEP THIS UP TO DATE! @@ -165,6 +165,13 @@ S["nanotrasen_relation"] >> relation S["weyland_yutani_relation"] << relation + if(savefile_version < 27) + var/old_pref_armor + S["preferred_armor"] >> old_pref_armor + if((!old_pref_armor) in GLOB.armor_style_list) + preferred_armor = "Random" + S["preferred_armor"] << preferred_armor + savefile_version = SAVEFILE_VERSION_MAX return 1 @@ -657,12 +664,6 @@ backbag = sanitize_integer(backbag, 1, length(GLOB.backbaglist), initial(backbag)) preferred_armor = sanitize_inlist(preferred_armor, GLOB.armor_style_list, "Random") //b_type = sanitize_text(b_type, initial(b_type)) - var/old_pref_armor - S["preferred_armor"] >> old_pref_armor - - if((!old_pref_armor) in GLOB.armor_style_list) - preferred_armor = "Random" - S["preferred_armor"] << preferred_armor platoon_name = platoon_name ? sanitize_text(platoon_name, initial(platoon_name)) : "Sun Riders" dropship_camo = sanitize_inlist(dropship_camo, GLOB.dropship_camos, initial(dropship_camo))