Disable some plugin output on startup

* tweak: Log tweak changes to stderr.log instead of the console
* stockflow: Use "enable stockflow" instead of "stockflow enable"
  in dfhack.init-example
develop
lethosor 2015-05-16 18:23:02 -04:00
parent 6278c94775
commit 84b2f814e8
2 changed files with 9 additions and 4 deletions

@ -218,7 +218,7 @@ enable \
# You can comment out the extension of a line.
# allow the fortress bookkeeper to queue jobs through the manager
stockflow enable
enable stockflow
###########
# Scripts #

@ -666,12 +666,16 @@ static void enable_hook(color_ostream &out, VMethodInterposeLinkBase &hook, vect
if (vector_get(parameters, 1) == "disable")
{
hook.remove();
out.print("Disabled tweak %s (%s)\n", parameters[0].c_str(), hook.name());
fprintf(stderr, "Disabled tweak %s (%s)\n", parameters[0].c_str(), hook.name());
fflush(stderr);
}
else
{
if (hook.apply())
out.print("Enabled tweak %s (%s)\n", parameters[0].c_str(), hook.name());
{
fprintf(stderr, "Enabled tweak %s (%s)\n", parameters[0].c_str(), hook.name());
fflush(stderr);
}
else
out.printerr("Could not activate tweak %s (%s)\n", parameters[0].c_str(), hook.name());
}
@ -697,7 +701,8 @@ static command_result enable_tweak(string tweak, color_ostream &out, vector <str
recognized = true;
tweak_onupdate_hookst &hook = it->second;
hook.enabled = state;
out.print("%s tweak %s (%s)\n", state ? "Enabled" : "Disabled", cmd.c_str(), hook.name.c_str());
fprintf(stderr, "%s tweak %s (%s)\n", state ? "Enabled" : "Disabled", cmd.c_str(), hook.name.c_str());
fflush(stderr);
}
}
if (!recognized)