Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh
Go to the documentation of this file.
1#pragma once
2
4
5#include "item.qh"
6
7// NOTE: 24 is the limit for the .items field
8REGISTRY(Items, 32)
9#ifdef GAMEQC
10REGISTRY_DEPENDS(Items, Models)
11#endif
13#define REGISTER_ITEM(id, inst) REGISTER(Items, ITEM, id, m_id, inst)
14
15#ifdef CSQC
16// Copy Items registry here before it gets sorted alphabetically by REGISTRY_SORT
17// so we can keep items sorted by categories (as they appear in the code)
26#endif
27
28REGISTRY_SORT(Items)
29REGISTRY_CHECK(Items)
30
32STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); }
33
34void Dump_Items();
35
36GENERIC_COMMAND(dumpitems, "Dump all items to the console", false) {
37 switch (request) {
39 Dump_Items();
40 return;
41 }
42 default:
43 case CMD_REQUEST_USAGE: {
44 LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpitems");
45 return;
46 }
47 }
48}
49
50#ifdef GAMEQC
51string Item_Model(string item_mdl);
52#endif
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
const int CMD_REQUEST_COMMAND
Definition command.qh:3
const int CMD_REQUEST_USAGE
Definition command.qh:4
#define GENERIC_COMMAND(id, description, menubased)
Definition reg.qh:12
#define GetProgramCommandPrefix()
Definition generic.qh:25
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_NEW()
IntrusiveList default_order_items
Definition all.qh:18
void Dump_Items()
Definition all.qc:3
string Item_Model(string item_mdl)
Definition all.qc:8
#define FOREACH(list, cond, body)
Definition iter.qh:19
#define LOG_HELP(...)
Definition log.qh:85
#define NULL
Definition post.qh:14
#define REGISTRY_SORT(...)
Definition registry.qh:128
#define REGISTER_REGISTRY(id)
Definition registry.qh:229
#define REGISTRY(id, max)
Declare a new registry.
Definition registry.qh:26
#define REGISTRY_CHECK(id)
Definition registry.qh:175
#define REGISTRY_DEFINE_GET(id, null)
Definition registry.qh:40
#define REGISTRY_DEPENDS(id, dep)
Add registry dependencies to a registry.
Definition registry.qh:46
#define STATIC_INIT(func)
during worldspawn
Definition static.qh:32