X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qh;h=14c5a347ad26f534158fb635fc5a8ccbb9eb0cdf;hp=37e417a63f27f97b5f9020cec17ee2348839fee8;hb=b283d314c0c619a12b54c6094ade99ed69daed67;hpb=f93bcb5dd8686abd0b407df953ad211f3265eb91 diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 37e417a63..14c5a347a 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -1,17 +1,20 @@ -#ifndef ITEMS_ALL_H -#define ITEMS_ALL_H +#pragma once -#include "../command/all.qh" +#include #include "item.qh" -REGISTRY(Items, BIT(5)) -REGISTER_REGISTRY(RegisterItems) -/** 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)) +REGISTRY(Items, BITS(7)) +#define Items_from(i) _Items_from(i, NULL) +#ifdef GAMEQC +REGISTRY_DEPENDS(Items, Models) +#endif +REGISTER_REGISTRY(Items) +#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(); @@ -29,8 +32,6 @@ GENERIC_COMMAND(dumpitems, "Dump all items to the console") { } } -#ifndef MENUQC +#ifdef GAMEQC string Item_Model(string item_mdl); #endif - -#endif