Inventory: expand capacity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
1 #pragma once
2
3 #include <common/command/_mod.qh>
4
5 #include "item.qh"
6
7 REGISTRY(Items, BITS(7))
8 #define Items_from(i) _Items_from(i, NULL)
9 REGISTER_REGISTRY(Items)
10 #define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class))
11
12 REGISTRY_SORT(Items)
13 REGISTRY_CHECK(Items)
14 STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); }
15
16 void Dump_Items();
17
18 GENERIC_COMMAND(dumpitems, "Dump all items to the console") {
19     switch (request) {
20         case CMD_REQUEST_COMMAND: {
21             Dump_Items();
22             return;
23         }
24         default:
25         case CMD_REQUEST_USAGE: {
26             LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
27             return;
28         }
29     }
30 }
31
32 #ifdef GAMEQC
33 string Item_Model(string item_mdl);
34 #endif