Skip to content

Commit

Permalink
Merge pull request #140 from Bird-Lounge/language-fixening
Browse files Browse the repository at this point in the history
[SEMIMODULAR] Languages: The Fixening
  • Loading branch information
carpotoxin authored Oct 12, 2024
2 parents f5f28ae + c3bb67a commit e090de9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,17 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car

//Quirks
all_quirks = save_data?["all_quirks"]
/// DOPPLER SHIFT ADDITION BEGIN
var/list/save_languages = SANITIZE_LIST(save_data["languages"])
for(var/language in save_languages)
var/value = save_languages[language]
save_languages -= language

if(istext(language))
language = _text2path(language)
save_languages[language] = value
languages = save_languages
/// DOPPLER SHIFT ADDITION END

//try to fix any outdated data if necessary
//preference updating will handle saving the updated data for us.
Expand All @@ -317,6 +328,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
randomise = SANITIZE_LIST(randomise)
job_preferences = SANITIZE_LIST(job_preferences)
all_quirks = SANITIZE_LIST(all_quirks)
languages = SANITIZE_LIST(languages) /// DOPPLER SHIFT ADDITION

//Validate job prefs
for(var/j in job_preferences)
Expand All @@ -325,6 +337,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car

all_quirks = SSquirks.filter_invalid_quirks(SANITIZE_LIST(all_quirks))
validate_quirks()
sanitize_languages() /// DOPPLER SHIFT ADDITION

return TRUE

Expand Down Expand Up @@ -365,6 +378,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car

//Quirks
save_data["all_quirks"] = all_quirks
save_data["languages"] = languages /// DOPPLER SHIFT ADDITION - we might want to migrate this

return TRUE

Expand Down

0 comments on commit e090de9

Please sign in to comment.