/** M: wepname : human readable name */
ATTRIB(Weapon, message, string, "AOL CD Thrower");
+ METHOD(Weapon, display, void(entity this, void(string name, string icon) returns))
+ void Weapon_display(entity this, void(string name, string icon) returns) {
+ returns(this.message, this.model2 ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.model2) : string_null);
+ }
+
CONSTRUCTOR(Weapon,
bool(int) function,
.int ammotype,
#define TOPICS(X) \
X(NEW(GametypeSource), _("Gametypes"), "gametype_dm") \
+ X(NEW(WeaponSource), _("Weapons"), "gametype_ka") \
X(NEW(ItemSource), _("Items"), "gametype_kh") \
X(NEW(BuffSource), _("Buffs"), "gametype_dom") \
X(NEW(NadeSource), _("Nades"), "gametype_ft") \
int NadeSource_reload(string filter) { return NADES_COUNT; }
ENDCLASS(NadeSource)
+#include "../../common/weapons/all.qh"
+CLASS(WeaponSource, DataSource)
+ METHOD(WeaponSource, getEntry, entity(int, void(string, string)))
+ entity WeaponSource_getEntry(int i, void(string, string) returns) {
+ entity e = weapon_info[i];
+ if (returns) e.display(e, returns);
+ return e;
+ }
+ METHOD(WeaponSource, reload, int(string))
+ int WeaponSource_reload(string filter) { return WEP_COUNT; }
+ENDCLASS(WeaponSource)
+
CLASS(MapSource, DataSource)
METHOD(MapSource, getEntry, entity(int, void(string, string)))
entity MapSource_getEntry(int i, void(string, string) returns)