X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Feffects%2Feffectinfo.qc;h=79d31eb46bc5efdb473e4322a02b985101511401;hb=HEAD;hp=1e23bb46fbf9943547b66d76a7f81939967f1917;hpb=38f4a1731d66faca35562977b145f76e119f2887;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index 1e23bb46f..d6da6c4aa 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -287,17 +287,19 @@ void effectinfo_dump(int fh, bool alsoprint) #undef WRITE } -GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", false) +#define DEFAULT_FILENAME "effectinfo_dump.txt" +// NOTE: dumpeffectinfo, dumpnotifs, dumpturrets and dumpweapons use similar code +GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo into " DEFAULT_FILENAME, false) { switch (request) { case CMD_REQUEST_COMMAND: { string filename = argv(1); bool alsoprint = false; if (filename == "") { - filename = "effectinfo_dump.txt"; + filename = DEFAULT_FILENAME; alsoprint = false; } else if (filename == "-") { - filename = "effectinfo_dump.txt"; + filename = DEFAULT_FILENAME; alsoprint = true; } int fh = fopen(filename, FILE_WRITE); @@ -313,14 +315,15 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", fa } default: case CMD_REQUEST_USAGE: { - LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]"); - LOG_HELP(" Where 'filename' is the file to write (default is effectinfo_dump.txt),"); + LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo []"); + LOG_HELPF(" Where is the file to write (default is %s),", DEFAULT_FILENAME); LOG_HELP(" if supplied with '-' output to console as well as default,"); LOG_HELP(" if left blank, it will only write to default."); return; } } } +#undef DEFAULT_FILENAME REGISTRY(EffectInfos, BITS(9))