ATTRIB(AmmoNade, m_color, vector, '0.66 0.33 0');
ATTRIB(AmmoNade, m_name, string, _("Ammo grenade"));
ATTRIB(AmmoNade, m_icon, string, "nade_ammo");
+#ifdef MENUQC
+ METHOD(AmmoNade, describe, string(AmmoNade this))
+ {
+ TC(AmmoNade, this);
+ return sprintf(_("The %s detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. "
+ "If your team members enter the orb they will recover ammo, and if enemies enter the sphere they will lose ammo\n\n"
+ "This does not impact weapon magazines, so it won't reload your weapons for you"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(AmmoNade, netname, string, "ammo");
+ ATTRIB(AmmoNade, impulse, int, 10);
ENDCLASS(AmmoNade)
ATTRIB(DarknessNade, m_color, vector, '0.23 0 0.23');
ATTRIB(DarknessNade, m_name, string, _("Darkness grenade"));
ATTRIB(DarknessNade, m_icon, string, "nade_darkness");
+#ifdef MENUQC
+ METHOD(DarknessNade, describe, string(DarknessNade this))
+ {
+ TC(DarknessNade, this);
+ return sprintf(_("The %s detonates after a short delay, creating a dark field which temporarily blinds enemies who enter it"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(DarknessNade, netname, string, "darkness");
+ ATTRIB(DarknessNade, impulse, int, 11);
ENDCLASS(DarknessNade)
ATTRIB(EntrapNade, m_color, vector, '0.15 0.85 0');
ATTRIB(EntrapNade, m_name, string, _("Entrap grenade"));
ATTRIB(EntrapNade, m_icon, string, "nade_entrap");
+#ifdef MENUQC
+ METHOD(EntrapNade, describe, string(EntrapNade this))
+ {
+ TC(EntrapNade, this);
+ return sprintf(_("The %s detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. "
+ "Players and projectiles that enter the sphere will be slowed down, including yourself"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(EntrapNade, netname, string, "entrap");
+ ATTRIB(EntrapNade, impulse, int, 8);
ENDCLASS(EntrapNade)
ATTRIB(HealNade, m_color, vector, '1 0 0');
ATTRIB(HealNade, m_name, string, _("Heal grenade"));
ATTRIB(HealNade, m_icon, string, "nade_heal");
+#ifdef MENUQC
+ METHOD(HealNade, describe, string(HealNade this))
+ {
+ TC(HealNade, this);
+ return sprintf(_("The %s detonates after a short delay, temporarily creating a healing orb around the point where it detonated for several seconds. "
+ "If your team members enter the orb they will recover health, and if enemies enter the sphere they will be harmed"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(HealNade, netname, string, "heal");
+ ATTRIB(HealNade, impulse, int, 6);
ENDCLASS(HealNade)
ATTRIB(IceNade, m_color, vector, '0 0.5 2');
ATTRIB(IceNade, m_name, string, _("Ice grenade"));
ATTRIB(IceNade, m_icon, string, "nade_ice");
+#ifdef MENUQC
+ METHOD(IceNade, describe, string(IceNade this))
+ {
+ TC(IceNade, this);
+ return sprintf(_("The %s detonates after a short delay, freezing any enemies who walk within the explosion radius for a few seconds after the explosion. "
+ "While frozen, enemies are progressively dealt damage"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(IceNade, netname, string, "ice");
+ ATTRIB(IceNade, impulse, int, 3);
ENDCLASS(IceNade)
ATTRIB(MonsterNade, m_color, vector, '0.25 0.75 0');
ATTRIB(MonsterNade, m_name, string, _("Monster grenade"));
ATTRIB(MonsterNade, m_icon, string, "nade_monster");
+#ifdef MENUQC
+ METHOD(MonsterNade, describe, string(MonsterNade this))
+ {
+ TC(MonsterNade, this);
+ return sprintf(_("The %s explodes after a short delay, spawning one of four monster types"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(MonsterNade, netname, string, "pokenade"); // TODO: "monster"? nade needs renaming!
+ ATTRIB(MonsterNade, impulse, int, 7);
ENDCLASS(MonsterNade)
ATTRIB(NapalmNade, m_color, vector, '2 0.5 0');
ATTRIB(NapalmNade, m_name, string, _("Napalm grenade"));
ATTRIB(NapalmNade, m_icon, string, "nade_napalm");
+#ifdef MENUQC
+ METHOD(NapalmNade, describe, string(NapalmNade this))
+ {
+ TC(NapalmNade, this);
+ return sprintf(_("The %s explodes after a short delay, spreading fiery napalm globs around in the fountain. "
+ "The napalm fire balls burn for a while, and damage players who get too close"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(NapalmNade, netname, string, "napalm");
+ ATTRIB(NapalmNade, impulse, int, 2);
ENDCLASS(NapalmNade)
ATTRIB(NormalNade, m_color, vector, '1 1 1');
ATTRIB(NormalNade, m_name, string, _("Grenade"));
ATTRIB(NormalNade, m_icon, string, "nade_normal");
+#ifdef MENUQC
+ METHOD(NormalNade, describe, string(NormalNade this))
+ {
+ TC(NormalNade, this);
+ return sprintf(_("The (normal) %s explodes after a short delay, dealing damage to nearby players\n\n"
+ "Make sure you remember to throw it with ^3drop weapon^7, or else it will blow up in your hands!"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(NormalNade, impulse, int, 1);
+ ATTRIB(NormalNade, netname, string, "normal");
ENDCLASS(NormalNade)
ATTRIB(SpawnNade, m_color, vector, '1 0.9 0');
ATTRIB(SpawnNade, m_name, string, _("Spawn grenade"));
ATTRIB(SpawnNade, m_icon, string, "nade_spawn");
+#ifdef MENUQC
+ METHOD(SpawnNade, describe, string(SpawnNade this))
+ {
+ TC(SpawnNade, this);
+ return sprintf(_("The %s detonates after a short delay, temporarily setting your spawn point to where it detonated. "
+ "It is useful for cases where you want to go back to some point on the map after you die"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(SpawnNade, netname, string, "spawn");
+ ATTRIB(SpawnNade, impulse, int, 5);
ENDCLASS(SpawnNade)
ATTRIB(TranslocateNade, m_color, vector, '1 0 1');
ATTRIB(TranslocateNade, m_name, string, _("Translocate grenade"));
ATTRIB(TranslocateNade, m_icon, string, "nade_translocate");
+#ifdef MENUQC
+ METHOD(TranslocateNade, describe, string(TranslocateNade this))
+ {
+ TC(TranslocateNade, this);
+ return sprintf(_("The %s detonates after a short delay, teleporting you to where it detonated"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(TranslocateNade, netname, string, "translocate");
+ ATTRIB(TranslocateNade, impulse, int, 4);
ENDCLASS(TranslocateNade)
ATTRIB(VeilNade, m_name, string, _("Veil grenade"));
ATTRIB(VeilNade, m_icon, string, "nade_veil");
ATTRIB(VeilNade, m_alpha, float, 0.45);
+#ifdef MENUQC
+ METHOD(VeilNade, describe, string(VeilNade this))
+ {
+ TC(VeilNade, this);
+ return sprintf(_("The Veil grenade detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. "
+ "Players inside the orb will be invisible to those outside it"),
+ COLORED_NAME(this));
+ }
+#endif
+ ATTRIB(VeilNade, netname, string, "veil");
+ ATTRIB(VeilNade, impulse, int, 9);
ENDCLASS(VeilNade)
ATTRIB(Nade, m_name, string, _("Grenade"));
ATTRIB(Nade, m_icon, string, "nade_normal");
ATTRIB(Nade, m_alpha, float, 1);
+ ATTRIB(Nade, netname, string, "random");
+ ATTRIB(Nade, impulse, int, 0); // legacy number for selection, do not add to new nade types
ATTRIBARRAY(Nade, m_projectile, int, 2);
ATTRIBARRAY(Nade, m_trail, entity, 2);
- METHOD(Nade, display, void(entity this, void(string name, string icon) returns)) {
- returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("hud_skin"), this.m_icon));
+ METHOD(Nade, display, void(Nade this, void(string name, string icon) returns)) {
+ TC(Nade, this);
+ returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("hud_skin"), this.m_icon) : string_null);
}
+#ifdef MENUQC
+ METHOD(Nade, describe, string(Nade this)) {
+ TC(Nade, this);
+ return SUPER(Nade).describe(this);
+ }
+#endif
ENDCLASS(Nade)
-REGISTER_NADE(Null, NEW(Nade));
+CLASS(NullNade, Nade)
+ ATTRIB(NullNade, m_hidden, bool, true);
+ENDCLASS(NullNade)
+REGISTER(Nades, NADE_TYPE, Null, m_id, NEW(NullNade));
REGISTRY_DEFINE_GET(Nades, NADE_TYPE_Null)
// use slots 70-100
.float orb_radius;
#ifdef GAMEQC
- REPLICATE_INIT(int, cvar_cl_nade_type);
+ REPLICATE_INIT(string, cvar_cl_nade_type);
REPLICATE_INIT(string, cvar_cl_pokenade_type);
#endif
+
+#ifdef MENUQC
+#include <common/mutators/base.qh>
+
+CLASS(MutatorNades, Mutator)
+ ATTRIB(MutatorNades, message, string, _("Nades"));
+ENDCLASS(MutatorNades)
+
+REGISTER_MUTATOR(nades, true, MutatorNades);
+#endif
--- /dev/null
- case WEP_SHOCKWAVE.m_id:
+#include "new_toys.qh"
+
+#include <common/weapons/_all.qh>
+
+// 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_ARC.m_id:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifdef MENUQC
+#include "../instagib/instagib.qh"
+#include "../overkill/overkill.qh"
+
+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