]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qc
Some random fixes and stuff (centerprints converted to notifications, less spam when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qc
index b8fe58b34481a868bb7883e773d887183af876d7..830c86db9019c6f52d9d7187d07c644a15e8502c 100644 (file)
@@ -696,6 +696,15 @@ float MapInfo_Type_FromString(string t)
        return 0;
 }
 
+string MapInfo_Type_Description(float t)
+{
+       entity e;
+       for(e = MapInfo_Type_first; e; e = e.enemy)
+               if(t == e.items)
+                       return e.gametype_description;
+       return "";
+}
+
 string MapInfo_Type_ToString(float t)
 {
        entity e;
@@ -1006,7 +1015,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                {
                        t = car(s); s = cdr(s);
                        f = MapInfo_Type_FromString(t);
-                       print("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
+                       dprint("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
                        if(f)
                                _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, TRUE);
                        else
@@ -1265,14 +1274,14 @@ void MapInfo_LoadMap(string s, float reinit)
                localcmd(strcat("\nchangelevel ", s, "\n"));
 }
 
-string MapInfo_ListAllowedMaps(float pRequiredFlags, float pForbiddenFlags)
+string MapInfo_ListAllowedMaps(float type, float pRequiredFlags, float pForbiddenFlags)
 {
        string out;
        float i;
 
        // to make absolutely sure:
        MapInfo_Enumerate();
-       MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), pRequiredFlags, pForbiddenFlags, 0);
+       MapInfo_FilterGametype(type, MapInfo_CurrentFeatures(), pRequiredFlags, pForbiddenFlags, 0);
 
        out = "";
        for(i = 0; i < MapInfo_count; ++i)