summaryrefslogtreecommitdiff
path: root/plugins/initflags.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-12-31 13:09:12 +0100
committerPetr Mrázek2011-12-31 13:09:12 +0100
commitf35cdb84cdeaed99c0bb291423ffbc05183fd35f (patch)
tree84f910568748f97ed6f454e68b7b813687e0eb1a /plugins/initflags.cpp
parent9db20bd84de2b31a3a34f775af9ce6320f37d75a (diff)
parentb652ec4132ad97b88dfd648303bf7a99267f1742 (diff)
downloaddfhack-f35cdb84cdeaed99c0bb291423ffbc05183fd35f.tar.gz
dfhack-f35cdb84cdeaed99c0bb291423ffbc05183fd35f.tar.bz2
dfhack-f35cdb84cdeaed99c0bb291423ffbc05183fd35f.tar.xz
Merge https://github.com/angavrilov/dfhack
Conflicts: library/Core.cpp library/PluginManager.cpp library/include/Core.h library/include/PluginManager.h library/modules/Gui.cpp plugins/stockpiles.cpp
Diffstat (limited to 'plugins/initflags.cpp')
-rw-r--r--plugins/initflags.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/initflags.cpp b/plugins/initflags.cpp
index 29d8144a..5671619e 100644
--- a/plugins/initflags.cpp
+++ b/plugins/initflags.cpp
@@ -26,8 +26,10 @@ DFhackCExport command_result plugin_init (Core *c, std::vector <PluginCommand> &
{
commands.clear();
if (d_init) {
- commands.push_back(PluginCommand("twaterlvl", "Toggle display of water/magma depth.", twaterlvl));
- commands.push_back(PluginCommand("tidlers", "Toggle display of idlers.", tidlers));
+ commands.push_back(PluginCommand("twaterlvl", "Toggle display of water/magma depth.",
+ twaterlvl, dwarfmode_hotkey));
+ commands.push_back(PluginCommand("tidlers", "Toggle display of idlers.",
+ tidlers, dwarfmode_hotkey));
}
std::cerr << "d_init: " << sizeof(df::d_init) << endl;
return CR_OK;
@@ -40,21 +42,19 @@ DFhackCExport command_result plugin_shutdown ( Core * c )
DFhackCExport command_result twaterlvl(Core * c, vector <string> & parameters)
{
- c->Suspend();
+ // HOTKEY COMMAND: CORE ALREADY SUSPENDED
df::global::d_init->flags1.toggle(d_init_flags1::SHOW_FLOW_AMOUNTS);
c->con << "Toggled the display of water/magma depth." << endl;
- c->Resume();
return CR_OK;
}
DFhackCExport command_result tidlers(Core * c, vector <string> & parameters)
{
- c->Suspend();
+ // HOTKEY COMMAND: CORE ALREADY SUSPENDED
df::d_init_idlers iv = df::d_init_idlers(int(d_init->idlers) + 1);
if (!d_init_idlers::is_valid(iv))
iv = ENUM_FIRST_ITEM(d_init_idlers);
d_init->idlers = iv;
c->con << "Toggled the display of idlers to " << ENUM_KEY_STR(d_init_idlers, iv) << endl;
- c->Resume();
return CR_OK;
}