Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_new_toys.qc
Go to the documentation of this file.
1#include "ui_new_toys.qh"
2
4
6{
8 me.configureDialog(me);
9 return me;
10}
11
13{
14 entity e;
15
17
18 me.TR(me);
19 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Replacement:")));
20 me.TR(me);
21 const string nta_tooltip = _("Automatically replace some normal weapons of the map with their corresponding additional weapons");
22 me.TDempty(me, 0.2);
23 me.TD(me, 1, (4 - 0.2) / 3, e = makeXonoticRadioButton_T(1, "g_new_toys_autoreplace", "0", _("Never"), nta_tooltip));
24 me.TD(me, 1, (4 - 0.2) / 3, e = makeXonoticRadioButton_T(1, "g_new_toys_autoreplace", "1", _("Always"), nta_tooltip));
25 me.TD(me, 1, (4 - 0.2) / 3, e = makeXonoticRadioButton_T(1, "g_new_toys_autoreplace", "2", _("Randomly"), nta_tooltip));
26}
27
29{
30 return _("Allow maps to spawn additional weapons (new toys).");
31}
33{
34 bool can_enable = (!cvar("g_instagib") && !cvar("g_overkill") && !cvar("g_melee_only")
35 && (cvar_string("g_weaponarena") == "0" || cvar_string("g_weaponarena") == "off" || cvar_string("g_weaponarena") == ""));
36 if (is_already_enabled)
37 return can_enable && cvar(me.message);
38 return can_enable;
39}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
virtual void canEnable()
float cvar(string name)
const string cvar_string(string name)
entity Mutators_main_checkbox(entity me)
Definition mutatortab.qc:25
#define NEW(cname,...)
Definition oo.qh:120
#define METHOD(cname, name, prototype)
Definition oo.qh:274
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
void XonoticMutatorNewToysTab_fill(entity me)
entity makeXonoticMutatorNewToysTab()
Definition ui_new_toys.qc:5
entity makeXonoticRadioButton_T(float theGroup, string theCvar, string theValue, string theText, string theTooltip)
Definition radiobutton.qc:3