X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Feffects%2Feffectinfo.qc;h=1e23bb46fbf9943547b66d76a7f81939967f1917;hb=c05104bde1e758c4022f9755f02f177aa0476134;hp=68c245db4a7df2674b7ceb79ddd061234b3ff7fd;hpb=8e4957c252f8381e37f2a72e227797bf51e5cc2f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index 68c245db4..1e23bb46f 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -1,3 +1,5 @@ +#if ENABLE_EFFECTINFO + #include "effectinfo.qh" #define EFFECTINFO_PARSER(on, MY) \ on(type, MY(type) \ @@ -285,7 +287,7 @@ void effectinfo_dump(int fh, bool alsoprint) #undef WRITE } -GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") +GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", false) { switch (request) { case CMD_REQUEST_COMMAND: { @@ -311,10 +313,10 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") } default: case CMD_REQUEST_USAGE: { - LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]"); - LOG_INFO(" Where 'filename' is the file to write (default is effectinfo_dump.txt),"); - LOG_INFO(" if supplied with '-' output to console as well as default,"); - LOG_INFO(" if left blank, it will only write to default."); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]"); + LOG_HELP(" Where 'filename' is the file to write (default is effectinfo_dump.txt),"); + LOG_HELP(" if supplied with '-' output to console as well as default,"); + LOG_HELP(" if left blank, it will only write to default."); return; } } @@ -322,8 +324,9 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") REGISTRY(EffectInfos, BITS(9)) -#define EffectInfos_from(i) _EffectInfos_from(i, NULL) REGISTER_REGISTRY(EffectInfos) + +REGISTRY_DEFINE_GET(EffectInfos, NULL) #define EFFECTINFO(name) \ ACCUMULATE void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { } \ REGISTER(EffectInfos, EFFECTINFO, name, m_id, NEW(EffectInfoGroup)) { \ @@ -339,3 +342,5 @@ REGISTER_REGISTRY(EffectInfos) #undef MY #undef DEF #undef SUB + +#endif