X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qh;h=d377776cd554f0bc5c3b0467c755cf8fe641ad37;hb=2046c0aa48fa58594d075ca4247a7dd724ae9bfb;hp=809398bb292fa907c1e4f0d1a074ff646236bfee;hpb=910d5295d631181792d354f44a80b63dc3e629eb;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 809398bb2..d377776cd 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -1,19 +1,17 @@ -#ifndef ITEMS_ALL_H -#define ITEMS_ALL_H +#pragma once -#include "../command/all.qh" +#include #include "item.qh" REGISTRY(Items, BITS(5)) #define Items_from(i) _Items_from(i, NULL) -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)) +REGISTER_REGISTRY(Items) +#define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class)) -REGISTRY_SORT(Items, 0) +REGISTRY_SORT(Items) REGISTRY_CHECK(Items) -STATIC_INIT(Items) { FOREACH(Items, true, LAMBDA(it.m_id = i)); } +STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); } void Dump_Items(); @@ -31,8 +29,6 @@ GENERIC_COMMAND(dumpitems, "Dump all items to the console") { } } -#ifndef MENUQC +#ifdef GAMEQC string Item_Model(string item_mdl); #endif - -#endif