CLASS(Nade, Object)
ATTRIB(Nade, m_id, int, 0)
ATTRIB(Nade, m_color, vector, '0 0 0')
+ ATTRIB(Nade, m_name, string, _("Grenade"))
ATTRIB(Nade, m_icon, string, "nade_normal")
ATTRIBARRAY(Nade, m_projectile, int, 2)
ATTRIBARRAY(Nade, m_trail, string, 2)
+ METHOD(Nade, display, void(entity this, void(string name, string icon) returns))
+ void Nade_display(entity this, void(string name, string icon) returns) {
+ returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon));
+ }
ENDCLASS(Nade)
REGISTER_NADE(NULL);
REGISTER_NADE(NAPALM) {
this.m_color = '2 0.5 0';
+ this.m_name = _("Napalm grenade");
this.m_icon = "nade_napalm";
NADE_PROJECTILE(0, PROJECTILE_NADE_NAPALM, "TR_ROCKET");
NADE_PROJECTILE(1, PROJECTILE_NADE_NAPALM_BURN, "spiderbot_rocket_thrust");
REGISTER_NADE(ICE) {
this.m_color = '0 0.5 2';
+ this.m_name = _("Ice grenade");
this.m_icon = "nade_ice";
NADE_PROJECTILE(0, PROJECTILE_NADE_ICE, "TR_NEXUIZPLASMA");
NADE_PROJECTILE(1, PROJECTILE_NADE_ICE_BURN, "wakizashi_rocket_thrust");
REGISTER_NADE(TRANSLOCATE) {
this.m_color = '1 0 1';
+ this.m_name = _("Translocate grenade");
this.m_icon = "nade_translocate";
NADE_PROJECTILE(0, PROJECTILE_NADE_TRANSLOCATE, "TR_CRYLINKPLASMA");
NADE_PROJECTILE(1, PROJECTILE_NADE_TRANSLOCATE, "TR_CRYLINKPLASMA");
REGISTER_NADE(SPAWN) {
this.m_color = '1 0.9 0';
+ this.m_name = _("Spawn grenade");
this.m_icon = "nade_spawn";
NADE_PROJECTILE(0, PROJECTILE_NADE_SPAWN, "nade_yellow");
NADE_PROJECTILE(1, PROJECTILE_NADE_SPAWN, "nade_yellow");
REGISTER_NADE(HEAL) {
this.m_color = '1 0 0';
+ this.m_name = _("Heal grenade");
this.m_icon = "nade_heal";
NADE_PROJECTILE(0, PROJECTILE_NADE_HEAL, "nade_red");
NADE_PROJECTILE(1, PROJECTILE_NADE_HEAL_BURN, "nade_red_burn");
REGISTER_NADE(MONSTER) {
this.m_color = '0.25 0.75 0';
+ this.m_name = _("Monster grenade");
this.m_icon = "nade_monster";
NADE_PROJECTILE(0, PROJECTILE_NADE_MONSTER, "nade_red");
NADE_PROJECTILE(1, PROJECTILE_NADE_MONSTER_BURN, "nade_red_burn");
X(NEW(GametypeSource), _("Gametypes"), "gametype_dm") \
X(NEW(ItemSource), _("Items"), "gametype_kh") \
X(NEW(BuffSource), _("Buffs"), "gametype_dom") \
+ X(NEW(NadeSource), _("Nades"), "gametype_ft") \
X(NEW(MapSource), _("Maps"), "gametype_ctf") \
if (cvar("developer")) X(NEW(DebugSource), _("Debug"), "gametype_ons") \
/**/
int BuffSource_reload(string filter) { return BUFFS_COUNT; }
ENDCLASS(BuffSource)
+#include "../../common/nades.qh"
+CLASS(NadeSource, DataSource)
+ METHOD(NadeSource, getEntry, entity(int, void(string, string)))
+ entity NadeSource_getEntry(int i, void(string, string) returns) {
+ entity e = NADES[i];
+ if (returns) e.display(e, returns);
+ return e;
+ }
+ METHOD(NadeSource, reload, int(string))
+ int NadeSource_reload(string filter) { return NADES_COUNT; }
+ENDCLASS(NadeSource)
+
CLASS(MapSource, DataSource)
METHOD(MapSource, getEntry, entity(int, void(string, string)))
entity MapSource_getEntry(int i, void(string, string) returns)