Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ammo.qc
Go to the documentation of this file.
1#include "ammo.qh"
2
3#ifdef MENUQC
5
6METHOD(Ammo, describe, string(Ammo this))
7{
8 TC(Ammo, this);
11 PAR(_("The %s ammo type is used by the:"), COLORED_NAME(this));
12 FOREACH(Weapons, it.ammo_type == ammo, {
13 PAGE_TEXT = strcat(PAGE_TEXT, "\n* ", COLORED_NAME(it));
14 });
15 const string nname = this.netname == "bullets" ? "nails" : this.netname;
16 PAR(_("By default, the pickup gives you %s ammo, to a maximum of %s."), strcat("^9", cvar_defstring(strcat("g_pickup_", nname)), "^7"), cvar_defstring(sprintf("g_pickup_%s_max", nname)));
17 return PAGE_TEXT;
18 // TODO: rename all *nails* cvars to bullets
19}
20
21METHOD(Fuel, describe, string(Fuel this))
22{
23 TC(Fuel, this);
25 PAR(_("The %s ammo type is used by the %s."), COLORED_NAME(this), COLORED_NAME(ITEM_Jetpack));
26 PAR(_("By default, the pickup gives you %s ammo, to a maximum of %s."), strcat("^9", cvar_defstring("g_pickup_fuel"), "^7"), cvar_defstring("g_pickup_fuel_max"));
27 return PAGE_TEXT;
28}
29#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition ammo.qh:24
Definition ammo.qh:196
string netname
Definition powerups.qc:20
#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
const string cvar_defstring(string name)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#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
float ammo
Definition sv_turrets.qh:43
entity GetAmmoResource(Ammo ammotype)
Definition all.qc:199