Use an actual playername instead of "You" in singleplayer, fixes #3979.

Differentiate between SP and MP name and allow editing it in the
settings.
Defaults to the OS username.
Makes sharing singleplayer replays more effective.
Also fixes a troublesome colorization of "You" in a translated sentence,
refs #3501.

This was SVN commit r18180.
This commit is contained in:
elexis
2016-05-15 17:13:35 +00:00
parent 6680fe82e2
commit 9eccf5cd07
12 changed files with 69 additions and 46 deletions
+7
View File
@@ -748,6 +748,12 @@ void Script_EndGame(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
EndGame();
}
CStrW GetSystemUsername(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
{
return sys_get_user_name();
}
// Cause the game to exit gracefully.
// params:
// returns:
@@ -1117,4 +1123,5 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<void, unsigned int, &EnableTimeWarpRecording>("EnableTimeWarpRecording");
scriptInterface.RegisterFunction<void, &RewindTimeWarp>("RewindTimeWarp");
scriptInterface.RegisterFunction<void, bool, &SetBoundingBoxDebugOverlay>("SetBoundingBoxDebugOverlay");
scriptInterface.RegisterFunction<CStrW, &GetSystemUsername>("GetSystemUsername");
}