Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_nix.qc
Go to the documentation of this file.
1#include "ui_nix.qh"
2
5
7{
9 me.configureDialog(me);
10 return me;
11}
12
14{
16 if (cvar("g_nix"))
17 {
18 if (cvar_string("g_weaponarena") != "0")
19 cvar_set("g_weaponarena", "0"); // weaponarena can't be enabled if NIX is, or at least we pretend it can't
20 if (cvar("g_melee_only"))
21 cvar_set("g_melee_only", "0");
22 }
23}
24
26{
29
30 me.TR(me);
31 me.TD(me, 1, 4, e = makeXonoticCheckBox_T(0, "g_nix_with_blaster", _("With Blaster"),
32 _("Always carry the Blaster as an additional weapon in NIX")));
33 me.TR(me);
34 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Allow maps to spawn:")));
35 me.TR(me);
36 me.TDempty(me, 0.2);
37 me.TD(me, 1, (4 - 0.2) * 0.6, e = makeXonoticCheckBox(0, "g_nix_with_healtharmor", _("Health and armor")));
38 me.TD(me, 1, (4 - 0.2) * 0.4, e = makeXonoticCheckBox(0, "g_nix_with_powerups", _("Powerups")));
39}
40
42{
44}
45METHOD(XonoticMutatorNIXTab, canEnable, bool(XonoticMutatorNIXTab me, bool is_already_enabled))
46{
47 bool can_enable = (!cvar("g_instagib") && !cvar("g_overkill") && !cvar("g_melee_only"));
48 if (is_already_enabled)
49 return can_enable && cvar(me.message);
50 return can_enable;
51}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
virtual void canEnable()
Definition ui_nix.qc:45
void cvar_set(string name, string value)
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 MutatorNIX_CheckBox_saveCvars(entity me)
Definition ui_nix.qc:13
void XonoticMutatorNIXTab_fill(entity me)
Definition ui_nix.qc:25
entity makeXonoticMutatorNIXTab()
Definition ui_nix.qc:6
const string MENU_NIX_DESCRIPTION
Definition ui_nix.qh:4
entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
Definition checkbox.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
void XonoticCheckBox_saveCvars(entity me)
Definition checkbox.qc:73