]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/all.qh
Commands: move dump commands to their respective systems
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
1 #ifndef ITEMS_ALL_H
2 #define ITEMS_ALL_H
3
4 #include "../command/all.qh"
5
6 #include "item.qh"
7
8 REGISTRY(Items, BIT(5))
9 REGISTER_REGISTRY(RegisterItems)
10 /** If you register a new item, make sure to add it to all.inc */
11 #define REGISTER_ITEM(id, class) REGISTER(RegisterItems, ITEM, Items, id, m_id, NEW(class))
12
13 void Dump_Items();
14
15 GENERIC_COMMAND(dumpitems, "Dump all items to the console") {
16     switch (request) {
17         case CMD_REQUEST_COMMAND: {
18             Dump_Items();
19             return;
20         }
21         default:
22         case CMD_REQUEST_USAGE: {
23             LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
24             return;
25         }
26     }
27 }
28
29 #ifndef MENUQC
30 string Item_Model(string item_mdl);
31 #endif
32
33 #endif
34
35 #include "inventory.qh"