diff options
| author | Quietust | 2012-01-16 22:12:58 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-16 22:12:58 -0600 |
| commit | fd653a0227f3bca86d8fd4b9e7f515b6c4015524 (patch) | |
| tree | 2b22522cad48b21f97e3ad96f09aafa087e6f325 /plugins/autodump.cpp | |
| parent | e75291ee91adb0c76619a7d61814b85ea22402a1 (diff) | |
| download | dfhack-fd653a0227f3bca86d8fd4b9e7f515b6c4015524.tar.gz dfhack-fd653a0227f3bca86d8fd4b9e7f515b6c4015524.tar.bz2 dfhack-fd653a0227f3bca86d8fd4b9e7f515b6c4015524.tar.xz | |
Kill the Items module
Diffstat (limited to 'plugins/autodump.cpp')
| -rw-r--r-- | plugins/autodump.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/autodump.cpp b/plugins/autodump.cpp index 8c1820f2..8c7f9a16 100644 --- a/plugins/autodump.cpp +++ b/plugins/autodump.cpp @@ -28,6 +28,7 @@ using namespace std; using namespace DFHack; using MapExtras::Block; using MapExtras::MapCache; +using df::global::world; DFhackCExport command_result df_autodump(Core * c, vector <string> & parameters); DFhackCExport command_result df_autodump_destroy_here(Core * c, vector <string> & parameters); @@ -95,16 +96,9 @@ static command_result autodump_main(Core * c, vector <string> & parameters) DFHack::VersionInfo *mem = c->vinfo; DFHack::Gui * Gui = c->getGui(); - DFHack::Items * Items = c->getItems(); DFHack::Maps *Maps = c->getMaps(); - vector <df::item*> p_items; - if(!Items->readItemVector(p_items)) - { - c->con.printerr("Can't access the item vector.\n"); - return CR_FAILURE; - } - std::size_t numItems = p_items.size(); + std::size_t numItems = world->items.all.size(); // init the map if(!Maps->Start()) @@ -148,7 +142,7 @@ static command_result autodump_main(Core * c, vector <string> & parameters) // proceed with the dumpification operation for(std::size_t i=0; i< numItems; i++) { - df::item * itm = p_items[i]; + df::item * itm = world->items.all[i]; DFCoord pos_item(itm->x, itm->y, itm->z); // keep track how many items are at places. all items. |
