Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
tmayhem Class Reference
Inheritance diagram for tmayhem:
Collaboration diagram for tmayhem:

Public Member Functions

 tmayhem ()
 ATTRIB (Gametype, m_description, string)
 gametype description
 ATTRIB (Gametype, m_modicons, void(vector pos, vector mySize))
 ATTRIB (Gametype, m_modicons_export, void(int fh))
 ATTRIB (Gametype, m_modicons_reset, void())
 ATTRIB (Gametype, m_mutators, string)
 ATTRIB (Gametype, mdl, string)
 gametype short name
 ATTRIB (Gametype, message, string)
 human readable name
 ATTRIB (Gametype, model2, string)
 gametype defaults
 ATTRIB (Gametype, netname, string)
 gametype name as in cvar (with g_ prefix)
virtual void describe ()
virtual void display ()
virtual void gametype_init ()
virtual void m_configuremenu ()
virtual void m_generate_mapinfo ()
virtual void m_isAlwaysSupported ()
virtual void m_isForcedSupported ()
virtual void m_isTwoBaseMode ()
virtual void m_parse_mapinfo ()
virtual void m_setTeams ()

Public Attributes

bool frags = true
 does this gametype use a point limit?
int items = 0
 gametype ID
bool m_1v1 = false
 1v1 gameplay?
vector m_color = '1 1 1'
 color
bool m_hidelimits = false
 should this gametype display a score limit in the scoreboard?
int m_id = 0
string m_legacydefaults = "1500 20 2 0"
int m_priority = 0
 gametype priority in random selections
bool m_weaponarena = false
 does this gametype enforce its own weapon arena?
bool team = false
 does this gametype support teamplay?

Detailed Description

Definition at line 7 of file tmayhem.qh.

Constructor & Destructor Documentation

◆ tmayhem()

tmayhem::tmayhem ( )
inline

Definition at line 8 of file tmayhem.qh.

9 {
10 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"));
11 }
virtual void gametype_init()
Definition mapinfo.qh:117
const int GAMETYPE_FLAG_USEPOINTS
Definition mapinfo.qh:20
const int GAMETYPE_FLAG_TEAMPLAY
Definition mapinfo.qh:19

References tmayhem(), GAMETYPE_FLAG_TEAMPLAY, GAMETYPE_FLAG_USEPOINTS, Gametype::gametype_init(), and INIT.

Referenced by tmayhem(), m_configuremenu(), m_isAlwaysSupported(), m_isForcedSupported(), m_parse_mapinfo(), and m_setTeams().

Member Function Documentation

◆ ATTRIB() [1/9]

Gametype::ATTRIB ( Gametype ,
m_description ,
string  )
inherited

gametype description

References ATTRIB(), and m_description.

◆ ATTRIB() [2/9]

Gametype::ATTRIB ( Gametype ,
m_modicons ,
void(vector pos, vector mySize)  )
inherited

References vector.

◆ ATTRIB() [3/9]

Gametype::ATTRIB ( Gametype ,
m_modicons_export ,
void(int fh)  )
inherited

◆ ATTRIB() [4/9]

Gametype::ATTRIB ( Gametype ,
m_modicons_reset ,
void()  )
inherited

◆ ATTRIB() [5/9]

Gametype::ATTRIB ( Gametype ,
m_mutators ,
string  )
inherited

◆ ATTRIB() [6/9]

Gametype::ATTRIB ( Gametype ,
mdl ,
string  )
inherited

gametype short name

References ATTRIB(), and mdl.

◆ ATTRIB() [7/9]

Gametype::ATTRIB ( Gametype ,
message ,
string  )
inherited

human readable name

References ATTRIB(), and message.

◆ ATTRIB() [8/9]

Gametype::ATTRIB ( Gametype ,
model2 ,
string  )
inherited

gametype defaults

References ATTRIB(), and model2.

◆ ATTRIB() [9/9]

Gametype::ATTRIB ( Gametype ,
netname ,
string  )
inherited

gametype name as in cvar (with g_ prefix)

References ATTRIB(), and netname.

Referenced by ATTRIB(), ATTRIB(), ATTRIB(), ATTRIB(), and ATTRIB().

◆ describe()

