15#ifdef MENU_INCLUDE_OVERKILL
39 me.disabled = !me.parent.canEnable(me.parent,
false);
44 me.(toggleableItems[me.toggleableItemsCount++]) = e;
49 me.disabled = !me.parent.canEnable(me.parent,
false);
54 me.(toggleableItems[me.toggleableItemsCount++]) = e;
58 me.disabled = !me.parent.canEnable(me.parent,
false);
63 me.(toggleableItems[me.toggleableItemsCount++]) = e;
72 case "off":
case "":
case "0":
73 case "standard":
case "standard_available":
74 case "most":
case "most_available":
75 case "extended":
case "extended_available":
76 case "all":
case "all_available":
case "1":
77 case "devall":
case "devall_available":
88 me.configureXonoticWeaponarenaCheckBox(me, theWeapon, theText);
94 me.message = theWeapon;
97 me.configureCheckBox(me, theText, me.fontSize, me.image);
103 for (
int i = 0; i < n; ++i)
104 if (
argv(i) == me.message)
118 mwa =
cons(mwa, me.message);
125 for (
int i = 0; i < n; ++i)
141 for (
int i = 0; i < me.parent.toggleableItemsCount; ++i)
143 e = me.parent.(toggleableItems[i]);
150 me.checked = (
cvar_string(
"menu_weaponstartoverride") ==
"-1"
152 && !
cvar(
"g_instagib") && !
cvar(
"g_nix") && !
cvar(
"g_melee_only") && !
cvar(
"g_overkill"));
157 for (
entity e = me.parent.firstChild; e; e = e.nextSibling)
158 if (e.classname ==
"XonoticWeaponarenaCheckBox")
159 e.disabled = !me.checked;
178 me.configureDialog(me);
207 e.cvarOffValue =
"0";
211 e.cvarOffValue =
"0";
214 me.TD(me, 1, 4, e =
makeXonoticRadioButton(1, me.message,
"extended", _(
"Extended weapons (includes New Toys)")));
215 e.cvarOffValue =
"0";
219 e.cvarOffValue =
"0";
243 multi =
cons(multi,
strcat(
"g_balance_", it.netname,
"_weaponstartoverride")));
245 me.TD(me, 1, 4 - 0.2, e =
makeXonoticRadioButton_T(1,
"menu_weaponstartoverride",
"0", _(
"No start weapons"),
"-"));
246 e.cvarOffValue =
"-1";
251#ifdef MENU_INCLUDE_OVERKILL
252 me.TD(me, 1, (4 - 0.2) / 2, e =
makeXonoticRadioButton_T(1,
"g_overkill",
"1", MENU_OVERKILL_NAME, sprintf(MENU_OVERKILL_DESCRIPTION,
UNCOLORED_NAME(WEP_BLASTER),
UNCOLORED_NAME(MUTATOR_dodging),
UNCOLORED_NAME(MUTATOR_nades))));
253 e.cvarOffValue =
"0";
254 me.TD(me, 1, (4 - 0.2) / 2,
256 me.TD(me, 1, 4 - 0.2,
259 sprintf(_(
"Players spawn with no ammo and no weapons except the %s, so can only slap other players."),
UNCOLORED_NAME(WEP_SHOTGUN))));
260 e.cvarOffValue =
"0";
264 e.cvarOffValue =
"0";
266 e.cvarOffValue =
"0";
271 return _(
"Players will be given a set of weapons on spawn along with unlimited ammo, without weapon pickups on the map.");
275 bool can_enable =
true;
278 if (is_already_enabled)
279 return can_enable && (!
cvar(
"menu_weaponstartoverride") ||
cvar(
"g_melee_only")
289 me.configureDialog(me);
300 me.TD(me, 1, 4 * 0.55, e =
makeXonoticRadioButton(1, me.message,
"1", _(
"Enabled but pickups give no ammo")));
308 return _(
"Weapons stay on the map after they are picked up.");
313 bool can_enable = (!
cvar(
"g_instagib") && !
cvar(
"g_nix") && !
cvar(
"g_melee_only") && !
cvar(
"g_overkill")
315 if (is_already_enabled)
325 me.configureDialog(me);
335 me.TD(me, 1, 4 - 0.2, e =
makeXonoticCheckBox(0,
"g_offhand_blaster", _(
"Offhand Blaster")));
343 me.TD(me, 1, 4 - 0.2, e =
makeXonoticCheckBox(0,
"g_grappling_hook_useammo", _(
"Consume ammo")));
348 return sprintf(_(
"Players spawn with an Offhand Blaster or Grappling Hook. Press %s to use it."),
strcat(
"^3", _(
"hook"),
"^7"));
352 bool can_enable =
true;
353 if (is_already_enabled)
354 return can_enable && (
cvar(
"g_offhand_blaster") ||
cvar(
"g_grappling_hook"));
363 me.configureDialog(me);
374 return sprintf(_(
"Players spawn with the %s. Double-tap %s or press %s to use it."),
COLORED_NAME(ITEM_Jetpack),
strcat(
"^3", _(
"jump"),
"^7"),
strcat(
"^3", _(
"jetpack"),
"^7"));
378 bool can_enable =
true;
379 if (is_already_enabled)
389 me.configureDialog(me);
400 _(
"Enable dodging (quick acceleration in a given direction). Double-tap a directional key to dodge")));
406 _(
"How many times players can jump while midair")));
407 e.addText(e, _(
"Infinite"), -1);
408 e.addRange(e, 0, 10, 1);
409 e.configureXonoticMixedSliderValues(e);
413 _(
"Add on, rather than set, their vertical velocity each time the player jumps")));
418 _(
"Jump away from walls when running alongside them")));
423 e.formatString =
"S";
424 e.setValueSpace(e, e.valueSpace * 1.25);
429 _(
"Gain extra height when jumping again shortly after the first jump")));
435 _(
"Make things fall to the ground slower (percentage of normal gravity)"));
437 s.valueDisplayMultiplier = 1 / def_grav;
438 s.formatString =
"%";
440 e.savedValue = def_grav * 0.25;
446 _(
"Knockback experienced by any player affects all players")));
451 return _(
"Various fun changes to physics and movement.");
455 bool can_enable =
true;
456 if (is_already_enabled)
457 return can_enable && (
cvar(
"g_dodging") ||
cvar(
"g_multijump") ||
cvar(
"g_walljump") ||
cvar(
"sv_doublejump")
entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
#define UNCOLORED_NAME(this)
#define FOREACH(list, cond, body)
void Mutators_add_SliderCheckBox(entity me, entity e)
void XonoticMutatorOffhandWeaponsTab_fill(entity me)
entity Mutators_main_checkbox(entity me)
entity makeXonoticMutatorCustomPhysicsTab()
entity makeXonoticMutatorOffhandWeaponsTab()
void Mutators_add_CheckBox(entity me, entity e)
void XonoticMutatorJetpackTab_fill(entity me)
bool Weaponarena_nonCustomValue(string val)
void XonoticMutatorWeaponStayTab_fill(entity me)
void Mutators_add_RadioButton(entity me, entity e)
void MutatorWeaponArenaDisable_RadioButton_loadCvars(entity me)
void MutatorWeaponArenaCustom_RadioButton_saveCvars(entity me)
void XonoticMutatorTab_showNotify(entity me)
void XonoticMutatorWeaponArenaTab_fill(entity me)
void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox(entity me, string theWeapon, string theText)
entity makeXonoticMutatorWeaponArenaTab()
void MutatorWeaponArenaCustom_RadioButton_updateCheckBoxes(entity me)
entity makeXonoticMutatorWeaponStayTab()
void XonoticMutatorCustomPhysicsTab_fill(entity me)
void XonoticWeaponarenaCheckBox_loadCvars(entity me)
entity makeXonoticWeaponarenaCheckBox(string theWeapon, string theText)
void Mutators_toggleable_SliderCheckBox_loadCvars(entity me)
entity makeXonoticMutatorJetpackTab()
void Mutators_toggleable_CheckBox_loadCvars(entity me)
void XonoticWeaponarenaCheckBox_saveCvars(entity me)
void Mutators_toggleable_RadioButton_loadCvars(entity me)
void MutatorWeaponArenaCustom_RadioButton_loadCvars(entity me)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define METHOD(cname, name, prototype)
ERASEABLE string cons(string a, string b)
entity makeXonoticTextLabel(float theAlign, string theText)
const string MENU_INSTAGIB_DESCRIPTION
const string MENU_INSTAGIB_NAME
const string MENU_NIX_NAME
const string MENU_NIX_DESCRIPTION
const int WEP_FLAG_HIDDEN
hides from menu
entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
void XonoticCheckBox_loadCvars(entity me)
entity makeXonoticMixedSlider_T(string theCvar, string theTooltip)
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)