summaryrefslogtreecommitdiff
path: root/plugins/cleaners.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/cleaners.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/cleaners.cpp')
-rw-r--r--plugins/cleaners.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/cleaners.cpp b/plugins/cleaners.cpp
index 35ec69ea..8992b207 100644
--- a/plugins/cleaners.cpp
+++ b/plugins/cleaners.cpp
@@ -27,7 +27,7 @@ DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand>
{
commands.clear();
commands.push_back(PluginCommand("clean","Removes contaminants from map tiles, items and creatures.",clean));
- commands.push_back(PluginCommand("spotclean","Cleans map tile under cursor.",spotclean));
+ commands.push_back(PluginCommand("spotclean","Cleans map tile under cursor.",spotclean,cursor_hotkey));
return CR_OK;
}
@@ -165,7 +165,7 @@ command_result cleanunits (Core * c)
DFhackCExport command_result spotclean (Core * c, vector <string> & parameters)
{
- c->Suspend();
+ // HOTKEY COMMAND: CORE ALREADY SUSPENDED
vector<DFHack::t_spattervein *> splatter;
DFHack::Maps *Mapz = c->getMaps();
DFHack::Gui *Gui = c->getGui();
@@ -173,7 +173,6 @@ DFhackCExport command_result spotclean (Core * c, vector <string> & parameters)
if(!Mapz->Start())
{
c->con.printerr("Can't init map.\n");
- c->Resume();
return CR_FAILURE;
}
int32_t cursorX, cursorY, cursorZ;
@@ -181,7 +180,6 @@ DFhackCExport command_result spotclean (Core * c, vector <string> & parameters)
if(cursorX == -30000)
{
c->con.printerr("The cursor is not active.\n");
- c->Resume();
return CR_FAILURE;
}
int32_t blockX = cursorX / 16, blockY = cursorY / 16;
@@ -193,7 +191,6 @@ DFhackCExport command_result spotclean (Core * c, vector <string> & parameters)
{
spatters[i]->intensity[tileX][tileY] = 0;
}
- c->Resume();
return CR_OK;
}