virtual void Gametype::describe ( )
inlinevirtualinherited

Definition at line 101 of file mapinfo.qh.

102 {
103 TC(Gametype, this);
104 return SUPER(Gametype).describe(this);
105 }
#define TC(T, sym)
Definition _all.inc:82
#define SUPER(cname)
Definition oo.qh:231

References describe(), SUPER, and TC.

Referenced by describe().

◆ display()

virtual void Gametype::display ( )
inlinevirtualinherited

Definition at line 107 of file mapinfo.qh.

108 {
109 TC(Gametype, this);
110 if (this.mdl == "")
111 returns(this.message, "");
112 else
113 returns(this.message, icon_path_from_menuskin(strcat("gametype_", this.mdl)));
114 }
string message
Definition powerups.qc:19
string mdl
Definition item.qh:89
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))

References display(), name, strcat(), and TC.

Referenced by display().

◆ gametype_init()

virtual void Gametype::gametype_init ( )
inlinevirtualinherited

Definition at line 117 of file mapinfo.qh.

118 {
119 this.netname = g_name;
120 this.mdl = sname;
121 this.message = hname;
122 this.team = (gflags & GAMETYPE_FLAG_TEAMPLAY);
123 this.m_mutators = cons(sname, mutators);
124 this.model2 = defaults;
125 this.m_description = gdescription;
126 this.frags = (gflags & GAMETYPE_FLAG_USEPOINTS);
127 this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
128 this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
130 this.m_1v1 = (gflags & GAMETYPE_FLAG_1V1);
131 }
bool m_hidelimits
should this gametype display a score limit in the scoreboard?
Definition mapinfo.qh:50
bool m_1v1
1v1 gameplay?
Definition mapinfo.qh:54
bool m_weaponarena
does this gametype enforce its own weapon arena?
Definition mapinfo.qh:52
bool team
does this gametype support teamplay?
Definition mapinfo.qh:46
int m_priority
gametype priority in random selections
Definition mapinfo.qh:60
bool frags
does this gametype use a point limit?
Definition mapinfo.qh:48
string netname
Definition powerups.qc:20
const int GAMETYPE_FLAG_PRIORITY
Definition mapinfo.qh:22
const int GAMETYPE_FLAG_1V1
Definition mapinfo.qh:25
const int GAMETYPE_FLAG_WEAPONARENA
Definition mapinfo.qh:24
const int GAMETYPE_FLAG_HIDELIMITS
Definition mapinfo.qh:23
const int GAMETYPE_FLAG_PREFERRED
Definition mapinfo.qh:21
this m_description
Definition pages.qc:28
ERASEABLE string cons(string a, string b)
Definition string.qh:276
string model2

References cons(), GAMETYPE_FLAG_1V1, GAMETYPE_FLAG_HIDELIMITS, GAMETYPE_FLAG_PREFERRED, GAMETYPE_FLAG_PRIORITY, GAMETYPE_FLAG_TEAMPLAY, GAMETYPE_FLAG_USEPOINTS, GAMETYPE_FLAG_WEAPONARENA, and gametype_init().

Referenced by Assault::Assault(), CaptureTheFlag::CaptureTheFlag(), ClanArena::ClanArena(), Deathmatch::Deathmatch(), Domination::Domination(), Duel::Duel(), FreezeTag::FreezeTag(), Invasion::Invasion(), Keepaway::Keepaway(), KeyHunt::KeyHunt(), LastManStanding::LastManStanding(), mayhem::mayhem(), NexBall::NexBall(), Onslaught::Onslaught(), Race::Race(), RaceCTS::RaceCTS(), Survival::Survival(), TeamDeathmatch::TeamDeathmatch(), TeamKeepaway::TeamKeepaway(), tmayhem::tmayhem(), and gametype_init().

◆ m_configuremenu()

virtual void tmayhem::m_configuremenu ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 45 of file tmayhem.qh.

46 {
47 TC(Gametype, this);
48 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"));
49 }

References tmayhem(), entity(), m_configuremenu(), and TC.

Referenced by m_configuremenu().

◆ m_generate_mapinfo()

virtual void Gametype::m_generate_mapinfo ( )
inlinevirtualinherited

