X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fall.qc;h=0a26a75b5a7fd33aeee0f0b35a3dfd4b8ec92b8b;hb=8738750fed941e32330bc7d92bf0847e0fff02c2;hp=2de5afb4ca4869dbe75ee6d10c91ec31e4a94497;hpb=d78c1f16b437679d92a3b680525cb41db1b0a46e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/all.qc b/qcsrc/common/items/all.qc index 2de5afb4c..0a26a75b5 100644 --- a/qcsrc/common/items/all.qc +++ b/qcsrc/common/items/all.qc @@ -1,14 +1,27 @@ -#ifndef ITEMS_ALL_C -#define ITEMS_ALL_C #include "all.qh" -#include "all.inc" - void Dump_Items() { - ITEMS_FOREACH(true, LAMBDA({ - ITEM_HANDLE(Show, it); - })); + FOREACH(Items, true, ITEM_HANDLE(Show, it)); } +string Item_Model(string item_mdl) +{ + string output = strcat("models/items/", item_mdl); +#ifdef SVQC + MUTATOR_CALLHOOK(ItemModel, item_mdl, output); + output = M_ARGV(1, string); #endif + return output; +} + +string Item_Sound(string it_snd) +{ + string output = strcat("misc/", it_snd); +#ifdef SVQC + MUTATOR_CALLHOOK(ItemSound, it_snd, output); + return M_ARGV(1, string); +#else + return output; +#endif +}