]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/common/mapinfo.qh
add "features" (so a mutator combination can require them)
[divverent/nexuiz.git] / data / qcsrc / common / mapinfo.qh
1 float MAPINFO_TYPE_DEATHMATCH           = 1;
2 float MAPINFO_TYPE_TEAM_DEATHMATCH      = 2;
3 float MAPINFO_TYPE_DOMINATION           = 4;
4 float MAPINFO_TYPE_CTF                          = 8;
5 float MAPINFO_TYPE_RUNEMATCH            = 16;
6 float MAPINFO_TYPE_LMS                          = 32;
7 float MAPINFO_TYPE_ARENA                        = 64;
8 float MAPINFO_TYPE_KEYHUNT                      = 128;
9 float MAPINFO_TYPE_ASSAULT                      = 256;
10 float MAPINFO_TYPE_ONSLAUGHT            = 512;
11 float MAPINFO_TYPE_ALL              = 65535; // this has to include all above bits
12
13 float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps
14
15 float MapInfo_count;
16
17 // info about a map that MapInfo loads
18 string MapInfo_Map_title;
19 string MapInfo_Map_description;
20 float MapInfo_Map_supportedGametypes;
21 float MapInfo_Map_supportedFeatures;
22 float MapInfo_Map_diameter;
23 float MapInfo_Map_spawnpoints;
24
25 // load MapInfo_count; generate mapinfo for maps that miss them, and clear the
26 // cache; you need to call MapInfo_FilterGametype afterwards!
27 void MapInfo_Enumerate();
28
29 // filter the info by game type mask (updates MapInfo_count)
30 float MapInfo_FilterGametype(float gametype, float features); // 1 on success, 0 on temporary failure (call it again next frame then)
31
32 // load info about the i-th map into the MapInfo_Map_* globals
33 float MapInfo_Get_ByID(float i); // 1 on success, 0 on failure
34
35 // load info about a map by name into the MapInfo_Map_* globals
36 float MapInfo_Get_ByName(string s, float allowGenerate); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file
37
38 // look for a map by a prefix, returns the actual map name on success, string_null on failure or ambigous match
39 string MapInfo_FixName(string s);