]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove .gametype_description, instead use .describe method
authorotta8634 <k9wolf@pm.me>
Mon, 16 Dec 2024 13:50:56 +0000 (21:50 +0800)
committerotta8634 <k9wolf@pm.me>
Mon, 16 Dec 2024 13:50:56 +0000 (21:50 +0800)
This method was added for a reason.

23 files changed:
qcsrc/common/gamemodes/gamemode/assault/assault.qh
qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh
qcsrc/common/gamemodes/gamemode/ctf/ctf.qh
qcsrc/common/gamemodes/gamemode/cts/cts.qh
qcsrc/common/gamemodes/gamemode/deathmatch/deathmatch.qh
qcsrc/common/gamemodes/gamemode/domination/domination.qh
qcsrc/common/gamemodes/gamemode/duel/duel.qh
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh
qcsrc/common/gamemodes/gamemode/invasion/invasion.qh
qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh
qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh
qcsrc/common/gamemodes/gamemode/lms/lms.qh
qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh
qcsrc/common/gamemodes/gamemode/nexball/nexball.qh
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh
qcsrc/common/gamemodes/gamemode/race/race.qh
qcsrc/common/gamemodes/gamemode/survival/survival.qh
qcsrc/common/gamemodes/gamemode/tdm/tdm.qh
qcsrc/common/gamemodes/gamemode/tka/tka.qh
qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/lib/oo.qh

index c07002d8f3594585b17a4301cddb3da5934970de..3a78a520fed7868a3a6ddf7489308e63c526499c 100644 (file)
@@ -5,7 +5,7 @@
 CLASS(Assault, Gametype)
     INIT(Assault)
     {
-        this.gametype_init(this, _("Assault"),"as","g_assault",GAMETYPE_FLAG_TEAMPLAY,"","timelimit=20",_("Destroy obstacles to find and destroy the enemy power core before time runs out"));
+        this.gametype_init(this, _("Assault"),"as","g_assault",GAMETYPE_FLAG_TEAMPLAY,"","timelimit=20");
     }
     METHOD(Assault, m_generate_mapinfo, void(Gametype this, string v))
     {
@@ -21,6 +21,11 @@ CLASS(Assault, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
     }
+    METHOD(Assault, describe, string(Assault this))
+    {
+        TC(Assault, this);
+        return _("Destroy obstacles to find and destroy the enemy power core before time runs out");
+    }
     ATTRIB(Assault, m_legacydefaults, string, "20 0");
 ENDCLASS(Assault)
 REGISTER_GAMETYPE(ASSAULT, NEW(Assault));
index b3a8635a14a396f3e55d5093a1809c627cc7e529..1476e3692bd2a0a5458744fd8bccc291df7a6be4 100644 (file)
@@ -9,7 +9,7 @@ void HUD_Mod_CA_Export(int fh);
 CLASS(ClanArena, Gametype)
     INIT(ClanArena)
     {
-        this.gametype_init(this, _("Clan Arena"),"ca","g_ca",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill all enemy teammates to win the round"));
+        this.gametype_init(this, _("Clan Arena"),"ca","g_ca",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6");
     }
     METHOD(ClanArena, m_parse_mapinfo, bool(string k, string v))
     {
@@ -39,6 +39,11 @@ CLASS(ClanArena, Gametype)
         TC(Gametype, this);
         returns(menu, _("Round limit:"),     5,  100,  5, "fraglimit_override",        "g_ca_teams_override",          _("The amount of rounds won needed before the match will end"));
     }
+    METHOD(ClanArena, describe, string(ClanArena this))
+    {
+        TC(ClanArena, this);
+        return _("Kill all enemy teammates to win the round");
+    }
 #ifdef CSQC
     ATTRIB(ClanArena, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
     ATTRIB(ClanArena, m_modicons_export, void(int fh), HUD_Mod_CA_Export);
index c5d15fec947da960da4feca23bd1cb04d5009062..1d0f0a1f31a5f5a4482cc368fc699375afd7eff1 100644 (file)
@@ -9,7 +9,7 @@ void HUD_Mod_CTF_Reset();
 CLASS(CaptureTheFlag, Gametype)
     INIT(CaptureTheFlag)
     {
-        this.gametype_init(this, _("Capture the Flag"),"ctf","g_ctf",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=20 caplimit=10 leadlimit=6",_("Find and bring the enemy flag to your base to capture it, defend your base from the other team"));
+        this.gametype_init(this, _("Capture the Flag"),"ctf","g_ctf",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=20 caplimit=10 leadlimit=6");
     }
     METHOD(CaptureTheFlag, m_generate_mapinfo, void(Gametype this, string v))
     {
@@ -29,6 +29,11 @@ CLASS(CaptureTheFlag, Gametype)
         TC(Gametype, this);
         returns(menu, _("Capture limit:"),   1,   20,  1, "capturelimit_override",     string_null,                    _("The amount of captures needed before the match will end"));
     }
+    METHOD(CaptureTheFlag, describe, string(CaptureTheFlag this))
+    {
+        TC(CaptureTheFlag, this);
+        return _("Find and bring the enemy flag to your base to capture it, defend your base from the other team");
+    }
 #ifdef CSQC
     ATTRIB(CaptureTheFlag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CTF);
     ATTRIB(CaptureTheFlag, m_modicons_reset, void(), HUD_Mod_CTF_Reset);
index c677ff6021b5369d09754acff3aec25e2912b485..52e42b927cb962cdb0f7aae573dfe3e547cdc249 100644 (file)
@@ -8,7 +8,7 @@
 CLASS(RaceCTS, Gametype)
     INIT(RaceCTS)
     {
-        this.gametype_init(this, _("Race CTS"),"cts","g_cts",0,"cloaked","timelimit=20",_("Race for fastest time."));
+        this.gametype_init(this, _("Race CTS"),"cts","g_cts",0,"cloaked","timelimit=20");
     }
     METHOD(RaceCTS, m_generate_mapinfo, void(Gametype this, string v))
     {
@@ -27,6 +27,11 @@ CLASS(RaceCTS, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
     }
+    METHOD(RaceCTS, describe, string(RaceCTS this))
+    {
+        TC(RaceCTS, this);
+        return _("Race for fastest time.");
+    }
 #ifdef CSQC
     ATTRIB(RaceCTS, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
 #endif
index ca55a3b872beb806c170d81e7ce2adf807390407..9c2a597efac6233e0a56aca90d9173977e2f99ca 100644 (file)
@@ -5,12 +5,17 @@
 CLASS(Deathmatch, Gametype)
     INIT(Deathmatch)
     {
-        this.gametype_init(this, _("Deathmatch"),"dm","g_dm",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PREFERRED,"","timelimit=15 pointlimit=30 leadlimit=0",_("Score as many frags as you can"));
+        this.gametype_init(this, _("Deathmatch"),"dm","g_dm",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PREFERRED,"","timelimit=15 pointlimit=30 leadlimit=0");
     }
     METHOD(Deathmatch, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
     {
         return true;
     }
+    METHOD(Deathmatch, describe, string(Deathmatch this))
+    {
+        TC(Deathmatch, this);
+        return _("Score as many frags as you can");
+    }
     ATTRIB(Deathmatch, m_legacydefaults, string, "30 20 0");
 ENDCLASS(Deathmatch)
 REGISTER_GAMETYPE(DEATHMATCH, NEW(Deathmatch));
index 3117c2980e43c172da10d9de8d02fb15007183f5..38db5358bb5598fd6d610367cc29ac258bc5d300 100644 (file)
@@ -9,7 +9,7 @@ void HUD_Mod_Dom_Export(int fh);
 CLASS(Domination, Gametype)
     INIT(Domination)
     {
-        this.gametype_init(this, _("Domination"),"dom","g_domination",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=200 teams=2 leadlimit=0",_("Capture and defend all the control points to win"));
+        this.gametype_init(this, _("Domination"),"dom","g_domination",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=200 teams=2 leadlimit=0");
     }
     METHOD(Domination, m_parse_mapinfo, bool(string k, string v))
     {
@@ -34,6 +34,11 @@ CLASS(Domination, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),    50,  500, 10, "g_domination_point_limit",  "g_domination_teams_override",  _("The amount of points needed before the match will end"));
     }
+    METHOD(Domination, describe, string(Domination this))
+    {
+        TC(Domination, this);
+        return _("Capture and defend all the control points to win");
+    }
 #ifdef CSQC
     ATTRIB(Domination, m_modicons, void(vector pos, vector mySize), HUD_Mod_Dom);
     ATTRIB(Domination, m_modicons_export, void(int fh), HUD_Mod_Dom_Export);
index 316b6c341ec1584466495724d2569c8fd39b0871..cb1942ce4083486b03e19a30cb145a1fa722d848 100644 (file)
@@ -6,7 +6,7 @@
 CLASS(Duel, Gametype)
     INIT(Duel)
     {
-        this.gametype_init(this, _("Duel"),"duel","g_duel",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_1V1,"","timelimit=10 pointlimit=0 leadlimit=0",_("Fight in a one versus one arena battle to decide the winner"));
+        this.gametype_init(this, _("Duel"),"duel","g_duel",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_1V1,"","timelimit=10 pointlimit=0 leadlimit=0");
     }
     METHOD(Duel, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
     {
@@ -23,6 +23,11 @@ CLASS(Duel, Gametype)
         }
         return false;
     }
+    METHOD(Duel, describe, string(Duel this))
+    {
+        TC(Duel, this);
+        return _("Fight in a one versus one arena battle to decide the winner");
+    }
 ENDCLASS(Duel)
 REGISTER_GAMETYPE(DUEL, NEW(Duel));
 #define g_duel IS_GAMETYPE(DUEL)
index f1723757a6024d1d0a92ed5dfbd16f26995dcd60..a58073c55d30fafe55e0724d1c2841f899805661 100644 (file)
@@ -12,7 +12,7 @@ void HUD_Mod_FreezeTag_Export(int fh);
 CLASS(FreezeTag, Gametype)
     INIT(FreezeTag)
     {
-        this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
+        this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6");
     }
     METHOD(FreezeTag, m_parse_mapinfo, bool(string k, string v))
     {
@@ -42,6 +42,11 @@ CLASS(FreezeTag, Gametype)
         TC(Gametype, this);
         returns(menu, _("Round limit:"),     5,  100,  5, "fraglimit_override",        "g_freezetag_teams_override",   _("The amount of rounds won needed before the match will end"));
     }
+    METHOD(FreezeTag, describe, string(FreezeTag this))
+    {
+        TC(FreezeTag, this);
+        return _("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win");
+    }
 #ifdef CSQC
     ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_FreezeTag);
     ATTRIB(FreezeTag, m_modicons_export, void(int fh), HUD_Mod_FreezeTag_Export);
index 71f6b7d143486643813969527f5c231359c971a8..70644a1fa806577a106909a523e81250eda201cc 100644 (file)
@@ -5,7 +5,7 @@
 CLASS(Invasion, Gametype)
     INIT(Invasion)
     {
-        this.gametype_init(this, _("Invasion"),"inv","g_invasion",GAMETYPE_FLAG_USEPOINTS,"","pointlimit=50 type=0",_("Survive against waves of monsters"));
+        this.gametype_init(this, _("Invasion"),"inv","g_invasion",GAMETYPE_FLAG_USEPOINTS,"","pointlimit=50 type=0");
     }
     METHOD(Invasion, m_parse_mapinfo, bool(string k, string v))
     {
@@ -26,5 +26,10 @@ CLASS(Invasion, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
     }
+    METHOD(Invasion, describe, string(Invasion this))
+    {
+        TC(Invasion, this);
+        return _("Survive against waves of monsters");
+    }
 ENDCLASS(Invasion)
 REGISTER_GAMETYPE(INVASION, NEW(Invasion));
index 3aac451d1c0b2804f1109135483ab57085139684..dc668ae0a5faac883181493279447112efa81af8 100644 (file)
@@ -8,12 +8,17 @@ void HUD_Mod_Keepaway(vector pos, vector mySize);
 CLASS(Keepaway, Gametype)
     INIT(Keepaway)
     {
-        this.gametype_init(this, _("Keepaway"),"ka","g_keepaway",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=30",_("Hold the ball to get points for kills"));
+        this.gametype_init(this, _("Keepaway"),"ka","g_keepaway",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=30");
     }
     METHOD(Keepaway, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
     {
         return true;
     }
+    METHOD(Keepaway, describe, string(Keepaway this))
+    {
+        TC(Keepaway, this);
+        return _("Hold the ball to get points for kills");
+    }
 #ifdef CSQC
     ATTRIB(Keepaway, m_modicons, void(vector pos, vector mySize), HUD_Mod_Keepaway);
 #endif
index cc9cecdaf2a19aaabf2281fcad12b4b7e104d22b..df269d8ed43f9bc10199ee5cd171c4c82a1dbc99 100644 (file)
@@ -8,7 +8,7 @@ void HUD_Mod_KH(vector pos, vector mySize);
 CLASS(KeyHunt, Gametype)
     INIT(KeyHunt)
     {
-        this.gametype_init(this, _("Key Hunt"),"kh","g_keyhunt",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1000 teams=3 leadlimit=0",_("Gather all the keys to win the round"));
+        this.gametype_init(this, _("Key Hunt"),"kh","g_keyhunt",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1000 teams=3 leadlimit=0");
     }
     METHOD(KeyHunt, m_parse_mapinfo, bool(string k, string v))
     {
@@ -38,6 +38,11 @@ CLASS(KeyHunt, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),   200, 1500, 50, "g_keyhunt_point_limit",     "g_keyhunt_teams_override",     _("The amount of points needed before the match will end"));
     }
+    METHOD(KeyHunt, describe, string(KeyHunt this))
+    {
+        TC(KeyHunt, this);
+        return _("Gather all the keys to win the round");
+    }
 #ifdef CSQC
     ATTRIB(KeyHunt, m_modicons, void(vector pos, vector mySize), HUD_Mod_KH);
 #endif
index b90f6c6eb1db67dee498426eda422ce4680d14b9..42293bab0b97e268954ddd481d765709c734939c 100644 (file)
@@ -8,7 +8,7 @@ void HUD_Mod_LMS(vector myPos, vector mySize);
 CLASS(LastManStanding, Gametype)
     INIT(LastManStanding)
     {
-        this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_HIDELIMITS,"","timelimit=20 lives=5 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
+        this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_HIDELIMITS,"","timelimit=20 lives=5 leadlimit=0");
     }
     METHOD(LastManStanding, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
     {
@@ -19,6 +19,11 @@ CLASS(LastManStanding, Gametype)
         TC(Gametype, this);
         returns(menu, _("Lives:"),           3,   50,  1, "g_lms_lives_override",      string_null,                    string_null);
     }
+    METHOD(LastManStanding, describe, string(LastManStanding this))
+    {
+        TC(LastManStanding, this);
+        return _("Survive and kill until the enemies have no lives left");
+    }
     ATTRIB(LastManStanding, m_legacydefaults, string, "9 20 0");
 #ifdef CSQC
     ATTRIB(LastManStanding, m_modicons, void(vector myPos, vector mySize), HUD_Mod_LMS);
index 68237e4658d71cf03445ed93a9f1204138347211..688892d9e8f9465d79d7f75f0626b416dfcf5f76 100644 (file)
@@ -7,7 +7,7 @@
 CLASS(mayhem, Gametype)
        INIT(mayhem)
        {
-               this.gametype_init(this, _("Mayhem"),"mayhem","g_mayhem",GAMETYPE_FLAG_USEPOINTS,"","timelimit=15 pointlimit=1000 leadlimit=0",_("Compete for the most damage dealt and frags in this chaotic mayhem!"));
+               this.gametype_init(this, _("Mayhem"),"mayhem","g_mayhem",GAMETYPE_FLAG_USEPOINTS,"","timelimit=15 pointlimit=1000 leadlimit=0");
        }
        METHOD(mayhem, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
        {
@@ -30,6 +30,11 @@ CLASS(mayhem, Gametype)
                TC(Gametype, this);
                returns(menu, _("Point limit:"),     200,  2000,  100, "g_mayhem_point_limit",         string_null,         _("How much score is needed before the match will end"));
        }
+       METHOD(mayhem, describe, string(mayhem this))
+       {
+               TC(mayhem, this);
+               return _("Compete for the most damage dealt and frags in this chaotic mayhem!");
+       }
        ATTRIB(mayhem, m_legacydefaults, string, "1000 20 0");
 ENDCLASS(mayhem)
 REGISTER_GAMETYPE(MAYHEM, NEW(mayhem));
index 845fb2ec11161888a04e7d13d63a5ec44dbae3c0..81a5fc686140c4251f907cb24be6b823d60f5b64 100644 (file)
@@ -8,7 +8,7 @@ void HUD_Mod_NexBall(vector pos, vector mySize);
 CLASS(NexBall, Gametype)
     INIT(NexBall)
     {
-        this.gametype_init(this, _("Nexball"),"nb","g_nexball",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_WEAPONARENA,"","timelimit=20 pointlimit=5 leadlimit=0",_("Shoot and kick the ball into the enemies goal, keep your goal clean"));
+        this.gametype_init(this, _("Nexball"),"nb","g_nexball",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_WEAPONARENA,"","timelimit=20 pointlimit=5 leadlimit=0");
     }
     METHOD(NexBall, m_generate_mapinfo, void(Gametype this, string v))
     {
@@ -24,6 +24,11 @@ CLASS(NexBall, Gametype)
         TC(Gametype, this);
         returns(menu, _("Goal limit:"),      1,   50,  1, "g_nexball_goallimit",       string_null,                    _("The amount of goals needed before the match will end"));
     }
+    METHOD(NexBall, describe, string(NexBall this))
+    {
+        TC(NexBall, this);
+        return _("Shoot and kick the ball into the enemies goal, keep your goal clean");
+    }
 #ifdef CSQC
     ATTRIB(NexBall, m_modicons, void(vector pos, vector mySize), HUD_Mod_NexBall);
 #endif
index fc3938b9240521c192c94c9ac90a9756e9d56705..a48d4f876296c8a1ce9bfbcae637877d3548a766 100644 (file)
@@ -5,7 +5,7 @@
 CLASS(Onslaught, Gametype)
     INIT(Onslaught)
     {
-        this.gametype_init(this, _("Onslaught"),"ons","g_onslaught",GAMETYPE_FLAG_TEAMPLAY,"","pointlimit=1 timelimit=20",_("Capture control points to reach and destroy the enemy generator"));
+        this.gametype_init(this, _("Onslaught"),"ons","g_onslaught",GAMETYPE_FLAG_TEAMPLAY,"","pointlimit=1 timelimit=20");
     }
     METHOD(Onslaught, m_generate_mapinfo, void(Gametype this, string v))
     {
@@ -17,6 +17,11 @@ CLASS(Onslaught, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
     }
+    METHOD(Onslaught, describe, string(Onslaught this))
+    {
+        TC(Onslaught, this);
+        return _("Capture control points to reach and destroy the enemy generator");
+    }
     ATTRIB(Onslaught, m_legacydefaults, string, "20 0");
 ENDCLASS(Onslaught)
 REGISTER_GAMETYPE(ONSLAUGHT, NEW(Onslaught));
index ddc11089c12116cfc1d142affbdd964aedc49fd3..26120f4c6a288937f4dd42a44dbf5a076112b3db 100644 (file)
@@ -8,7 +8,7 @@ void HUD_Mod_Race(vector pos, vector mySize);
 CLASS(Race, Gametype)
     INIT(Race)
     {
-        this.gametype_init(this, _("Race"),"rc","g_race",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0",_("Race against other players to the finish line"));
+        this.gametype_init(this, _("Race"),"rc","g_race",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0");
     }
     METHOD(Race, m_parse_mapinfo, bool(string k, string v))
     {
@@ -37,6 +37,11 @@ CLASS(Race, Gametype)
         TC(Gametype, this);
         returns(menu, _("Laps:"),            1,   25,  1, "g_race_laps_limit",         string_null,                    string_null);
     }
+    METHOD(Race, describe, string(Race this))
+    {
+        TC(Race, this);
+        return _("Race against other players to the finish line");
+    }
 #ifdef CSQC
     ATTRIB(Race, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
 #endif
index 7c5d8c7c40263af6403529534e9b396768b196f1..ccb38f4d71e9a382a1b898ec8a1fd285eb51ed7d 100644 (file)
@@ -9,7 +9,7 @@ void HUD_Mod_Survival(vector pos, vector mySize);
 CLASS(Survival, Gametype)
     INIT(Survival)
     {
-        this.gametype_init(this, _("Survival"), "surv", "g_survival", GAMETYPE_FLAG_USEPOINTS, "", "timelimit=20 pointlimit=12", _("Identify and eliminate all the hunters before all your allies are gone"));
+        this.gametype_init(this, _("Survival"), "surv", "g_survival", GAMETYPE_FLAG_USEPOINTS, "", "timelimit=20 pointlimit=12");
     }
     METHOD(Survival, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
     {
@@ -25,6 +25,11 @@ CLASS(Survival, Gametype)
         }
         return false;
     }
+    METHOD(Survival, describe, string(Survival this))
+    {
+        TC(Survival, this);
+        return _("Identify and eliminate all the hunters before all your allies are gone");
+    }
 #ifdef CSQC
     ATTRIB(Survival, m_modicons, void(vector pos, vector mySize), HUD_Mod_Survival);
 #endif
index ab7a16427c5a954d9b76dd0a9b5f3e0107da213f..31edf1a54a8b8f0d28b7349d4ebe14eb9d66f92f 100644 (file)
@@ -6,7 +6,7 @@
 CLASS(TeamDeathmatch, Gametype)
     INIT(TeamDeathmatch)
     {
-        this.gametype_init(this, _("Team Deathmatch"),"tdm","g_tdm",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=15 pointlimit=50 teams=2 leadlimit=0",_("Help your team score the most frags against the enemy team"));
+        this.gametype_init(this, _("Team Deathmatch"),"tdm","g_tdm",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PRIORITY,"","timelimit=15 pointlimit=50 teams=2 leadlimit=0");
     }
     METHOD(TeamDeathmatch, m_parse_mapinfo, bool(string k, string v))
     {
@@ -46,6 +46,11 @@ CLASS(TeamDeathmatch, Gametype)
         TC(Gametype, this);
         returns(menu, _("Point limit:"),     5,  100,  5, "g_tdm_point_limit",         "g_tdm_teams_override",         _("The amount of points needed before the match will end"));
     }
+    METHOD(TeamDeathmatch, describe, string(TeamDeathmatch this))
+    {
+        TC(TeamDeathmatch, this);
+        return _("Help your team score the most frags against the enemy team");
+    }
     ATTRIB(TeamDeathmatch, m_legacydefaults, string, "50 20 2 0");
 ENDCLASS(TeamDeathmatch)
 REGISTER_GAMETYPE(TEAM_DEATHMATCH, NEW(TeamDeathmatch));
index af9d60db3af7dc3aa908b97d715a4dcb161a2d09..087af298d86cccb5bb4545b3b102bb84ef8b3b87 100644 (file)
@@ -10,7 +10,7 @@
 CLASS(TeamKeepaway, Gametype)
     INIT(TeamKeepaway)
     {
-        this.gametype_init(this, _("Team Keepaway"),"tka","g_tka",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=15 pointlimit=50 teams=2 leadlimit=0",_("Keep the ball in your team's possession to get points for kills"));
+        this.gametype_init(this, _("Team Keepaway"),"tka","g_tka",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=15 pointlimit=50 teams=2 leadlimit=0");
     }
     METHOD(TeamKeepaway, m_parse_mapinfo, bool(string k, string v))
     {
@@ -51,6 +51,11 @@ CLASS(TeamKeepaway, Gametype)
     {
         cvar_set("g_tka_teams", sa);
     }
+    METHOD(TeamKeepaway, describe, string(TeamKeepaway this))
+    {
+        TC(TeamKeepaway, this);
+        return _("Keep the ball in your team's possession to get points for kills");
+    }
 #ifdef CSQC
     ATTRIB(TeamKeepaway, m_modicons, void(vector pos, vector mySize), HUD_Mod_TeamKeepaway);
 #endif
index 5280e79fc8a8c69b26597eecb91a9d98fcc15089..9d5a5c6619aef583446cc44c4d2b9879479140b8 100644 (file)
@@ -7,7 +7,7 @@
 CLASS(tmayhem, Gametype)
        INIT(tmayhem)
        {
-               this.gametype_init(this, _("Team Mayhem"),"tmayhem","g_tmayhem",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1500 teams=2 leadlimit=0",_("Compete with your team for the most damage dealt and frags in this chaotic mayhem!"));
+               this.gametype_init(this, _("Team Mayhem"),"tmayhem","g_tmayhem",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1500 teams=2 leadlimit=0");
        }
        METHOD(tmayhem, m_parse_mapinfo, bool(string k, string v))
        {
@@ -45,6 +45,11 @@ CLASS(tmayhem, Gametype)
                TC(Gametype, this);
                returns(menu, _("Point limit:"),     200,  3000,  100, "g_tmayhem_point_limit",         "g_tmayhem_teams_override",         _("How much score is needed before the match will end"));
        }
+       METHOD(tmayhem, describe, string(tmayhem this))
+       {
+               TC(tmayhem, this);
+               return _("Compete with your team for the most damage dealt and frags in this chaotic mayhem!");
+       }
        ATTRIB(tmayhem, m_legacydefaults, string, "1500 20 2 0");
 ENDCLASS(tmayhem)
 REGISTER_GAMETYPE(TEAM_MAYHEM, NEW(tmayhem));
index 677a5f8f7af52f03daa6db8b4cf667144094483e..938554326df0fd6c86306efed30fb5aa5cbdec06 100644 (file)
@@ -650,7 +650,7 @@ Gametype MapInfo_Type_FromString(string gtype, bool dowarn, bool is_q3compat)
 
 string MapInfo_Type_Description(Gametype t)
 {
-       return t ? t.gametype_description : "";
+       return t ? t.describe(t) : "";
 }
 
 string MapInfo_Type_ToString(Gametype t)
index e1368871ec070e556a1c606c9ca55235a5c6c869..94172da1d2a9e723acde80a8fd33bc0e8051a7fa 100644 (file)
@@ -52,8 +52,6 @@ CLASS(Gametype, Object)
     ATTRIB(Gametype, m_1v1, bool, false);
     /** game type defaults */
     ATTRIB(Gametype, model2, string);
-    /** game type description */
-    ATTRIB(Gametype, gametype_description, string);
     /** game type priority in random selections */
     ATTRIB(Gametype, m_priority, int, 0);
 #ifdef CSQC
@@ -92,10 +90,13 @@ CLASS(Gametype, Object)
         returns(menu, _("Frag limit:"),      5,  100,  5, "fraglimit_override",        string_null,                    _("The amount of frags needed before the match will end"));
     }
 
+    /* game type description
+     * previously stored in a .string gametype_description ATTRIB
+        */
     METHOD(Gametype, describe, string(Gametype this))
     {
         TC(Gametype, this);
-        return this.gametype_description;
+               return SUPER(Object).describe(this);
     }
 
     METHOD(Gametype, display, void(Gametype this, void(string name, string icon) returns))
@@ -104,7 +105,7 @@ CLASS(Gametype, Object)
         returns(this.message, strcat("gametype_", this.mdl));
     }
 
-    METHOD(Gametype, gametype_init, void(Gametype this, string hname, string sname, string g_name, int gflags, string mutators, string defaults, string gdescription))
+    METHOD(Gametype, gametype_init, void(Gametype this, string hname, string sname, string g_name, int gflags, string mutators, string defaults))
     {
         this.netname = g_name;
         this.mdl = sname;
@@ -112,7 +113,6 @@ CLASS(Gametype, Object)
         this.team = (gflags & GAMETYPE_FLAG_TEAMPLAY);
         this.m_mutators = cons(sname, mutators);
         this.model2 = defaults;
-        this.gametype_description = gdescription;
         this.frags = (gflags & GAMETYPE_FLAG_USEPOINTS);
         this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
         this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
index 5960287bf2ec91ba771a2e91350ea66a432b4d98..de42587354b86c910e0ed0d65780606eb335a835 100644 (file)
@@ -334,7 +334,7 @@ CLASS(Object)
        {
                TC(Object, this);
                string s = _("No description");
-               if (cvar("developer") > 0)
+               if (autocvar_developer > 0)
                {
                        for (int i = 0, n = numentityfields(); i < n; ++i)
                        {