X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qh;h=623f71b3904ab7654d9e9e88e23291c45d84bb09;hb=791f300d2660d6b75a51c6e7f302d6fa6b64861a;hp=1bd22f660e52264f488a53390d015045dff5d7cd;hpb=c3268be9db04d1e5b0500f5471ddcae6b29d7423;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 1bd22f660e..623f71b390 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) 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