]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/invasion/invasion.qh
Merge branch 'master' into terencehill/glowmod_color_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / invasion / invasion.qh
1 #pragma once
2
3 #include <common/mapinfo.qh>
4
5 CLASS(Invasion, Gametype)
6     INIT(Invasion)
7     {
8         this.gametype_init(this, _("Invasion"),"inv","g_invasion",GAMETYPE_FLAG_USEPOINTS,"","pointlimit=50 teams=0 type=0",_("Survive against waves of monsters"));
9     }
10     METHOD(Invasion, m_parse_mapinfo, bool(string k, string v))
11     {
12         switch (k) {
13             case "teams":
14                 cvar_set("g_invasion_teams", v);
15                 return true;
16             case "type":
17                 cvar_set("g_invasion_type", v);
18                 return true;
19         }
20         return false;
21     }
22     METHOD(Invasion, m_generate_mapinfo, void(Gametype this, string v))
23     {
24         if(v == "invasion_spawnpoint")
25             MapInfo_Map_supportedGametypes |= this.m_flags;
26     }
27     METHOD(Invasion, m_configuremenu, void(Gametype this, entity menu, void(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip) returns))
28     {
29         TC(Gametype, this);
30         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
31     }
32 ENDCLASS(Invasion)
33 REGISTER_GAMETYPE(INVASION, NEW(Invasion));