Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_instagib.qc
Go to the documentation of this file.
1#include "ui_instagib.qh"
2
6
8{
10 me.configureDialog(me);
11 return me;
12}
13
15{
17 if (cvar("g_instagib"))
18 {
19 if (cvar_string("g_weaponarena") != "0")
20 cvar_set("g_weaponarena", "0"); // weaponarena can't be enabled if InstaGib is
21 if (cvar("g_melee_only"))
22 cvar_set("g_melee_only", "0");
23 if (cvar("g_overkill"))
24 cvar_set("g_overkill", "0");
25 if (cvar("g_nix"))
26 cvar_set("g_nix", "0");
27 }
28}
29
31{
34
35 me.TR(me);
36 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Starting ammo:")));
37 me.TD(me, 1, 2, e = makeXonoticSlider(1, 30, 1, "g_instagib_ammo_start"));
38 me.TR(me);
39 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Ammo from weapons and cells:")));
40 me.TD(me, 1, 2, e = makeXonoticSlider(0, 20, 1, "g_instagib_ammo_drop"));
41
42 me.TR(me);
43 me.TR(me);
44 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Extra lives per pickup:")));
45 setDependentNOT(e, "g_powerups", 0);
46 me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 3, 1, "g_instagib_extralives",
47 _("How many extra lives to reward a player when they pick up the Extra life")));
48 setDependentNOT(e, "g_powerups", 0);
49
50 me.TR(me);
51 me.TR(me);
52 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "g_instagib_blaster_keepdamage", _("Keep Blaster damage")));
53 setDependent(e, "g_rm", 0, 0);
54 me.TR(me);
55 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "g_instagib_blaster_keepforce", _("Keep Blaster force")));
56 setDependent(e, "g_rm", 0, 0);
57
58 me.TR(me);
59 me.TR(me);
60 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "g_instagib_allow_jetpacks", _("Allow Jetpacks and Fuel regenerators")));
61 setDependentNOT(e, "g_powerups", 0);
62
63 me.TR(me);
64 me.TR(me);
65 me.TD(me, 1, 4, e = makeXonoticCheckBox_T(0, "g_rm", _("Enable Rocketminsta"),
66 _("The primary fire also explodes on impact, and the secondary fire shoots laser prongs")));
67}
68
70
72{
73 return sprintf(MENU_INSTAGIB_DESCRIPTION, COLORED_NAME(WEP_VAPORIZER));
74}
76{
77 bool can_enable = true;
78 if (is_already_enabled)
79 return can_enable && cvar(me.message);
80 return can_enable;
81}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:189
void setDependentNOT(entity e, string theCvarName, float theCvarValue)
Definition util.qc:192
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:180
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
entity makeXonoticMutatorInstaGibTab()
Definition ui_instagib.qc:7
void MutatorInstaGib_CheckBox_saveCvars(entity me)
void XonoticMutatorInstaGibTab_fill(entity me)
const string MENU_INSTAGIB_DESCRIPTION
Definition ui_instagib.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
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
Definition slider.qc:3
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition slider.qc:9