]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/nexball/nexball.qh
Move gametype registers into their own files, fallback now selects a supported gamety...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / nexball / nexball.qh
1 #pragma once
2
3 #include <common/mapinfo.qh>
4
5 #ifdef CSQC
6 void HUD_Mod_NexBall(vector pos, vector mySize);
7 #endif
8 CLASS(NexBall, Gametype)
9     INIT(NexBall)
10     {
11         this.gametype_init(this, _("Nexball"),"nb","g_nexball",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=5 leadlimit=0",_("Shoot and kick the ball into the enemies goal, keep your goal clean"));
12     }
13     METHOD(NexBall, m_generate_mapinfo, void(Gametype this, string v))
14     {
15         if(substring(v, 0, 8) == "nexball_" || substring(v, 0, 4) == "ball")
16             MapInfo_Map_supportedGametypes |= this.m_flags;
17     }
18     METHOD(NexBall, m_isTwoBaseMode, bool())
19     {
20         return true;
21     }
22     METHOD(NexBall, 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))
23     {
24         TC(Gametype, this);
25         returns(menu, _("Goals:"),           1,   50,  1, "g_nexball_goallimit",       string_null,                    _("The amount of goals needed before the match will end"));
26     }
27 #ifdef CSQC
28     ATTRIB(NexBall, m_modicons, void(vector pos, vector mySize), HUD_Mod_NexBall);
29 #endif
30     ATTRIB(NexBall, m_legacydefaults, string, "5 20 0");
31 ENDCLASS(NexBall)
32 REGISTER_GAMETYPE(NEXBALL, NEW(NexBall));
33 #define g_nexball IS_GAMETYPE(NEXBALL)