X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qh;h=dc8cf21c020a6d06993f87281cc1dad98f29cbac;hp=a825b4ed16fbfb58a8718ce4ca5cd86d2e9c97cb;hb=201e1dace88941c841a9211c0e081fb21dc89577;hpb=3ae1efa7401791e42e3171f4db2cc2d38adde088 diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index a825b4ed16..dc8cf21c02 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -1,17 +1,17 @@ -#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) +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,10 +29,6 @@ GENERIC_COMMAND(dumpitems, "Dump all items to the console") { } } -#ifndef MENUQC +#ifdef GAMEQC string Item_Model(string item_mdl); #endif - -#endif - -#include "inventory.qh"