diff options
| author | Quietust | 2012-01-21 18:31:15 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-21 18:31:15 -0600 |
| commit | 2cc6bcf0e97dbdf60492067cd71dc79432a35687 (patch) | |
| tree | e893504d15ef59e8803573f6f4483d2e3ec9ca34 /plugins/plants.cpp | |
| parent | ccf22bed10a78504701bbdb1f8177a16cf9ffdde (diff) | |
| download | dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.gz dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.bz2 dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.xz | |
Use CoreSuspender and namespace df::enums
Diffstat (limited to 'plugins/plants.cpp')
| -rw-r--r-- | plugins/plants.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/plants.cpp b/plugins/plants.cpp index 9bfe5081..399d02ee 100644 --- a/plugins/plants.cpp +++ b/plugins/plants.cpp @@ -18,7 +18,6 @@ using std::vector; using std::string; using namespace DFHack; - using df::global::world; DFhackCExport command_result df_grow (Core * c, vector <string> & parameters); @@ -100,11 +99,10 @@ static command_result immolations (Core * c, do_what what, bool shrubs, bool tre ); return CR_OK; } - c->Suspend(); + CoreSuspender suspend(c); if (!Maps::IsValid()) { c->con.printerr("Map is not available!\n"); - c->Resume(); return CR_FAILURE; } DFHack::Gui * Gui = c->getGui(); @@ -161,8 +159,6 @@ static command_result immolations (Core * c, do_what what, bool shrubs, bool tre c->con.printerr("No mass destruction and no cursor...\n" ); } } - // Cleanup - c->Resume(); return CR_OK; } @@ -204,12 +200,11 @@ DFhackCExport command_result df_grow (Core * c, vector <string> & parameters) return CR_OK; } } - c->Suspend(); + CoreSuspender suspend(c); Console & con = c->con; if (!Maps::IsValid()) { c->con.printerr("Map is not available!\n"); - c->Resume(); return CR_FAILURE; } MapExtras::MapCache map; @@ -248,8 +243,6 @@ DFhackCExport command_result df_grow (Core * c, vector <string> & parameters) } } - // Cleanup - c->Resume(); return CR_OK; } |
