{"action":"created","comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/85720838","pull_request_review_id":6419109,"id":85720838,"diff_hunk":"@@ -231,6 +231,110 @@ item_location game::inv_for_gunmod( const item &gunmod, const std::string &title\n                          title, -1, _( \"You don't have any guns to modify.\" ) );\n }\n \n+class read_inventory_preset: public inventory_selector_preset\n+{\n+    public:\n+        read_inventory_preset( const player &p ) : p( p ) {\n+            static const std::string unknown( _( \"<color_dkgray>?</color>\" ) );\n+            static const std::string martial_arts( _( \"martial arts\" ) );\n+\n+            append_cell( [ this, &p ]( const item_location & loc ) -> std::string {\n+                if( loc->type->can_use( \"MA_MANUAL\" ) ) {\n+                    return martial_arts;\n+                }\n+                if( !is_known( loc ) ) {\n+                    return unknown;\n+                }\n+                const auto &book = get_book( loc );\n+                if( book.skill && p.get_skill_level( book.skill ).can_train() ) {\n+                    return string_format( _( \"%s to %d\" ), book.skill->name().c_str(), book.level );\n+                }\n+                return std::string();\n+            }, _( \"TRAINS\" ), unknown );\n+\n+            append_cell( [ this ]( const item_location & loc ) -> std::string {","path":"src/game_inventory.cpp","position":25,"original_position":25,"commit_id":"d386b91f7c20a6106d5de0811fd459f3894a9368","original_commit_id":"fe6b4aec09bde9d6e5d1f1083935d5501bd5b3e2","user":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"body":"Sounds like a classic C++ error","created_at":"2016-10-31T11:21:18Z","updated_at":"2016-10-31T11:21:19Z","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996#discussion_r85720838","pull_request_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996","_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/85720838"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996#discussion_r85720838"},"pull_request":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996"}}},"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996","id":91391683,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996.patch","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18996","number":18996,"state":"open","locked":false,"title":"[CR] Customize book reading menu + generic menu tweaks","user":{"login":"codemime","id":11905613,"avatar_url":"https://avatars.githubusercontent.com/u/11905613?v=3","gravatar_id":"","url":"https://api.github.com/users/codemime","html_url":"https://github.com/codemime","followers_url":"https://api.github.com/users/codemime/followers","following_url":"https://api.github.com/users/codemime/following{/other_user}","gists_url":"https://api.github.com/users/codemime/gists{/gist_id}","starred_url":"https://api.github.com/users/codemime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemime/subscriptions","organizations_url":"https://api.github.com/users/codemime/orgs","repos_url":"https://api.github.com/users/codemime/repos","events_url":"https://api.github.com/users/codemime/events{/privacy}","received_events_url":"https://api.github.com/users/codemime/received_events","type":"User","site_admin":false},"body":"Follows #18514.\n\n**Low resolution:**\n![small](https://cloud.githubusercontent.com/assets/11905613/19809696/6f7b6a30-9d3b-11e6-8adb-1ffa05259c87.png)\n\n**Hight resolution:**\n![big](https://cloud.githubusercontent.com/assets/11905613/19809245/853e6c66-9d39-11e6-9594-87a9821bfd0d.png)\n\nUnknown properties (books aren't identified) are shown as question marks. Additional cells are shown only when they contain some useful information.\n\n![01](https://cloud.githubusercontent.com/assets/11905613/19809253/91bd60d2-9d39-11e6-8a71-140b4ce1a201.png)\n![02](https://cloud.githubusercontent.com/assets/11905613/19809300/c5f323aa-9d39-11e6-82d8-4e611abf5089.png)\n![03](https://cloud.githubusercontent.com/assets/11905613/19809301/c90e094c-9d39-11e6-9e3a-2516a5514c22.png)\n\n**This shows in dynamic how cells get scaled (synthetic example):**\n![01](https://cloud.githubusercontent.com/assets/11905613/19809326/eb5ff6a4-9d39-11e6-9902-d3b251ba895d.gif)\n\nIf reading takes longer than it should (due to lack of intelligence), time to read one chapter becomes light red. Note that the menu always shows the actual times (there's a discrepancy with item description which shows \"theoretical\" times. I guess the descriptions should be fixed as well).\n\n![04](https://cloud.githubusercontent.com/assets/11905613/19810339/21d3a286-9d3e-11e6-8a2d-134f8f5d529a.png)\n\nThis PR also:\n- fixes [the minor issues](https://github.com/CleverRaven/Cataclysm-DDA/pull/18514#issuecomment-256739578) mentioned in #18514 (see https://github.com/CleverRaven/Cataclysm-DDA/commit/43d9488aedc2bf8a696b97356522ccf27725efc8)\n- updates keybinding descriptions (see https://github.com/CleverRaven/Cataclysm-DDA/commit/22af7f85de0f16f5de2a4a279f5d173946951094). \n","created_at":"2016-10-28T14:29:22Z","updated_at":"2016-10-31T11:21:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efc474673a3990b10131e317f2422ba5b478c61f","assignee":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"assignees":[{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996/commits","review_comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996/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/18996/comments","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/d386b91f7c20a6106d5de0811fd459f3894a9368","head":{"label":"codemime:ref_inv_n6","ref":"ref_inv_n6","sha":"d386b91f7c20a6106d5de0811fd459f3894a9368","user":{"login":"codemime","id":11905613,"avatar_url":"https://avatars.githubusercontent.com/u/11905613?v=3","gravatar_id":"","url":"https://api.github.com/users/codemime","html_url":"https://github.com/codemime","followers_url":"https://api.github.com/users/codemime/followers","following_url":"https://api.github.com/users/codemime/following{/other_user}","gists_url":"https://api.github.com/users/codemime/gists{/gist_id}","starred_url":"https://api.github.com/users/codemime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemime/subscriptions","organizations_url":"https://api.github.com/users/codemime/orgs","repos_url":"https://api.github.com/users/codemime/repos","events_url":"https://api.github.com/users/codemime/events{/privacy}","received_events_url":"https://api.github.com/users/codemime/received_events","type":"User","site_admin":false},"repo":{"id":50468318,"name":"Cataclysm-DDA","full_name":"codemime/Cataclysm-DDA","owner":{"login":"codemime","id":11905613,"avatar_url":"https://avatars.githubusercontent.com/u/11905613?v=3","gravatar_id":"","url":"https://api.github.com/users/codemime","html_url":"https://github.com/codemime","followers_url":"https://api.github.com/users/codemime/followers","following_url":"https://api.github.com/users/codemime/following{/other_user}","gists_url":"https://api.github.com/users/codemime/gists{/gist_id}","starred_url":"https://api.github.com/users/codemime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemime/subscriptions","organizations_url":"https://api.github.com/users/codemime/orgs","repos_url":"https://api.github.com/users/codemime/repos","events_url":"https://api.github.com/users/codemime/events{/privacy}","received_events_url":"https://api.github.com/users/codemime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codemime/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.","fork":true,"url":"https://api.github.com/repos/codemime/Cataclysm-DDA","forks_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/releases{/id}","deployments_url":"https://api.github.com/repos/codemime/Cataclysm-DDA/deployments","created_at":"2016-01-27T00:03:47Z","updated_at":"2016-01-27T00:03:54Z","pushed_at":"2016-10-31T11:07:32Z","git_url":"git://github.com/codemime/Cataclysm-DDA.git","ssh_url":"git@github.com:codemime/Cataclysm-DDA.git","clone_url":"https://github.com/codemime/Cataclysm-DDA.git","svn_url":"https://github.com/codemime/Cataclysm-DDA","homepage":"http://en.cataclysmdda.com/","size":810491,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"CleverRaven:master","ref":"master","sha":"f0cefe27f2864601254f013a805a64887a1bdf34","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}","deployments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/deployments","created_at":"2012-09-26T22:57:43Z","updated_at":"2016-10-28T13:42:05Z","pushed_at":"2016-10-31T11:07:33Z","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":1091095,"stargazers_count":1126,"watchers_count":1126,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":978,"mirror_url":null,"open_issues_count":1311,"forks":978,"open_issues":1311,"watchers":1126,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18996"},"issue":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18996"},"comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18996/comments"},"review_comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18996/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/18996/commits"},"statuses":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/d386b91f7c20a6106d5de0811fd459f3894a9368"}}}}
{"actor":{"display_login":"mugling"}}