Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
new_toys.qc
Go to the documentation of this file.
1#include "new_toys.qh"
2
4
5// TODO: unhardcode this
6bool nt_IsNewToy(int w)
7{
8 switch (w)
9 {
10 case WEP_SEEKER.m_id:
11 case WEP_MINE_LAYER.m_id:
12 case WEP_HLAC.m_id:
13 case WEP_RIFLE.m_id:
14 case WEP_ARC.m_id:
15 return true;
16 default:
17 return false;
18 }
19}
20
21#ifdef MENUQC
24
25METHOD(MutatorNewToys, describe, string(MutatorNewToys this))
26{
27 TC(MutatorNewToys, this);
29 PAR(_("The %s mutator, enabled by default, allows the spawning of new gimmicky weapons, sometimes replacing a core weapon."), COLORED_NAME(this));
30 PAR(_("Since these weapons can't spawn in %s and %s, the %s mutator can't be enabled concurrently."), COLORED_NAME(MUTATOR_mutator_instagib), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this));
31 PAR(_("The current %s weapons are:"), COLORED_NAME(this)); // do it like this so that the string doesn't need to change when the list is updated
32 FOREACH(Weapons, nt_IsNewToy(it.m_id), {
33 PAGE_TEXT = strcat(PAGE_TEXT, "\n* ", COLORED_NAME(it));
34 });
35 return PAGE_TEXT;
36}
37#endif
#define COLORED_NAME(this)
Definition color.qh:195
Weapons
Definition guide.qh:113
#define FOREACH(list, cond, body)
Definition iter.qh:19
#define TC(T, sym)
Definition _all.inc:82
bool nt_IsNewToy(int w)
Definition new_toys.qc:6
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define PAGE_TEXT
Definition string.qh:643
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:649
#define PAGE_TEXT_INIT()
Definition string.qh:642