From a4666da483acde04712679fe1b527a6690a2b8dc Mon Sep 17 00:00:00 2001 From: otta8634 Date: Mon, 16 Dec 2024 21:50:56 +0800 Subject: [PATCH] Remove .gametype_description, instead use .describe method This method was added for a reason. --- qcsrc/common/gamemodes/gamemode/assault/assault.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/ctf/ctf.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/cts/cts.qh | 7 ++++++- .../common/gamemodes/gamemode/deathmatch/deathmatch.qh | 7 ++++++- .../common/gamemodes/gamemode/domination/domination.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/duel/duel.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/invasion/invasion.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/lms/lms.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/nexball/nexball.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/race/race.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/survival/survival.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/tdm/tdm.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/tka/tka.qh | 7 ++++++- qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh | 7 ++++++- qcsrc/common/mapinfo.qc | 2 +- qcsrc/common/mapinfo.qh | 10 +++++----- qcsrc/lib/oo.qh | 2 +- 23 files changed, 127 insertions(+), 27 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/assault/assault.qh b/qcsrc/common/gamemodes/gamemode/assault/assault.qh index c07002d8f..3a78a520f 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/assault.qh +++ b/qcsrc/common/gamemodes/gamemode/assault/assault.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh b/qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh index b3a8635a1..1476e3692 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh +++ b/qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qh @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/ctf/ctf.qh b/qcsrc/common/gamemodes/gamemode/ctf/ctf.qh index c5d15fec9..1d0f0a1f3 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/ctf.qh @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/cts/cts.qh b/qcsrc/common/gamemodes/gamemode/cts/cts.qh index c677ff602..52e42b927 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/cts.qh +++ b/qcsrc/common/gamemodes/gamemode/cts/cts.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/deathmatch/deathmatch.qh b/qcsrc/common/gamemodes/gamemode/deathmatch/deathmatch.qh index ca55a3b87..9c2a597ef 100644 --- a/qcsrc/common/gamemodes/gamemode/deathmatch/deathmatch.qh +++ b/qcsrc/common/gamemodes/gamemode/deathmatch/deathmatch.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/domination/domination.qh b/qcsrc/common/gamemodes/gamemode/domination/domination.qh index 3117c2980..38db5358b 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/domination.qh +++ b/qcsrc/common/gamemodes/gamemode/domination/domination.qh @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/duel/duel.qh b/qcsrc/common/gamemodes/gamemode/duel/duel.qh index 316b6c341..cb1942ce4 100644 --- a/qcsrc/common/gamemodes/gamemode/duel/duel.qh +++ b/qcsrc/common/gamemodes/gamemode/duel/duel.qh @@ -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) diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh index f1723757a..a58073c55 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh +++ b/qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qh @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/invasion/invasion.qh b/qcsrc/common/gamemodes/gamemode/invasion/invasion.qh index 71f6b7d14..70644a1fa 100644 --- a/qcsrc/common/gamemodes/gamemode/invasion/invasion.qh +++ b/qcsrc/common/gamemodes/gamemode/invasion/invasion.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh index 3aac451d1..dc668ae0a 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh +++ b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh b/qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh index cc9cecdaf..df269d8ed 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/keyhunt.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/lms/lms.qh b/qcsrc/common/gamemodes/gamemode/lms/lms.qh index b90f6c6eb..42293bab0 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/lms.qh +++ b/qcsrc/common/gamemodes/gamemode/lms/lms.qh @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh b/qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh index 68237e465..688892d9e 100644 --- a/qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh +++ b/qcsrc/common/gamemodes/gamemode/mayhem/mayhem.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qh b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qh index 845fb2ec1..81a5fc686 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qh +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh index fc3938b92..a48d4f876 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/race/race.qh b/qcsrc/common/gamemodes/gamemode/race/race.qh index ddc11089c..26120f4c6 100644 --- a/qcsrc/common/gamemodes/gamemode/race/race.qh +++ b/qcsrc/common/gamemodes/gamemode/race/race.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/survival/survival.qh b/qcsrc/common/gamemodes/gamemode/survival/survival.qh index 7c5d8c7c4..ccb38f4d7 100644 --- a/qcsrc/common/gamemodes/gamemode/survival/survival.qh +++ b/qcsrc/common/gamemodes/gamemode/survival/survival.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/tdm/tdm.qh b/qcsrc/common/gamemodes/gamemode/tdm/tdm.qh index ab7a16427..31edf1a54 100644 --- a/qcsrc/common/gamemodes/gamemode/tdm/tdm.qh +++ b/qcsrc/common/gamemodes/gamemode/tdm/tdm.qh @@ -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)); diff --git a/qcsrc/common/gamemodes/gamemode/tka/tka.qh b/qcsrc/common/gamemodes/gamemode/tka/tka.qh index af9d60db3..087af298d 100644 --- a/qcsrc/common/gamemodes/gamemode/tka/tka.qh +++ b/qcsrc/common/gamemodes/gamemode/tka/tka.qh @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh b/qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh index 5280e79fc..9d5a5c661 100644 --- a/qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh +++ b/qcsrc/common/gamemodes/gamemode/tmayhem/tmayhem.qh @@ -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)); diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 677a5f8f7..938554326 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -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) diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index e1368871e..94172da1d 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -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); diff --git a/qcsrc/lib/oo.qh b/qcsrc/lib/oo.qh index 5960287bf..de4258735 100644 --- a/qcsrc/lib/oo.qh +++ b/qcsrc/lib/oo.qh @@ -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) { -- 2.39.2