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

Public Member Functions

 Invasion ()
 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 ()

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 = ""
 DO NOT USE, this is compatibility for legacy maps!
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 5 of file invasion.qh.

Constructor & Destructor Documentation

◆ Invasion()

Invasion::Invasion ( )
inline

Definition at line 6 of file invasion.qh.

7 {
8 this.gametype_init(this, _("Invasion"),"inv","g_invasion",GAMETYPE_FLAG_USEPOINTS,"","pointlimit=50 type=0",_("Survive against waves of monsters"));
9 }
virtual void gametype_init()
Definition mapinfo.qh:117
const int GAMETYPE_FLAG_USEPOINTS
Definition mapinfo.qh:20

References Invasion(), GAMETYPE_FLAG_USEPOINTS, Gametype::gametype_init(), and INIT.

Referenced by Invasion(), m_configuremenu(), m_generate_mapinfo(), and m_parse_mapinfo().

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_TEAMPLAY
Definition mapinfo.qh:19
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 Invasion::m_configuremenu ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 25 of file invasion.qh.

26 {
27 TC(Gametype, this);
28 returns(menu, _("Point limit:"), 50, 500, 10, string_null, string_null, string_null);
29 }
string string_null
Definition nil.qh:9

References Invasion(), entity(), m_configuremenu(), string_null, and TC.

Referenced by m_configuremenu().

◆ m_generate_mapinfo()

virtual void Invasion::m_generate_mapinfo ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 20 of file invasion.qh.

21 {
22 if(v == "invasion_spawnpoint")
24 }
vector MapInfo_Map_supportedGametypes
Definition mapinfo.qh:13
vector gametype_flags
Definition mapinfo.qh:28

References Invasion(), gametype_flags, m_generate_mapinfo(), and MapInfo_Map_supportedGametypes.

Referenced by m_generate_mapinfo().

◆ m_isAlwaysSupported()

virtual void Gametype::m_isAlwaysSupported ( )
inlinevirtualinherited

Reimplemented in ClanArena, Deathmatch, Duel, FreezeTag, Keepaway, KeyHunt, LastManStanding, mayhem, Survival, TeamDeathmatch, TeamKeepaway, and tmayhem.

Definition at line 83 of file mapinfo.qh.

84 {
85 return false;
86 }

References m_isAlwaysSupported().

Referenced by m_isAlwaysSupported().

◆ m_isForcedSupported()

virtual void Gametype::m_isForcedSupported ( )
inlinevirtualinherited

Reimplemented in Duel, mayhem, Survival, TeamDeathmatch, TeamKeepaway, and tmayhem.

Definition at line 87 of file mapinfo.qh.

88 {
89 return false;
90 }

References m_isForcedSupported().

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 Invasion::m_parse_mapinfo ( )
inlinevirtual

Reimplemented from Gametype.

Definition at line 10 of file invasion.qh.

11 {
12 switch (k)
13 {
14 case "type":
15 cvar_set("g_invasion_type", v);
16 return true;
17 }
18 return false;
19 }
void cvar_set(string name, string value)

References Invasion(), cvar_set(), and m_parse_mapinfo().

Referenced by m_parse_mapinfo().

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 Gametype::m_legacydefaults = ""
inherited

DO NOT USE, this is compatibility for legacy maps!

Definition at line 68 of file mapinfo.qh.

Referenced by _MapInfo_GetDefault().

◆ 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: