From 26c064f2279d29d7f6b6bc2aa93677f14ef2661d Mon Sep 17 00:00:00 2001 From: otta8634 Date: Thu, 9 Jan 2025 00:19:56 +0800 Subject: [PATCH] Add Mutators to the guide Descriptions were based on https://gitlab.com/xonotic/xonotic/-/wikis/home for those which had an entry there. There are some "mutators" which would be nice to include in the guide like weaponarena and weaponstay, except they aren't actually implemented as Mutators in the code. Descriptions were added in mutatorname.qc under MENUQC, with the MENUQC-Mutator added in mutatorname.qh. It may be worthwhile considering renaming the MENUQC-Mutator to menu_mutatorname for clarity's sake, like how there's cl_mutatorname sometimes. The only refactoring included was in common/mutators/mutator/new_toys, relocating nt_IsNewToy from sv_new_toys.qc to new_toys.qc. --- .../mutators/mutator/bloodloss/bloodloss.qc | 9 +++++ .../mutators/mutator/bloodloss/bloodloss.qh | 8 ++++ .../common/mutators/mutator/cloaked/_mod.inc | 1 + qcsrc/common/mutators/mutator/cloaked/_mod.qh | 1 + .../mutators/mutator/cloaked/cloaked.qc | 13 +++++++ .../mutators/mutator/cloaked/cloaked.qh | 9 +++++ .../mutators/mutator/dodging/dodging.qc | 14 +++++++ .../mutators/mutator/dodging/dodging.qh | 8 ++++ qcsrc/common/mutators/mutator/hook/_mod.inc | 1 + qcsrc/common/mutators/mutator/hook/_mod.qh | 1 + qcsrc/common/mutators/mutator/hook/hook.qc | 16 ++++++++ qcsrc/common/mutators/mutator/hook/hook.qh | 9 +++++ .../common/mutators/mutator/instagib/_mod.inc | 1 + .../common/mutators/mutator/instagib/_mod.qh | 1 + .../mutators/mutator/instagib/instagib.qc | 26 +++++++++++++ .../mutators/mutator/instagib/instagib.qh | 9 +++++ qcsrc/common/mutators/mutator/nades/nades.qc | 16 ++++++++ qcsrc/common/mutators/mutator/nades/nades.qh | 8 ++++ .../common/mutators/mutator/new_toys/_mod.inc | 1 + .../common/mutators/mutator/new_toys/_mod.qh | 1 + .../mutators/mutator/new_toys/new_toys.qc | 38 +++++++++++++++++++ .../mutators/mutator/new_toys/new_toys.qh | 11 ++++++ .../mutators/mutator/new_toys/sv_new_toys.qc | 20 +--------- qcsrc/common/mutators/mutator/nix/_mod.inc | 1 + qcsrc/common/mutators/mutator/nix/_mod.qh | 1 + qcsrc/common/mutators/mutator/nix/nix.qc | 11 ++++++ qcsrc/common/mutators/mutator/nix/nix.qh | 9 +++++ .../mutators/mutator/offhand_blaster/_mod.inc | 1 + .../mutators/mutator/offhand_blaster/_mod.qh | 1 + .../offhand_blaster/offhand_blaster.qc | 16 ++++++++ .../offhand_blaster/offhand_blaster.qh | 9 +++++ .../common/mutators/mutator/overkill/okhmg.qc | 7 ++-- .../mutators/mutator/overkill/okmachinegun.qc | 7 ++-- .../common/mutators/mutator/overkill/oknex.qc | 9 +++-- .../common/mutators/mutator/overkill/okrpc.qc | 9 +++-- .../mutators/mutator/overkill/okshotgun.qc | 7 ++-- .../mutators/mutator/overkill/overkill.qc | 24 ++++++++++++ .../mutators/mutator/overkill/overkill.qh | 7 ++++ qcsrc/common/mutators/mutator/pinata/_mod.inc | 1 + qcsrc/common/mutators/mutator/pinata/_mod.qh | 1 + .../common/mutators/mutator/pinata/pinata.qc | 11 ++++++ .../common/mutators/mutator/pinata/pinata.qh | 9 +++++ .../mutators/mutator/rocketflying/_mod.inc | 1 + .../mutators/mutator/rocketflying/_mod.qh | 1 + .../mutator/rocketflying/rocketflying.qc | 13 +++++++ .../mutator/rocketflying/rocketflying.qh | 9 +++++ .../mutators/mutator/touchexplode/_mod.inc | 1 + .../mutators/mutator/touchexplode/_mod.qh | 1 + .../mutator/touchexplode/touchexplode.qc | 11 ++++++ .../mutator/touchexplode/touchexplode.qh | 9 +++++ .../common/mutators/mutator/vampire/_mod.inc | 1 + qcsrc/common/mutators/mutator/vampire/_mod.qh | 1 + .../mutators/mutator/vampire/vampire.qc | 14 +++++++ .../mutators/mutator/vampire/vampire.qh | 9 +++++ .../mutators/mutator/walljump/walljump.qc | 10 +++++ .../mutators/mutator/walljump/walljump.qh | 8 ++++ 56 files changed, 417 insertions(+), 35 deletions(-) create mode 100644 qcsrc/common/mutators/mutator/cloaked/cloaked.qc create mode 100644 qcsrc/common/mutators/mutator/cloaked/cloaked.qh create mode 100644 qcsrc/common/mutators/mutator/hook/hook.qc create mode 100644 qcsrc/common/mutators/mutator/hook/hook.qh create mode 100644 qcsrc/common/mutators/mutator/instagib/instagib.qc create mode 100644 qcsrc/common/mutators/mutator/instagib/instagib.qh create mode 100644 qcsrc/common/mutators/mutator/new_toys/new_toys.qc create mode 100644 qcsrc/common/mutators/mutator/new_toys/new_toys.qh create mode 100644 qcsrc/common/mutators/mutator/nix/nix.qc create mode 100644 qcsrc/common/mutators/mutator/nix/nix.qh create mode 100644 qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qc create mode 100644 qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qh create mode 100644 qcsrc/common/mutators/mutator/pinata/pinata.qc create mode 100644 qcsrc/common/mutators/mutator/pinata/pinata.qh create mode 100644 qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc create mode 100644 qcsrc/common/mutators/mutator/rocketflying/rocketflying.qh create mode 100644 qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc create mode 100644 qcsrc/common/mutators/mutator/touchexplode/touchexplode.qh create mode 100644 qcsrc/common/mutators/mutator/vampire/vampire.qc create mode 100644 qcsrc/common/mutators/mutator/vampire/vampire.qh diff --git a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc index 41ceaa91fa..cd68ee1946 100644 --- a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc +++ b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc @@ -68,3 +68,12 @@ MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump) #endif #endif +#ifdef MENUQC +METHOD(MutatorBloodLoss, describe, string(MutatorBloodLoss this)) +{ + TC(MutatorBloodLoss, this); + return sprintf(_("%s is a mutator in which players below a certain health threshold (for example 25) will suffer blood loss\n\n" + "Blood loss makes players stunned, severely impairs their movement, and rapidly takes away health points until they either die or gain enough health to go above the health threshold"), + COLORED_NAME(this)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh index 6f70f09bee..67a1eb7adf 100644 --- a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh +++ b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh @@ -1 +1,9 @@ #pragma once + +#ifdef MENUQC +CLASS(MutatorBloodLoss, Mutator) + ATTRIB(MutatorBloodLoss, m_name, string, _("Blood loss")); +ENDCLASS(MutatorBloodLoss) + +REGISTER_MUTATOR(bloodloss, true, MutatorBloodLoss); +#endif diff --git a/qcsrc/common/mutators/mutator/cloaked/_mod.inc b/qcsrc/common/mutators/mutator/cloaked/_mod.inc index 16df935947..d77f368025 100644 --- a/qcsrc/common/mutators/mutator/cloaked/_mod.inc +++ b/qcsrc/common/mutators/mutator/cloaked/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/cloaked/_mod.qh b/qcsrc/common/mutators/mutator/cloaked/_mod.qh index dce3c58e72..7e9f378832 100644 --- a/qcsrc/common/mutators/mutator/cloaked/_mod.qh +++ b/qcsrc/common/mutators/mutator/cloaked/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/cloaked/cloaked.qc b/qcsrc/common/mutators/mutator/cloaked/cloaked.qc new file mode 100644 index 0000000000..25910c4763 --- /dev/null +++ b/qcsrc/common/mutators/mutator/cloaked/cloaked.qc @@ -0,0 +1,13 @@ +#include "cloaked.qh" + +#ifdef MENUQC +#include + +METHOD(MutatorCloaked, describe, string(MutatorCloaked this)) +{ + TC(MutatorCloaked, this); + return sprintf(_("The %s mutator makes all players nearly invisible, similar to the %s powerup. " + "This adds an extra layer of stealth and strategy to gameplay"), + COLORED_NAME(this), COLORED_NAME(ITEM_Invisibility)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/cloaked/cloaked.qh b/qcsrc/common/mutators/mutator/cloaked/cloaked.qh new file mode 100644 index 0000000000..fddd5bf554 --- /dev/null +++ b/qcsrc/common/mutators/mutator/cloaked/cloaked.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorCloaked, Mutator) + ATTRIB(MutatorCloaked, m_name, string, _("Cloaked")); +ENDCLASS(MutatorCloaked) + +REGISTER_MUTATOR(cloaked, true, MutatorCloaked); +#endif diff --git a/qcsrc/common/mutators/mutator/dodging/dodging.qc b/qcsrc/common/mutators/mutator/dodging/dodging.qc index 9e7ea204f7..dac57b3123 100644 --- a/qcsrc/common/mutators/mutator/dodging/dodging.qc +++ b/qcsrc/common/mutators/mutator/dodging/dodging.qc @@ -1 +1,15 @@ #include "dodging.qh" + +#ifdef MENUQC +#include + +METHOD(MutatorDodging, describe, string(MutatorDodging this)) +{ + TC(MutatorDodging, this); + return sprintf(_("%s is a mutator that enables dodging maneuvers, making evading attacks in close combat easier. " + "If enabled, when you're standing on the ground and double tap a movement key, you will leap in that direction. " + "This also works while in contact with a wall, allowing quick speed gain if done repeatedly against a long wall\n\n" + "Some other mutators like %s enable this by default"), + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/dodging/dodging.qh b/qcsrc/common/mutators/mutator/dodging/dodging.qh index 6f70f09bee..6566973df9 100644 --- a/qcsrc/common/mutators/mutator/dodging/dodging.qh +++ b/qcsrc/common/mutators/mutator/dodging/dodging.qh @@ -1 +1,9 @@ #pragma once + +#ifdef MENUQC +CLASS(MutatorDodging, Mutator) + ATTRIB(MutatorDodging, m_name, string, _("Dodging")); +ENDCLASS(MutatorDodging) + +REGISTER_MUTATOR(dodging, true, MutatorDodging); +#endif diff --git a/qcsrc/common/mutators/mutator/hook/_mod.inc b/qcsrc/common/mutators/mutator/hook/_mod.inc index 7fe785b6f7..d290341088 100644 --- a/qcsrc/common/mutators/mutator/hook/_mod.inc +++ b/qcsrc/common/mutators/mutator/hook/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef CSQC #include #endif diff --git a/qcsrc/common/mutators/mutator/hook/_mod.qh b/qcsrc/common/mutators/mutator/hook/_mod.qh index df09201f51..3e006e56da 100644 --- a/qcsrc/common/mutators/mutator/hook/_mod.qh +++ b/qcsrc/common/mutators/mutator/hook/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef CSQC #include #endif diff --git a/qcsrc/common/mutators/mutator/hook/hook.qc b/qcsrc/common/mutators/mutator/hook/hook.qc new file mode 100644 index 0000000000..5180cf618a --- /dev/null +++ b/qcsrc/common/mutators/mutator/hook/hook.qc @@ -0,0 +1,16 @@ +#include "hook.qh" + +#ifdef MENUQC +#include +#include + +METHOD(MutatorGrapplingHook, describe, string(MutatorGrapplingHook this)) +{ + TC(MutatorGrapplingHook, this); + return sprintf(_("The %s mutator gives all players a %s as their offhand weapon, used with ^3+hook^7. " + "It has unlimited ammo, but the ordinary secondary fire can't be used\n\n" + "Since it's given as an offhand, players can use it to move around and shoot at their enemies at the same time, opening up more gameplay possibilities than the regular %s\n\n" + "Note that it is overridden by the %s mutator"), + COLORED_NAME(this), COLORED_NAME(WEP_HOOK), COLORED_NAME(WEP_HOOK), COLORED_NAME(MUTATOR_offhand_blaster)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/hook/hook.qh b/qcsrc/common/mutators/mutator/hook/hook.qh new file mode 100644 index 0000000000..07375629b8 --- /dev/null +++ b/qcsrc/common/mutators/mutator/hook/hook.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorGrapplingHook, Mutator) + ATTRIB(MutatorGrapplingHook, m_name, string, _("Hook")); +ENDCLASS(MutatorGrapplingHook) + +REGISTER_MUTATOR(hook, true, MutatorGrapplingHook); +#endif diff --git a/qcsrc/common/mutators/mutator/instagib/_mod.inc b/qcsrc/common/mutators/mutator/instagib/_mod.inc index d3ea3f2362..dc3443a0ed 100644 --- a/qcsrc/common/mutators/mutator/instagib/_mod.inc +++ b/qcsrc/common/mutators/mutator/instagib/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/instagib/_mod.qh b/qcsrc/common/mutators/mutator/instagib/_mod.qh index 10d0e4a5e6..8f97b03d6b 100644 --- a/qcsrc/common/mutators/mutator/instagib/_mod.qh +++ b/qcsrc/common/mutators/mutator/instagib/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc new file mode 100644 index 0000000000..aab5480c4a --- /dev/null +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -0,0 +1,26 @@ +#include "instagib.qh" + +#ifdef MENUQC +#include "items.qh" +#include +#include +#include +#include +#include + +METHOD(MutatorInstagib, describe, string(MutatorInstagib this)) +{ + TC(MutatorInstagib, this); + string s = sprintf(_("%s is a mutator that removes all weapons and weapon pickups and gives all players the %s, " + "which immediately frags players in a single shot, hence the name \"InstaGib\"\n\n" + "Precise aim and ammo conservation are important, since you will suicide after 10 seconds if you run out of ammo. " + "Ammo (%s) can be picked up on the map often, or collected from dropped %s guns\n\n"), + COLORED_NAME(this), COLORED_NAME(WEP_VAPORIZER), COLORED_NAME(ITEM_Cells), COLORED_NAME(WEP_VAPORIZER)); + s = strcat(s, sprintf(_("Maps often have an %s on them, which will save you from being fragged when picked up (total extra lives is displayed as armor). " + "Other powerups often present on maps include %s and %s\n\n" + "It is quite a common mutator present on many servers, mixing well with a lot of gamemodes but particularly %s. " + "Sometimes it's enabled alongside other mutators such as %s for added movement possibilities"), + COLORED_NAME(ITEM_ExtraLife), COLORED_NAME(ITEM_Speed), COLORED_NAME(ITEM_Invisibility), COLORED_NAME(MAPINFO_TYPE_DEATHMATCH), COLORED_NAME(MUTATOR_hook))); + return s; +} +#endif diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qh b/qcsrc/common/mutators/mutator/instagib/instagib.qh new file mode 100644 index 0000000000..04e05ffc7c --- /dev/null +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorInstagib, Mutator) + ATTRIB(MutatorInstagib, m_name, string, _("InstaGib")); +ENDCLASS(MutatorInstagib) + +REGISTER_MUTATOR(mutator_instagib, true, MutatorInstagib); +#endif diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index d65c2bd449..988284c5e8 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1803,3 +1803,19 @@ MUTATOR_HOOKFUNCTION(nades, BuildMutatorsString) } #endif +#ifdef MENUQC +#include +#include +#include + +METHOD(MutatorNades, describe, string(MutatorNades this)) +{ + TC(MutatorNades, this); + return sprintf(_("The %s mutator gives all players offhand nades that can be primed then thrown by pressing ^3drop weapon^7 twice. " + "If the %s and %s mutators are disabled, they can also be thrown by holding then releasing ^3+hook^7\n\n" + "There are multiple types of nades that can be selected, and many options available regarding this mutator, " + "so they may act a little differently depending on the server you play on\n\n" + "This mutator is enabled by default in %s"), + COLORED_NAME(this), COLORED_NAME(MUTATOR_offhand_blaster), COLORED_NAME(MUTATOR_hook), COLORED_NAME(MUTATOR_ok)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index d55551570d..8f5d8377b4 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -210,3 +210,11 @@ bool Projectile_isnade(int proj); // TODO: remove void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator #endif + +#ifdef MENUQC +CLASS(MutatorNades, Mutator) + ATTRIB(MutatorNades, m_name, string, _("Nades")); +ENDCLASS(MutatorNades) + +REGISTER_MUTATOR(nades, true, MutatorNades); +#endif diff --git a/qcsrc/common/mutators/mutator/new_toys/_mod.inc b/qcsrc/common/mutators/mutator/new_toys/_mod.inc index d32cd54af2..f00f9d5863 100644 --- a/qcsrc/common/mutators/mutator/new_toys/_mod.inc +++ b/qcsrc/common/mutators/mutator/new_toys/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/new_toys/_mod.qh b/qcsrc/common/mutators/mutator/new_toys/_mod.qh index f736088fd2..0704834ea7 100644 --- a/qcsrc/common/mutators/mutator/new_toys/_mod.qh +++ b/qcsrc/common/mutators/mutator/new_toys/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/new_toys/new_toys.qc b/qcsrc/common/mutators/mutator/new_toys/new_toys.qc new file mode 100644 index 0000000000..f7e815a03f --- /dev/null +++ b/qcsrc/common/mutators/mutator/new_toys/new_toys.qc @@ -0,0 +1,38 @@ +#include "new_toys.qh" + +#include + +// TODO: unhardcode this +bool nt_IsNewToy(int w) +{ + switch(w) + { + case WEP_SEEKER.m_id: + case WEP_MINE_LAYER.m_id: + case WEP_HLAC.m_id: + case WEP_RIFLE.m_id: + case WEP_SHOCKWAVE.m_id: + case WEP_ARC.m_id: + return true; + default: + return false; + } +} + +#ifdef MENUQC +#include +#include + +METHOD(MutatorNewToys, describe, string(MutatorNewToys this)) +{ + TC(MutatorNewToys, this); + string s = sprintf(_("The %s mutator, enabled by default, allows the spawning of new gimmicky weapons, sometimes replacing a core weapon\n\n" + "Since these weapons can't spawn in %s and %s, the %s mutator can't be enabled concurrently\n\n" + "The current %s weapons are:"), // do it like this so that the string doesn't need to change when the list is updated + COLORED_NAME(this), COLORED_NAME(MUTATOR_mutator_instagib), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this), COLORED_NAME(this)); + FOREACH(Weapons, nt_IsNewToy(it.m_id), { + s = strcat(s, "\n", COLORED_NAME(it)); + }); + return s; +} +#endif diff --git a/qcsrc/common/mutators/mutator/new_toys/new_toys.qh b/qcsrc/common/mutators/mutator/new_toys/new_toys.qh new file mode 100644 index 0000000000..0b773eeaea --- /dev/null +++ b/qcsrc/common/mutators/mutator/new_toys/new_toys.qh @@ -0,0 +1,11 @@ +#pragma once + +bool nt_IsNewToy(int w); + +#ifdef MENUQC +CLASS(MutatorNewToys, Mutator) + ATTRIB(MutatorNewToys, m_name, string, _("New Toys")); +ENDCLASS(MutatorNewToys) + +REGISTER_MUTATOR(nt, true, MutatorNewToys); +#endif diff --git a/qcsrc/common/mutators/mutator/new_toys/sv_new_toys.qc b/qcsrc/common/mutators/mutator/new_toys/sv_new_toys.qc index e2a5ea41a7..c081ee15fd 100644 --- a/qcsrc/common/mutators/mutator/new_toys/sv_new_toys.qc +++ b/qcsrc/common/mutators/mutator/new_toys/sv_new_toys.qc @@ -1,5 +1,7 @@ #include "sv_new_toys.qh" +#include "new_toys.qh" + #include "../random_items/sv_random_items.qh" #include @@ -73,8 +75,6 @@ roflsound "New toys, new toys!" sound. //string autocvar_g_new_toys; -bool nt_IsNewToy(int w); - REGISTER_MUTATOR(nt, expr_evaluate(cvar_string("g_new_toys")) && !MUTATOR_IS_ENABLED(mutator_instagib) && !MUTATOR_IS_ENABLED(ok)) { MUTATOR_ONADD @@ -114,22 +114,6 @@ const float NT_AUTOREPLACE_NEVER = 0; const float NT_AUTOREPLACE_ALWAYS = 1; const float NT_AUTOREPLACE_RANDOM = 2; -bool nt_IsNewToy(int w) -{ - switch(w) - { - case WEP_SEEKER.m_id: - case WEP_MINE_LAYER.m_id: - case WEP_HLAC.m_id: - case WEP_RIFLE.m_id: - case WEP_SHOCKWAVE.m_id: - case WEP_ARC.m_id: - return true; - default: - return false; - } -} - string nt_GetFullReplacement(string w) { switch(w) diff --git a/qcsrc/common/mutators/mutator/nix/_mod.inc b/qcsrc/common/mutators/mutator/nix/_mod.inc index c8e3a0a9b4..dea2ff33ac 100644 --- a/qcsrc/common/mutators/mutator/nix/_mod.inc +++ b/qcsrc/common/mutators/mutator/nix/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/nix/_mod.qh b/qcsrc/common/mutators/mutator/nix/_mod.qh index ee5012bfc6..22f5685584 100644 --- a/qcsrc/common/mutators/mutator/nix/_mod.qh +++ b/qcsrc/common/mutators/mutator/nix/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/nix/nix.qc b/qcsrc/common/mutators/mutator/nix/nix.qc new file mode 100644 index 0000000000..389535380c --- /dev/null +++ b/qcsrc/common/mutators/mutator/nix/nix.qc @@ -0,0 +1,11 @@ +#include "nix.qh" + +#ifdef MENUQC +METHOD(MutatorNIX, describe, string(MutatorNIX this)) +{ + TC(MutatorNIX, this); + return sprintf(_("%s (\"No Items Xonotic\") is a mutator that removes all weapon and ammo pickups from the map, and gives all players the same randomly selected weapon. " + "After some time, the weapon is reselected, and this repeats forever"), + COLORED_NAME(this)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/nix/nix.qh b/qcsrc/common/mutators/mutator/nix/nix.qh new file mode 100644 index 0000000000..2ef6d696b9 --- /dev/null +++ b/qcsrc/common/mutators/mutator/nix/nix.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorNIX, Mutator) + ATTRIB(MutatorNIX, m_name, string, _("NIX")); +ENDCLASS(MutatorNIX) + +REGISTER_MUTATOR(nix, true, MutatorNIX); +#endif diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/_mod.inc b/qcsrc/common/mutators/mutator/offhand_blaster/_mod.inc index feb7a3b7a1..5ea58c0ce7 100644 --- a/qcsrc/common/mutators/mutator/offhand_blaster/_mod.inc +++ b/qcsrc/common/mutators/mutator/offhand_blaster/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef CSQC #include #endif diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/_mod.qh b/qcsrc/common/mutators/mutator/offhand_blaster/_mod.qh index 5febcd4f64..5c82e05d69 100644 --- a/qcsrc/common/mutators/mutator/offhand_blaster/_mod.qh +++ b/qcsrc/common/mutators/mutator/offhand_blaster/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef CSQC #include #endif diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qc b/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qc new file mode 100644 index 0000000000..dd78f9beb9 --- /dev/null +++ b/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qc @@ -0,0 +1,16 @@ +#include "offhand_blaster.qh" + +#ifdef MENUQC +#include +#include + +METHOD(MutatorOffhandBlaster, describe, string(MutatorOffhandBlaster this)) +{ + TC(MutatorOffhandBlaster, this); + return sprintf(_("The %s mutator gives all players a %s as their offhand weapon, used with ^3+hook^7. " + "It can be fired at any time, but the ordinary secondary fire can't be used\n\n" + "Since it's given as an offhand, you can fire it at the same time as the ordinary %s while laser jumping to achieve even more height\n\n" + "Note that it overrides the %s mutator, since they use the same bind"), + COLORED_NAME(this), COLORED_NAME(WEP_BLASTER), COLORED_NAME(WEP_BLASTER), COLORED_NAME(MUTATOR_hook)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qh b/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qh new file mode 100644 index 0000000000..d5fc81740f --- /dev/null +++ b/qcsrc/common/mutators/mutator/offhand_blaster/offhand_blaster.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorOffhandBlaster, Mutator) + ATTRIB(MutatorOffhandBlaster, m_name, string, _("Offhand blaster")); +ENDCLASS(MutatorOffhandBlaster) + +REGISTER_MUTATOR(offhand_blaster, true, MutatorOffhandBlaster); +#endif diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index a35864da7e..1469cb059b 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -157,19 +157,20 @@ METHOD(OverkillHeavyMachineGun, wr_impacteffect, void(entity thiswep, entity act #endif #ifdef MENUQC #include +#include #include "okmachinegun.qh" METHOD(OverkillHeavyMachineGun, describe, string(OverkillHeavyMachineGun this)) { TC(OverkillHeavyMachineGun, this); return sprintf(_("The %s is a superweapon that rapidly fires harmful bullets with a small degree of spread\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "Like with all %s weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" "It is a superweapon found on some maps, meaning that it breaks down after some time\n\n" - "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in %s. " "It has a limited magazine size, so needs reloading after several shots\n\n" "The %s can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously\n\n" "Since its bullets deal a lot more damage than the %s's bullets, it is often heavily contested when it spawns in"), - COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(this), COLORED_NAME(WEP_OVERKILL_MACHINEGUN)); + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok), COLORED_NAME(ITEM_Bullets), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this), COLORED_NAME(WEP_OVERKILL_MACHINEGUN)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc index 53da43bf03..e268e8592c 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc @@ -157,16 +157,17 @@ METHOD(OverkillMachineGun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC #include +#include METHOD(OverkillMachineGun, describe, string(OverkillMachineGun this)) { TC(OverkillMachineGun, this); return sprintf(_("The %s quickly fires bullets with a small degree of spread\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "Like with all %s weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in %s. " "It has a limited magazine size, so needs reloading after several shots\n\n" "The %s can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously"), - COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(this)); + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok), COLORED_NAME(ITEM_Bullets), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc index 1a567aaa21..89c23be1ea 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qc +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qc @@ -364,16 +364,17 @@ METHOD(OverkillNex, wr_zoomdir, bool(entity thiswep)) #endif #ifdef MENUQC #include +#include METHOD(OverkillNex, describe, string(OverkillNex this)) { TC(OverkillNex, this); return sprintf(_("The %s fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "Like with all %s weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in %s. " "It has a limited magazine size, so needs reloading after several shots\n\n" - "Since it is the only Overkill weapon with no spread, the %s stands out at long ranges"), - COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(this)); + "Since it is the only %s weapon with no spread, the %s stands out at long ranges"), + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok), COLORED_NAME(ITEM_Cells), COLORED_NAME(MUTATOR_ok), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qc b/qcsrc/common/mutators/mutator/overkill/okrpc.qc index 06767cdf4c..dad56d1b4d 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qc @@ -233,16 +233,17 @@ METHOD(OverkillRocketPropelledChainsaw, wr_impacteffect, void(entity thiswep, en #endif #ifdef MENUQC #include +#include METHOD(OverkillRocketPropelledChainsaw, describe, string(OverkillRocketPropelledChainsaw this)) { TC(OverkillRocketPropelledChainsaw, this); return sprintf(_("As the name suggests, the %s is a superweapon that fires a rocket propelled chainsaw which explodes on impact, dealing a lot of splash damage to any players close by\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "Like with all %s weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" "It is a superweapon found on some maps, meaning that it breaks down after some time\n\n" - "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill\n\n" - "Since it is the only Overkill weapon which deals splash damage, the %s is a good choice of weapon for attacking groups of enemies"), - COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in %s\n\n" + "Since it is the only %s weapon which deals splash damage, the %s is a good choice of weapon for attacking groups of enemies"), + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok), COLORED_NAME(ITEM_Rockets), COLORED_NAME(MUTATOR_ok), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc index 405cfadd3f..22dfa1ed82 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc @@ -122,16 +122,17 @@ METHOD(OverkillShotgun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC #include +#include METHOD(OverkillShotgun, describe, string(OverkillShotgun this)) { TC(OverkillShotgun, this); return sprintf(_("The %s fires a single shotgun round which spreads into multiple pellets upon exiting the barrel, dealing a deadly blow if up close\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "Like with all %s weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in %s. " "It has a limited magazine size, so needs reloading after several shots\n\n" "The %s's damage drops off quickly as the range increases, so it is only useful for close combat or sometimes medium range combat"), - COLORED_NAME(this), COLORED_NAME(ITEM_Shells), COLORED_NAME(this)); + COLORED_NAME(this), COLORED_NAME(MUTATOR_ok), COLORED_NAME(ITEM_Shells), COLORED_NAME(MUTATOR_ok), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qc b/qcsrc/common/mutators/mutator/overkill/overkill.qc index 3cb64ce923..f761ebefe7 100644 --- a/qcsrc/common/mutators/mutator/overkill/overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qc @@ -1 +1,25 @@ #include "overkill.qh" + +#ifdef MENUQC +#include "okhmg.qh" +#include "oknex.qh" +#include "okmachinegun.qh" +#include "okrpc.qh" +#include "okshotgun.qh" +#include +#include + +METHOD(MutatorOverkill, describe, string(MutatorOverkill this)) +{ + TC(MutatorOverkill, this); + string s = sprintf(_("%s is a mutator that heavily modifies the game, giving players fewer but more powerful weapons, nades, and more movement options\n\n" + "In terms of weaponry, players have infinite ammo and spawn in with the %s, %s, and %s, and can pick up the %s and %s superweapons on the map sometimes. " + "These weapons are a lot more powerful than the regular weapons, so their time-to-kill is quite low\n\n" + "The secondary fire of all weapons shoots a laser which does not damage or push enemies, but can be used to push yourself around. "), + COLORED_NAME(this), COLORED_NAME(WEP_OVERKILL_SHOTGUN), COLORED_NAME(WEP_OVERKILL_MACHINEGUN), COLORED_NAME(WEP_OVERKILL_NEX), COLORED_NAME(WEP_OVERKILL_HMG), COLORED_NAME(WEP_OVERKILL_RPC)); + s = strcat(s, sprintf(_("Also since the %s mutator is active, all players have offhand nades\n\n" + "As for movement tricks, %s is enabled by default in %s, allowing for rapidly changing your movement direction"), + COLORED_NAME(MUTATOR_nades), COLORED_NAME(MUTATOR_dodging), COLORED_NAME(this))); + return s; +} +#endif diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qh b/qcsrc/common/mutators/mutator/overkill/overkill.qh index 3f59c932d3..82931a2b0c 100644 --- a/qcsrc/common/mutators/mutator/overkill/overkill.qh +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qh @@ -1,2 +1,9 @@ #pragma once +#ifdef MENUQC +CLASS(MutatorOverkill, Mutator) + ATTRIB(MutatorOverkill, m_name, string, _("Overkill")); +ENDCLASS(MutatorOverkill) + +REGISTER_MUTATOR(ok, true, MutatorOverkill); +#endif diff --git a/qcsrc/common/mutators/mutator/pinata/_mod.inc b/qcsrc/common/mutators/mutator/pinata/_mod.inc index 49eeb71370..7a253091a0 100644 --- a/qcsrc/common/mutators/mutator/pinata/_mod.inc +++ b/qcsrc/common/mutators/mutator/pinata/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/pinata/_mod.qh b/qcsrc/common/mutators/mutator/pinata/_mod.qh index 42249994c6..ad1adee1b7 100644 --- a/qcsrc/common/mutators/mutator/pinata/_mod.qh +++ b/qcsrc/common/mutators/mutator/pinata/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/pinata/pinata.qc b/qcsrc/common/mutators/mutator/pinata/pinata.qc new file mode 100644 index 0000000000..b02c7e50d3 --- /dev/null +++ b/qcsrc/common/mutators/mutator/pinata/pinata.qc @@ -0,0 +1,11 @@ +#include "pinata.qh" + +#ifdef MENUQC +METHOD(MutatorPinata, describe, string(MutatorPinata this)) +{ + TC(MutatorPinata, this); + return sprintf(_("%s is a mutator that makes players drop all their weapons when they die. " + "Without this mutator, players normally drop only their equipped weapon"), + COLORED_NAME(this)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/pinata/pinata.qh b/qcsrc/common/mutators/mutator/pinata/pinata.qh new file mode 100644 index 0000000000..9ecdc92dc0 --- /dev/null +++ b/qcsrc/common/mutators/mutator/pinata/pinata.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorPinata, Mutator) + ATTRIB(MutatorPinata, m_name, string, _("Piñata")); +ENDCLASS(MutatorPinata) + +REGISTER_MUTATOR(pinata, true, MutatorPinata); +#endif diff --git a/qcsrc/common/mutators/mutator/rocketflying/_mod.inc b/qcsrc/common/mutators/mutator/rocketflying/_mod.inc index c3aa87c52a..e0f90c5cb1 100644 --- a/qcsrc/common/mutators/mutator/rocketflying/_mod.inc +++ b/qcsrc/common/mutators/mutator/rocketflying/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/rocketflying/_mod.qh b/qcsrc/common/mutators/mutator/rocketflying/_mod.qh index b76f84ec3c..62c87c21db 100644 --- a/qcsrc/common/mutators/mutator/rocketflying/_mod.qh +++ b/qcsrc/common/mutators/mutator/rocketflying/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc b/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc new file mode 100644 index 0000000000..d17f2de587 --- /dev/null +++ b/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qc @@ -0,0 +1,13 @@ +#include "rocketflying.qh" + +#ifdef MENUQC +#include + +METHOD(MutatorRocketFlying, describe, string(MutatorRocketFlying this)) +{ + TC(MutatorRocketFlying, this); + return sprintf(_("The %s mutator removes the slight delay when immediately detonating a %s rocket after firing. " + "This allows for rockets fired to be detonated much closer to your hitbox, so they can give you a much larger speed boost, also allowing flying around the map"), + COLORED_NAME(this), COLORED_NAME(WEP_DEVASTATOR)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qh b/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qh new file mode 100644 index 0000000000..d397987db2 --- /dev/null +++ b/qcsrc/common/mutators/mutator/rocketflying/rocketflying.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorRocketFlying, Mutator) + ATTRIB(MutatorRocketFlying, m_name, string, _("Rocket Flying")); +ENDCLASS(MutatorRocketFlying) + +REGISTER_MUTATOR(rocketflying, true, MutatorRocketFlying); +#endif diff --git a/qcsrc/common/mutators/mutator/touchexplode/_mod.inc b/qcsrc/common/mutators/mutator/touchexplode/_mod.inc index 1e871f9889..8e7d2d1799 100644 --- a/qcsrc/common/mutators/mutator/touchexplode/_mod.inc +++ b/qcsrc/common/mutators/mutator/touchexplode/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/touchexplode/_mod.qh b/qcsrc/common/mutators/mutator/touchexplode/_mod.qh index f6aa9f1772..13844a4a5c 100644 --- a/qcsrc/common/mutators/mutator/touchexplode/_mod.qh +++ b/qcsrc/common/mutators/mutator/touchexplode/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc new file mode 100644 index 0000000000..54c08989ed --- /dev/null +++ b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc @@ -0,0 +1,11 @@ +#include "touchexplode.qh" + +#ifdef MENUQC +METHOD(MutatorTouchExplode, describe, string(MutatorTouchExplode this)) +{ + TC(MutatorTouchExplode, this); + return sprintf(_("The %s mutator causes an explosion when two players collide if it is enabled\n\n" + "This is a nice way to add some silly fun to a server, but it also does allow for the use of new tactics in some gamemodes"), + COLORED_NAME(this)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qh b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qh new file mode 100644 index 0000000000..e0e6ae8dc2 --- /dev/null +++ b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorTouchExplode, Mutator) + ATTRIB(MutatorTouchExplode, m_name, string, _("Touch explode")); +ENDCLASS(MutatorTouchExplode) + +REGISTER_MUTATOR(touchexplode, true, MutatorTouchExplode); +#endif diff --git a/qcsrc/common/mutators/mutator/vampire/_mod.inc b/qcsrc/common/mutators/mutator/vampire/_mod.inc index 3c24ef0732..8892178050 100644 --- a/qcsrc/common/mutators/mutator/vampire/_mod.inc +++ b/qcsrc/common/mutators/mutator/vampire/_mod.inc @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/vampire/_mod.qh b/qcsrc/common/mutators/mutator/vampire/_mod.qh index 33e8b43bc6..47afd39685 100644 --- a/qcsrc/common/mutators/mutator/vampire/_mod.qh +++ b/qcsrc/common/mutators/mutator/vampire/_mod.qh @@ -1,4 +1,5 @@ // genmod.sh autogenerated file; do not modify +#include #ifdef SVQC #include #endif diff --git a/qcsrc/common/mutators/mutator/vampire/vampire.qc b/qcsrc/common/mutators/mutator/vampire/vampire.qc new file mode 100644 index 0000000000..47760dcdd3 --- /dev/null +++ b/qcsrc/common/mutators/mutator/vampire/vampire.qc @@ -0,0 +1,14 @@ +#include "vampire.qh" + +#ifdef MENUQC +#include + +METHOD(MutatorVampire, describe, string(MutatorVampire this)) +{ + TC(MutatorVampire, this); + return sprintf(_("The %s mutator gives all players a permanent version of the %s. " + "However, unlike the normal %s, when this mutator is enabled players' health can go way above the usual limit of 200\n\n" + "Additionally the amount of health players get is equal to the damage they deal, which isn't normaly the case with the %s"), + COLORED_NAME(this), COLORED_NAME_WITH_CONCAT(BUFF_VAMPIRE, _("Buff")), COLORED_NAME_WITH_CONCAT(BUFF_VAMPIRE, _("Buff")), COLORED_NAME_WITH_CONCAT(BUFF_VAMPIRE, _("Buff"))); +} +#endif diff --git a/qcsrc/common/mutators/mutator/vampire/vampire.qh b/qcsrc/common/mutators/mutator/vampire/vampire.qh new file mode 100644 index 0000000000..63a2479e87 --- /dev/null +++ b/qcsrc/common/mutators/mutator/vampire/vampire.qh @@ -0,0 +1,9 @@ +#pragma once + +#ifdef MENUQC +CLASS(MutatorVampire, Mutator) + ATTRIB(MutatorVampire, m_name, string, _("Vampire")); +ENDCLASS(MutatorVampire) + +REGISTER_MUTATOR(vampire, true, MutatorVampire); +#endif diff --git a/qcsrc/common/mutators/mutator/walljump/walljump.qc b/qcsrc/common/mutators/mutator/walljump/walljump.qc index 519159d917..7eef1306fc 100644 --- a/qcsrc/common/mutators/mutator/walljump/walljump.qc +++ b/qcsrc/common/mutators/mutator/walljump/walljump.qc @@ -73,3 +73,13 @@ MUTATOR_HOOKFUNCTION(walljump, PlayerJump) } #endif +#ifdef MENUQC +METHOD(MutatorWallJump, describe, string(MutatorWallJump this)) +{ + TC(MutatorWallJump, this); + return sprintf(_("%s is a mutator that enables jumping off walls for added mobility. " + "To do a wall jump, tap ^3+jump^7 when against a wall\n\n" + "This mutator adds a bit of versatility, allowing for more dynamic and unpredictable movement"), + COLORED_NAME(this)); +} +#endif diff --git a/qcsrc/common/mutators/mutator/walljump/walljump.qh b/qcsrc/common/mutators/mutator/walljump/walljump.qh index 6f70f09bee..7862fa19f9 100644 --- a/qcsrc/common/mutators/mutator/walljump/walljump.qh +++ b/qcsrc/common/mutators/mutator/walljump/walljump.qh @@ -1 +1,9 @@ #pragma once + +#ifdef MENUQC +CLASS(MutatorWallJump, Mutator) + ATTRIB(MutatorWallJump, m_name, string, _("Wall jumping")); +ENDCLASS(MutatorWallJump) + +REGISTER_MUTATOR(walljump, true, MutatorWallJump); +#endif -- 2.39.5