From d0ba6d70193b69cae0826004243c0c80a4492836 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 8 May 2015 17:35:46 -0400 Subject: [PATCH] Fix tweak fps-min --- NEWS | 1 + plugins/tweak/tweak.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index fda78b704..e88f2213f 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ DFHack Future Lua's os.system() now works on OS X Fixed default arguments in Lua gametype detection functions gui/hack-wish now properly assigns quality to items. + tweak fps-min fixed Misc Improvements "keybinding list" accepts a context nyan: Can now be stopped with dfhack-run diff --git a/plugins/tweak/tweak.cpp b/plugins/tweak/tweak.cpp index 8e2691149..907c3945a 100644 --- a/plugins/tweak/tweak.cpp +++ b/plugins/tweak/tweak.cpp @@ -130,6 +130,7 @@ static std::multimap tweak_onupdate_hooks; DFhackCExport command_result plugin_init (color_ostream &out, std::vector &commands) { + is_enabled = true; // Allow plugin_onupdate to work (subcommands are enabled individually) commands.push_back(PluginCommand( "tweak", "Various tweaks for minor bugs.", tweak, false, " tweak clear-missing\n" @@ -694,7 +695,7 @@ static command_result enable_tweak(string tweak, color_ostream &out, vector second; + 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()); }