diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml
index f6526dcfed..a06025a9f1 100644
--- a/Docs/Luadoc/Lua.xml
+++ b/Docs/Luadoc/Lua.xml
@@ -726,6 +726,7 @@
+
diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml
index 69bd04a75e..0f9b57048b 100644
--- a/Docs/Luadoc/LuaDocumentation.xml
+++ b/Docs/Luadoc/LuaDocumentation.xml
@@ -2189,6 +2189,9 @@ save yourself some time, copy this for undocumented things:
Returns a table of all selectable games.
+
+ Returns a table of all the styles for the that exist for game.
+
Sets the current game to Game. The second argument is optional, and if provided will determine which theme is loaded when the game changes. If the second argument is not provided, the default theme from the preferences for the new game type will be loaded.
If only the game changes, the screen specified by the Common::AfterGameChangeScreen metric will be loaded.
diff --git a/src/GameManager.cpp b/src/GameManager.cpp
index 9006119391..65a65e9da4 100644
--- a/src/GameManager.cpp
+++ b/src/GameManager.cpp
@@ -3160,10 +3160,28 @@ public:
return 1;
}
+ static int GetStylesForGame( T* p, lua_State *L )
+ {
+ RString game_name= SArg(1);
+ const Game *pGame = p->StringToGame(game_name);
+ if(!pGame)
+ {
+ luaL_error(L, "GetStylesForGame: Invalid Game: '%s'", game_name.c_str());
+ }
+ vector