Reimplemented in Assault, CaptureTheFlag, Domination, Invasion, NexBall, Onslaught, Race, and RaceCTS.

Definition at line 75 of file mapinfo.qh.

76 {
77 TC(Gametype, this);
78 }

References m_generate_mapinfo(), and TC.

Referenced by m_generate_mapinfo().

◆ m_isAlwaysSupported()

virtual void tmayhem::m_isAlwaysSupported ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 27 of file tmayhem.qh.

28 {
29 return true;
30 }

References tmayhem(), and m_isAlwaysSupported().

Referenced by m_isAlwaysSupported().

◆ m_isForcedSupported()

virtual void tmayhem::m_isForcedSupported ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 31 of file tmayhem.qh.

32 {
33 if(!(MapInfo_Map_supportedGametypes & this.gametype_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.gametype_flags)){
34 return true;
35 }
36 if(!(MapInfo_Map_supportedGametypes & this.gametype_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH.gametype_flags)){
37 return true;
38 }
39 return false;
40 }
vector MapInfo_Map_supportedGametypes
Definition mapinfo.qh:13
vector gametype_flags
Definition mapinfo.qh:28

References tmayhem(), gametype_flags, m_isForcedSupported(), and MapInfo_Map_supportedGametypes.

Referenced by m_isForcedSupported().

◆ m_isTwoBaseMode()

virtual void Gametype::m_isTwoBaseMode ( )
inlinevirtualinherited

Reimplemented in Assault, CaptureTheFlag, NexBall, and Race.

Definition at line 79 of file mapinfo.qh.

80 {
81 return false;
82 }

References m_isTwoBaseMode().

Referenced by m_isTwoBaseMode().

◆ m_parse_mapinfo()

virtual void tmayhem::m_parse_mapinfo ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 12 of file tmayhem.qh.

13 {
14 if (!k)
15 {
16 cvar_set("g_tmayhem_teams", cvar_defstring("g_tmayhem_teams"));
17 return true;
18 }
19 switch (k)
20 {
21 case "teams":
22 cvar_set("g_tmayhem_teams", v);
23 return true;
24 }
25 return false;
26 }
void cvar_set(string name, string value)
const string cvar_defstring(string name)

References tmayhem(), cvar_defstring(), cvar_set(), and m_parse_mapinfo().

Referenced by m_parse_mapinfo().

◆ m_setTeams()

virtual void tmayhem::m_setTeams ( )
inlinevirtual

Definition at line 41 of file tmayhem.qh.

42 {
43 cvar_set("g_tmayhem_teams", sa);
44 }

References tmayhem(), cvar_set(), and m_setTeams().

Referenced by m_setTeams().

Member Data Documentation

◆ frags

bool Gametype::frags = true
inherited

does this gametype use a point limit?

Definition at line 48 of file mapinfo.qh.

Referenced by _MapInfo_Map_ApplyGametype().

◆ items

int Gametype::items = 0
inherited

gametype ID

Definition at line 36 of file mapinfo.qh.

◆ m_1v1

bool Gametype::m_1v1 = false
inherited

1v1 gameplay?

Definition at line 54 of file mapinfo.qh.

◆ m_color

vector Gametype::m_color = '1 1 1'
inherited

color

Definition at line 44 of file mapinfo.qh.

◆ m_hidelimits

bool Gametype::m_hidelimits = false
inherited

should this gametype display a score limit in the scoreboard?

Definition at line 50 of file mapinfo.qh.

◆ m_id

int Gametype::m_id = 0
inherited

Definition at line 34 of file mapinfo.qh.

◆ m_legacydefaults

string tmayhem::m_legacydefaults = "1500 20 2 0"

Definition at line 50 of file tmayhem.qh.

◆ m_priority

int Gametype::m_priority = 0
inherited

gametype priority in random selections

Definition at line 60 of file mapinfo.qh.

◆ m_weaponarena

bool Gametype::m_weaponarena = false
inherited

does this gametype enforce its own weapon arena?

Definition at line 52 of file mapinfo.qh.

◆ team

bool Gametype::team = false
inherited

does this gametype support teamplay?

Definition at line 46 of file mapinfo.qh.

Referenced by _MapInfo_GetTeamPlayBool().


The documentation for this class was generated from the following file: