]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/command/menu_cmd.qc
Update playerdetail database handler, actually BUILD the databases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / command / menu_cmd.qc
index 0e0df058942eb2f7e2e011490f1a2193c1a9dc0e..ab7344e70464b9ca5d2f8357ebb4eacd218fe374 100644 (file)
@@ -35,7 +35,10 @@ void GameCommand(string theCommand)
                print(_("Usage: menu_cmd command..., where possible commands are:\n"));
                print(_("  sync - reloads all cvars on the current menu page\n"));
                print(_("  directmenu ITEM - select a menu item as main item\n"));
-               GenericCommand("help");
+
+               print("\nGeneric commands shared by all programs:\n");
+               GenericCommand_macro_help();
+
                return;
        }
 
@@ -48,36 +51,61 @@ void GameCommand(string theCommand)
                return;
        }
 
-       if(argv(0) == "directmenu") if(argc == 2)
+       if(argv(0) == "update_conwidths_before_vid_restart")
        {
-               // switch to a menu item
-               if(!isdemo()) // don't allow this command in demos
-                       m_goto(argv(1));
+               updateConwidths(cvar("vid_width"), cvar("vid_height"), cvar("vid_pixelheight"));
                return;
        }
 
-       if(argv(0) == "directpanelhudmenu")
+       if(argv(0) == "directmenu" || argv(0) == "directpanelhudmenu")
        {
-               // switch to a menu item
-               m_goto(strcat("HUD", argv(1)));
+               string filter = string_null;
+               if(argv(0) == "directpanelhudmenu")
+                       filter = strzone("HUD");
+
+               if(argc == 1)
+               {
+                       print(_("Available options:\n"));
+                       float i;
+                       entity e;
+                       string s;
+
+                       for(i = 0, e = world; (e = nextent(e)); )
+                               if(e.classname != "vtbl" && e.name != "")
+                               {
+                                       s = e.name;
+                                       if(filter)
+                                       {
+                                               if(substring(s, 0, strlen(filter)) != filter)
+                                                       continue;
+                                               s = substring(s, strlen(filter), strlen(s) - strlen(filter));
+                                       }
+                                       print(strcat(" ", s ,"\n"));
+                                       ++i;
+                               }
+               }
+               else if(argc == 2 && !isdemo()) // don't allow this command in demos
+                       m_goto(strcat(filter, argv(1))); // switch to a menu item
+               if(filter)
+                       strunzone(filter);
                return;
        }
 
        if(argv(0) == "skinselect")
        {
-               m_goto_skin_selector();
+               m_goto("skinselector");
                return;
        }
 
        if(argv(0) == "languageselect")
        {
-               m_goto_language_selector();
+               m_goto("languageselector");
                return;
        }
 
        if(argv(0) == "videosettings")
        {
-               m_goto_video_settings();
+               m_goto("videosettings");
                return;
        }
 
@@ -88,8 +116,10 @@ void GameCommand(string theCommand)
                return;
        }
 
-       if(argv(0) == "curl")
+       if(argv(0) == "debugstats")
        {
+               //PlayerStats_PlayerDetail();
+               return;
        }
 
        print(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));