diff options
| author | Alexander Gavrilov | 2012-04-12 18:37:27 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-12 18:37:27 +0400 |
| commit | 2d8611a4803edc6bd37030ac303230fee208f718 (patch) | |
| tree | 6036150d3662a11b02dcd7441c8e55c7f7e0bcac /plugins/autodump.cpp | |
| parent | 38a8c43a25221fdd0dfb21da297cb4c87621d21c (diff) | |
| download | dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.gz dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.bz2 dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.xz | |
Add core api for moving items between ground and containers.
Diffstat (limited to 'plugins/autodump.cpp')
| -rw-r--r-- | plugins/autodump.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/plugins/autodump.cpp b/plugins/autodump.cpp index a71555b7..2620d9de 100644 --- a/plugins/autodump.cpp +++ b/plugins/autodump.cpp @@ -182,15 +182,7 @@ static command_result autodump_main(color_ostream &out, vector <string> & parame // Don't move items if they're already at the cursor if (pos_cursor != pos_item) - { - if (!MC.removeItemOnGround(itm)) - out.printerr("Item %d wasn't in the source block.\n", itm->id); - - itm->pos = pos_cursor; - - if (!MC.addItemOnGround(itm)) - out.printerr("Could not add item %d to destination block.\n", itm->id); - } + Items::moveToGround(MC, itm, pos_cursor); } else // destroy { |
