{"action":"created","comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/34576552","id":34576552,"diff_hunk":"@@ -1037,41 +1071,71 @@ void advanced_inventory::redraw_pane( side p )\n     wrefresh( w );\n }\n \n-bool advanced_inventory::move_all_items()\n+// be explicit with the values\n+enum aim_entry {\n+    ENTRY_START     = 0,\n+    ENTRY_VEHICLE   = 1,\n+    ENTRY_MAP       = 2,\n+    ENTRY_RESET     = 3\n+};\n+\n+bool advanced_inventory::move_all_items(bool nested_call)\n {\n     auto &spane = panes[src];\n     auto &dpane = panes[dest];\n \n     // AIM_ALL source area routine\n     if(spane.get_area() == AIM_ALL) {\n-        // future feature :-)\n-        popup(_(\"You can't do that (yet!)\"));\n-        return false;\n-        // make a copy of the current pane for below loop\n+        bool done = false;\n+        // copy the current pane, to be restored after the move is queued\n         auto shadow = panes[src];\n         // here we recursively call this function with each area in order to \n         // put all items in the proper destination area, with minimal fuss\n         auto &loc = uistate.adv_inv_aim_all_location;\n-        // vehicle items for said square\n-        if(squares[loc].can_store_in_vehicle()) {\n-            // either do the inverse of the pane (if it is the one we are transferring to),\n-            // or just transfer the contents (if it is not the one we are transferring to)\n-            spane.set_area(squares[loc], (dpane.get_area() == loc) ? !dpane.in_vehicle() : true);\n-            // add items, calculate weights and volumes... the fun stuff\n-            recalc_pane(src);\n-            // then move the items to the destination area\n-            move_all_items();\n-        }\n-        // same as above, but for map items\n-        spane.set_area(squares[loc++], false);\n-        recalc_pane(src);\n-        move_all_items();\n-        if(loc > AIM_NORTHEAST) {\n-            loc = 0;\n+        // re-entry nonsense\n+        auto &entry = uistate.adv_inv_re_enter_move_all;\n+        // if we are just starting out, set entry to initial value\n+        switch(static_cast<aim_entry>(entry++)) {\n+            case ENTRY_START:\n+                ++entry;\n+            case ENTRY_VEHICLE:\n+                if(squares[loc].can_store_in_vehicle()) {\n+                    // either do the inverse of the pane (if it is the one we are transferring to),\n+                    // or just transfer the contents (if it is not the one we are transferring to)\n+                    spane.set_area(squares[loc], (dpane.get_area() == loc) ? !dpane.in_vehicle() : true);\n+                    // add items, calculate weights and volumes... the fun stuff\n+                    recalc_pane(src);\n+                    // then move the items to the destination area\n+                    move_all_items(true);\n+                }\n+                break;\n+            case ENTRY_MAP:\n+                spane.set_area(squares[loc++], false);","path":"src/advanced_inv.cpp","position":369,"original_position":369,"commit_id":"eb88ab34fcb389ddb3e09fe517ad0dd2ffe71633","original_commit_id":"eb88ab34fcb389ddb3e09fe517ad0dd2ffe71633","user":{"login":"narc0tiq","id":591573,"avatar_url":"https://avatars.githubusercontent.com/u/591573?v=3","gravatar_id":"","url":"https://api.github.com/users/narc0tiq","html_url":"https://github.com/narc0tiq","followers_url":"https://api.github.com/users/narc0tiq/followers","following_url":"https://api.github.com/users/narc0tiq/following{/other_user}","gists_url":"https://api.github.com/users/narc0tiq/gists{/gist_id}","starred_url":"https://api.github.com/users/narc0tiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narc0tiq/subscriptions","organizations_url":"https://api.github.com/users/narc0tiq/orgs","repos_url":"https://api.github.com/users/narc0tiq/repos","events_url":"https://api.github.com/users/narc0tiq/events{/privacy}","received_events_url":"https://api.github.com/users/narc0tiq/received_events","type":"User","site_admin":false},"body":"Not very pre-existing -- it wasn't possible to move-all from ALL before @DavidKeaton took a crack at it.","created_at":"2015-07-14T14:53:26Z","updated_at":"2015-07-14T14:53:26Z","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566#discussion_r34576552","pull_request_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566","_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/34576552"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566#discussion_r34576552"},"pull_request":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566"}}},"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566","id":37099980,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566.patch","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12566","number":12566,"state":"open","locked":false,"title":"[CR-RDY-HOWDY] AIM Updates","user":{"login":"DavidKeaton","id":1715605,"avatar_url":"https://avatars.githubusercontent.com/u/1715605?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidKeaton","html_url":"https://github.com/DavidKeaton","followers_url":"https://api.github.com/users/DavidKeaton/followers","following_url":"https://api.github.com/users/DavidKeaton/following{/other_user}","gists_url":"https://api.github.com/users/DavidKeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidKeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidKeaton/subscriptions","organizations_url":"https://api.github.com/users/DavidKeaton/orgs","repos_url":"https://api.github.com/users/DavidKeaton/repos","events_url":"https://api.github.com/users/DavidKeaton/events{/privacy}","received_events_url":"https://api.github.com/users/DavidKeaton/received_events","type":"User","site_admin":false},"body":"- When using the `AIM_ALL` directional menu to place an item, it now defaults to placing in a vehicle storage.\r\n- When selecting said tile, it is now the tile displayed for `panes[dest]` when finished.\r\n- Fixes #12542\r\n- Fixed loading settings for panes.\r\n- Loading AIM now respects whether the pane was in or out of vehicle now.\r\n- Now, you can move either one item of a stack at a time, X amount at a time, or _all_ at a time. You can even do this from **all** areas!\r\n- Stack movement now respects `charges`!\r\n- The popup for `MOVE_VARIABLE_ITEM` now automatically enters _no_ number. I have gotten differing requests on the number to start with, so decided to remove the number altogether! Take that, suggestions!\r\n- Removed `is_any_of()` in `enums.h`, and used `std::any_of()` instead.\r\n- You can now use `AIM_ALL` as a source pane and use `MOVE_ALL_ITEMS`!!! So now, just as @Coolthulhu had suggested ever so long ago, you can move everything into a neat little pile! :-D\r\n- Fixed `MOVE_VARIABLE_ITEMS` with worn items.\r\n- Rewrote item movement routine.\r\n- Charge based item movement should work as expected now.\r\n- `add_item()` and `remove_item()` now return the amount of items unable to process.\r\n- `query_charges()` now limits the amount of clothing/armor that you can wear. Two of any given type, and the appropriate constant was added to `game_constants.h`.\r\n- Changed `query_charges()` message to display how many you have when moving variable items, and added a message if the destination is full already when moving variable items.\r\n- A fun little story! :-)\r\n\r\nhth!\r\n-Davek","created_at":"2015-06-07T02:06:14Z","updated_at":"2015-07-14T14:53:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd4916d15351d2aa63e1920d5e610815fa28bcfe","assignee":{"login":"BevapDin","id":5095435,"avatar_url":"https://avatars.githubusercontent.com/u/5095435?v=3","gravatar_id":"","url":"https://api.github.com/users/BevapDin","html_url":"https://github.com/BevapDin","followers_url":"https://api.github.com/users/BevapDin/followers","following_url":"https://api.github.com/users/BevapDin/following{/other_user}","gists_url":"https://api.github.com/users/BevapDin/gists{/gist_id}","starred_url":"https://api.github.com/users/BevapDin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BevapDin/subscriptions","organizations_url":"https://api.github.com/users/BevapDin/orgs","repos_url":"https://api.github.com/users/BevapDin/repos","events_url":"https://api.github.com/users/BevapDin/events{/privacy}","received_events_url":"https://api.github.com/users/BevapDin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566/commits","review_comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566/comments","review_comment_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12566/comments","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/eb88ab34fcb389ddb3e09fe517ad0dd2ffe71633","head":{"label":"DavidKeaton:aim","ref":"aim","sha":"eb88ab34fcb389ddb3e09fe517ad0dd2ffe71633","user":{"login":"DavidKeaton","id":1715605,"avatar_url":"https://avatars.githubusercontent.com/u/1715605?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidKeaton","html_url":"https://github.com/DavidKeaton","followers_url":"https://api.github.com/users/DavidKeaton/followers","following_url":"https://api.github.com/users/DavidKeaton/following{/other_user}","gists_url":"https://api.github.com/users/DavidKeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidKeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidKeaton/subscriptions","organizations_url":"https://api.github.com/users/DavidKeaton/orgs","repos_url":"https://api.github.com/users/DavidKeaton/repos","events_url":"https://api.github.com/users/DavidKeaton/events{/privacy}","received_events_url":"https://api.github.com/users/DavidKeaton/received_events","type":"User","site_admin":false},"repo":{"id":24438862,"name":"Cataclysm-DDA","full_name":"DavidKeaton/Cataclysm-DDA","owner":{"login":"DavidKeaton","id":1715605,"avatar_url":"https://avatars.githubusercontent.com/u/1715605?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidKeaton","html_url":"https://github.com/DavidKeaton","followers_url":"https://api.github.com/users/DavidKeaton/followers","following_url":"https://api.github.com/users/DavidKeaton/following{/other_user}","gists_url":"https://api.github.com/users/DavidKeaton/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidKeaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidKeaton/subscriptions","organizations_url":"https://api.github.com/users/DavidKeaton/orgs","repos_url":"https://api.github.com/users/DavidKeaton/repos","events_url":"https://api.github.com/users/DavidKeaton/events{/privacy}","received_events_url":"https://api.github.com/users/DavidKeaton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavidKeaton/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.","fork":true,"url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA","forks_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/DavidKeaton/Cataclysm-DDA/releases{/id}","created_at":"2014-09-25T01:24:24Z","updated_at":"2015-04-28T04:08:24Z","pushed_at":"2015-07-12T19:44:21Z","git_url":"git://github.com/DavidKeaton/Cataclysm-DDA.git","ssh_url":"git@github.com:DavidKeaton/Cataclysm-DDA.git","clone_url":"https://github.com/DavidKeaton/Cataclysm-DDA.git","svn_url":"https://github.com/DavidKeaton/Cataclysm-DDA","homepage":"http://en.cataclysmdda.com/","size":484820,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"CleverRaven:master","ref":"master","sha":"938936254625f30471c9788657f7c4252459c7b5","user":{"login":"CleverRaven","id":4367009,"avatar_url":"https://avatars.githubusercontent.com/u/4367009?v=3","gravatar_id":"","url":"https://api.github.com/users/CleverRaven","html_url":"https://github.com/CleverRaven","followers_url":"https://api.github.com/users/CleverRaven/followers","following_url":"https://api.github.com/users/CleverRaven/following{/other_user}","gists_url":"https://api.github.com/users/CleverRaven/gists{/gist_id}","starred_url":"https://api.github.com/users/CleverRaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CleverRaven/subscriptions","organizations_url":"https://api.github.com/users/CleverRaven/orgs","repos_url":"https://api.github.com/users/CleverRaven/repos","events_url":"https://api.github.com/users/CleverRaven/events{/privacy}","received_events_url":"https://api.github.com/users/CleverRaven/received_events","type":"Organization","site_admin":false},"repo":{"id":5973855,"name":"Cataclysm-DDA","full_name":"CleverRaven/Cataclysm-DDA","owner":{"login":"CleverRaven","id":4367009,"avatar_url":"https://avatars.githubusercontent.com/u/4367009?v=3","gravatar_id":"","url":"https://api.github.com/users/CleverRaven","html_url":"https://github.com/CleverRaven","followers_url":"https://api.github.com/users/CleverRaven/followers","following_url":"https://api.github.com/users/CleverRaven/following{/other_user}","gists_url":"https://api.github.com/users/CleverRaven/gists{/gist_id}","starred_url":"https://api.github.com/users/CleverRaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CleverRaven/subscriptions","organizations_url":"https://api.github.com/users/CleverRaven/orgs","repos_url":"https://api.github.com/users/CleverRaven/repos","events_url":"https://api.github.com/users/CleverRaven/events{/privacy}","received_events_url":"https://api.github.com/users/CleverRaven/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.","fork":false,"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","forks_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/releases{/id}","created_at":"2012-09-26T22:57:43Z","updated_at":"2015-07-11T09:12:31Z","pushed_at":"2015-07-14T14:18:42Z","git_url":"git://github.com/CleverRaven/Cataclysm-DDA.git","ssh_url":"git@github.com:CleverRaven/Cataclysm-DDA.git","clone_url":"https://github.com/CleverRaven/Cataclysm-DDA.git","svn_url":"https://github.com/CleverRaven/Cataclysm-DDA","homepage":"http://en.cataclysmdda.com/","size":567289,"stargazers_count":695,"watchers_count":695,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":733,"mirror_url":null,"open_issues_count":1015,"forks":733,"open_issues":1015,"watchers":695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/12566"},"issue":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12566"},"comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12566/comments"},"review_comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566/comments"},"review_comment":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/12566/commits"},"statuses":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/eb88ab34fcb389ddb3e09fe517ad0dd2ffe71633"}}}}