X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qh;h=623f71b3904ab7654d9e9e88e23291c45d84bb09;hb=b34b4a1dbfe6c43ce6ffbec3ad7af782bcb561db;hp=ab86ea6736eaca2b592cb6e212bdc1aa6b42392b;hpb=1b2fda32ef5ff620f3b40b1890e3480735176e55;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index ab86ea673..623f71b39 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -1,19 +1,20 @@ -#ifndef ITEMS_ALL_H -#define ITEMS_ALL_H +#pragma once -#include "../command/all.qh" +#include #include "item.qh" -REGISTRY(Items, BITS(5)) +REGISTRY(Items, BITS(7)) #define Items_from(i) _Items_from(i, NULL) +#ifdef GAMEQC +REGISTRY_DEPENDS(Items, Models) +#endif REGISTER_REGISTRY(Items) -/** If you register a new item, make sure to add it to all.inc */ #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(); @@ -25,14 +26,12 @@ GENERIC_COMMAND(dumpitems, "Dump all items to the console") { } default: case CMD_REQUEST_USAGE: { - LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix()); + LOG_INFOF("Usage:^3 %s dumpitems", GetProgramCommandPrefix()); return; } } } -#ifndef MENUQC +#ifdef GAMEQC string Item_Model(string item_mdl); #endif - -#endif