{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14870","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14870/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14870/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14870/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14870","id":127046241,"number":14870,"title":"Hands free mechanics","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-01-16T19:06:14Z","updated_at":"2016-01-17T16:27:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/14870","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14870","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14870.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14870.patch"},"body":"This PR follows #14217 and aims to consolidate duplicated code handling inventory overflow. It also lays the groundwork for the mechanics described at http://smf.cataclysmdda.com/index.php?topic=10444.0\r\n\r\n> get stricter about tracking how many free hands you have to perform actions, and **automatically** perform the actions needed ... You may notice this sort of thing will \"waste\" some time by performing unnecessary actions sometimes, for example maybe you want to light and throw several sticks of dynamite in a row, in that case you'll want to holster the gun first to avoid triggering the item swapping stuff.\r\n\r\nThis PR provides a mechanism for the first part of the above scenario (free hands by dropping, stashing or holstering the wielded item). It is marked [CR] as the next step is to determine in what circumstances we **automatically** choose on behalf of the player (holster vs drop etc).\r\n\r\nOne possible option is to allow the player to select the preferred holster for an item and automatically select this if available? Similarly wearable items could have an `autowear` option that can be set from the item menu (similar to `autopickup`)? "},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/172347060","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/14870#issuecomment-172347060","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/14870","id":172347060,"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},"created_at":"2016-01-17T16:27:21Z","updated_at":"2016-01-17T16:27:21Z","body":"> By the way, if you're not using any player methods, it would be nice to put the new methods in Character class, to help with the eventual, long-term split of npc and player.\r\n\r\n`player::can_wield()` requires `player::has_two_arms()` so will move the latter function in a separate PR"}}