]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/all.qh
Merge branch 'master' into terencehill/dynamic_hud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
index 4d76aa3386dfb8cd54b0ad104f07017df9554a14..ba8d86bfaab2cf71b037efcb798758c09b0d8bfe 100644 (file)
@@ -1,17 +1,19 @@
 #ifndef ITEMS_ALL_H
 #define ITEMS_ALL_H
 
-#include "../command/all.qh"
+#include <common/command/all.qh>
 
 #include "item.qh"
 
 REGISTRY(Items, BITS(5))
-REGISTER_REGISTRY(RegisterItems)
+#define Items_from(i) _Items_from(i, NULL)
+REGISTER_REGISTRY(Items)
 /** If you register a new item, make sure to add it to all.inc */
-#define REGISTER_ITEM(id, class) REGISTER(RegisterItems, ITEM, Items, id, m_id, NEW(class))
+#define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class))
 
-REGISTRY_SORT(Items, m_name, 0)
-STATIC_INIT(Items) { FOREACH(Items, true, LAMBDA(it.m_id = i)); }
+REGISTRY_SORT(Items)
+REGISTRY_CHECK(Items)
+STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); }
 
 void Dump_Items();