summaryrefslogtreecommitdiff
path: root/plugins/autodump.cpp
diff options
context:
space:
mode:
authorQuietust2012-01-21 18:31:15 -0600
committerQuietust2012-01-21 18:31:15 -0600
commit2cc6bcf0e97dbdf60492067cd71dc79432a35687 (patch)
treee893504d15ef59e8803573f6f4483d2e3ec9ca34 /plugins/autodump.cpp
parentccf22bed10a78504701bbdb1f8177a16cf9ffdde (diff)
downloaddfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.gz
dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.bz2
dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.xz
Use CoreSuspender and namespace df::enums
Diffstat (limited to 'plugins/autodump.cpp')
-rw-r--r--plugins/autodump.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/autodump.cpp b/plugins/autodump.cpp
index ccac5d39..f726502c 100644
--- a/plugins/autodump.cpp
+++ b/plugins/autodump.cpp
@@ -26,6 +26,8 @@ using namespace std;
#include "df/general_ref.h"
using namespace DFHack;
+using namespace df::enums;
+
using MapExtras::Block;
using MapExtras::MapCache;
using df::global::world;
@@ -291,9 +293,9 @@ DFhackCExport command_result df_autodump_destroy_item(Core * c, vector <string>
return CR_FAILURE;
// Allow undoing the destroy
- if (df::global::world->frame_counter != last_frame)
+ if (world->frame_counter != last_frame)
{
- last_frame = df::global::world->frame_counter;
+ last_frame = world->frame_counter;
pending_destroy.clear();
}
@@ -327,7 +329,7 @@ DFhackCExport command_result df_autodump_destroy_item(Core * c, vector <string>
for (unsigned i = 0; i < item->itemrefs.size(); i++)
{
df::general_ref *ref = item->itemrefs[i];
- if (ref->getType() == df::general_ref_type::UNIT_HOLDER)
+ if (ref->getType() == general_ref_type::UNIT_HOLDER)
{
c->con.printerr("Choosing not to destroy items in unit inventory.\n");
return CR_FAILURE;