Skip to content

Commit

Permalink
Convert old trophies for Proxima's levels
Browse files Browse the repository at this point in the history
This will usually be a one-time conversion.
We'll save the trophies with the new name.
  • Loading branch information
SimonN committed Jun 23, 2024
1 parent 3d6e8ac commit 30be55d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/file/trophy/case.d
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ do {
_trophies[key] = tro;
}

string fixOutdatedAuthor(in string oldAuthor) pure nothrow @safe @nogc
{
// To convert trophies older than July 2024. Keep this line until 2029.
return oldAuthor == "Michael S. Repton" ? "Proxima" : oldAuthor;
}

void loadTrophiesSdlang()
{
version (tharsisprofiling)
Expand All @@ -148,7 +154,7 @@ void loadTrophiesSdlang()
TrophyKey key;
key.fileNoExt = tag.getAttribute(attrFileNoExt, "");
key.title = tag.getAttribute(attrTitle, "");
key.author = tag.getAttribute(attrAuthor, "");
key.author = tag.getAttribute(attrAuthor, "").fixOutdatedAuthor;
if (key.fileNoExt == "")
continue;

Expand Down

0 comments on commit 30be55d

Please sign in to comment.