]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/pickup.qh
Items: use Model references instead of strings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / pickup.qh
1 #ifndef PICKUP_H
2 #define PICKUP_H
3 #include "../item.qh"
4 CLASS(Pickup, GameItem)
5 #ifndef MENUQC
6     ATTRIB(Pickup, m_model, Model, NULL)
7     ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP)
8 #endif
9     ATTRIB(Pickup, m_name, string, string_null)
10     METHOD(Pickup, show, void(entity this));
11     void Pickup_show(entity this) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
12 #ifdef SVQC
13     ATTRIB(Pickup, m_botvalue, int, 0)
14     ATTRIB(Pickup, m_itemflags, int, 0)
15     ATTRIB(Pickup, m_itemid, int, 0)
16     float generic_pickupevalfunc(entity player, entity item);
17     ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc)
18     ATTRIB(Pickup, m_respawntime, float(), func_null)
19     ATTRIB(Pickup, m_respawntimejitter, float(), func_null)
20     float Item_GiveTo(entity item, entity player);
21     METHOD(Pickup, giveTo, bool(entity this, entity item, entity player))
22     { return Item_GiveTo(item, player); }
23     bool ITEM_HANDLE(Pickup, entity this, entity item, entity player);
24 #endif
25 ENDCLASS(Pickup)
26
27 #endif