]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/ammo.qc
Initial item system setup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qc
1 #include "ammo.qh"
2
3 #define REGISTER_AMMO(id) REGISTER_ITEM(id, Ammo, LAMBDA(this.ammoName = #id))
4 REGISTER_AMMO(nails)
5 REGISTER_AMMO(rockets)
6 REGISTER_AMMO(cells)
7 REGISTER_AMMO(plasma)
8 REGISTER_AMMO(fuel)
9
10 bool Ammo_respondTo(entity this, int request)
11 {
12     switch (request) {
13         default: return false;
14         case ITEM_SIGNAL(Default):
15             print(strcat(this.ammoName, " responding\n"));
16             return true;
17     }
18 }