{"action":"created","comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/80802253","pull_request_review_id":1831956,"id":80802253,"diff_hunk":"@@ -12942,13 +12942,9 @@ void player::assign_activity( const player_activity &act, bool allow_resume )\n     activity.warned_of_proximity = false;\n }\n \n-bool player::has_activity(const activity_type type) const\n+bool player::has_activity(const string_id<activity_type> type) const","path":"src/player.cpp","position":139,"original_position":139,"commit_id":"6d2610b31ce7c1d4b801e108405791fc82955fc1","original_commit_id":"6d2610b31ce7c1d4b801e108405791fc82955fc1","user":{"login":"Coolthulhu","id":1878860,"avatar_url":"https://avatars.githubusercontent.com/u/1878860?v=3","gravatar_id":"","url":"https://api.github.com/users/Coolthulhu","html_url":"https://github.com/Coolthulhu","followers_url":"https://api.github.com/users/Coolthulhu/followers","following_url":"https://api.github.com/users/Coolthulhu/following{/other_user}","gists_url":"https://api.github.com/users/Coolthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Coolthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coolthulhu/subscriptions","organizations_url":"https://api.github.com/users/Coolthulhu/orgs","repos_url":"https://api.github.com/users/Coolthulhu/repos","events_url":"https://api.github.com/users/Coolthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/Coolthulhu/received_events","type":"User","site_admin":false},"body":"Would be better to create an alias like `using activity_id = string_id<activity_type>;` in the header that declares activities.","created_at":"2016-09-27T21:42:26Z","updated_at":"2016-09-27T21:42:27Z","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540#discussion_r80802253","pull_request_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540","_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/comments/80802253"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540#discussion_r80802253"},"pull_request":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540"}}},"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540","id":86838682,"html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540.patch","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18540","number":18540,"state":"open","locked":false,"title":"[WIP]JSONize and extensively refactor player activities (Part 1)","user":{"login":"sethsimon","id":16765166,"avatar_url":"https://avatars.githubusercontent.com/u/16765166?v=3","gravatar_id":"","url":"https://api.github.com/users/sethsimon","html_url":"https://github.com/sethsimon","followers_url":"https://api.github.com/users/sethsimon/followers","following_url":"https://api.github.com/users/sethsimon/following{/other_user}","gists_url":"https://api.github.com/users/sethsimon/gists{/gist_id}","starred_url":"https://api.github.com/users/sethsimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethsimon/subscriptions","organizations_url":"https://api.github.com/users/sethsimon/orgs","repos_url":"https://api.github.com/users/sethsimon/repos","events_url":"https://api.github.com/users/sethsimon/events{/privacy}","received_events_url":"https://api.github.com/users/sethsimon/received_events","type":"User","site_admin":false},"body":"This is very WIP, but feel free to comment on the big picture if you want.\r\n\r\nThis PR introduced an `activity_type` class that stores:\r\n- The activity type (in `string_id<activity_type>` AKA `activity_id` form)\r\n- Whether progress is made based on speed, time, or neither\r\n- The stop message\r\n- Rooted or not? (recoil decreases, and tree mutants sink their soil into the dirt)\r\n- etc.\r\n- TODO: I think `autoresume` can go here \r\n\r\nAll of the above is read from the new `data/json/player_activities.json` file. Note that I also plan to update the linting rules and `doc/PLAYER_ACTIVITY.md` in this PR.\r\n\r\nFor now (because the diff is already pretty big), the `activity_handlers` namespace contains `do_turn` functions, a mapping from an `activity_id` to its `do_turn` function, `finish` functions, and a mapping from an `activity_id` to its `finish` function. \r\n\r\nIn Part 2, I plan to make `activity_handlers` into a pure virtual class, from which classes such as `reload_activity_actor` are derived. That would allow an activity could store whatever variables it wants- For example, `ACT_READ` could use an `int` instead of an `item_location` to store where the book is. Furthermore, it could have its own functions too! However, because it would make it harder to check for correctness,  I don't plan to change variable types or introduce new functions until PRs following Part 2.","created_at":"2016-09-26T23:36:14Z","updated_at":"2016-09-27T21:42:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ddc7b9158850f70174f30c7c2a4a2de33d7b3be","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540/commits","review_comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540/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/18540/comments","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/6d2610b31ce7c1d4b801e108405791fc82955fc1","head":{"label":"sethsimon:json_activity","ref":"json_activity","sha":"6d2610b31ce7c1d4b801e108405791fc82955fc1","user":{"login":"sethsimon","id":16765166,"avatar_url":"https://avatars.githubusercontent.com/u/16765166?v=3","gravatar_id":"","url":"https://api.github.com/users/sethsimon","html_url":"https://github.com/sethsimon","followers_url":"https://api.github.com/users/sethsimon/followers","following_url":"https://api.github.com/users/sethsimon/following{/other_user}","gists_url":"https://api.github.com/users/sethsimon/gists{/gist_id}","starred_url":"https://api.github.com/users/sethsimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethsimon/subscriptions","organizations_url":"https://api.github.com/users/sethsimon/orgs","repos_url":"https://api.github.com/users/sethsimon/repos","events_url":"https://api.github.com/users/sethsimon/events{/privacy}","received_events_url":"https://api.github.com/users/sethsimon/received_events","type":"User","site_admin":false},"repo":{"id":49901003,"name":"Cataclysm-DDA","full_name":"sethsimon/Cataclysm-DDA","owner":{"login":"sethsimon","id":16765166,"avatar_url":"https://avatars.githubusercontent.com/u/16765166?v=3","gravatar_id":"","url":"https://api.github.com/users/sethsimon","html_url":"https://github.com/sethsimon","followers_url":"https://api.github.com/users/sethsimon/followers","following_url":"https://api.github.com/users/sethsimon/following{/other_user}","gists_url":"https://api.github.com/users/sethsimon/gists{/gist_id}","starred_url":"https://api.github.com/users/sethsimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethsimon/subscriptions","organizations_url":"https://api.github.com/users/sethsimon/orgs","repos_url":"https://api.github.com/users/sethsimon/repos","events_url":"https://api.github.com/users/sethsimon/events{/privacy}","received_events_url":"https://api.github.com/users/sethsimon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sethsimon/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.","fork":true,"url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA","forks_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/releases{/id}","deployments_url":"https://api.github.com/repos/sethsimon/Cataclysm-DDA/deployments","created_at":"2016-01-18T19:48:59Z","updated_at":"2016-01-18T19:49:08Z","pushed_at":"2016-09-26T23:08:04Z","git_url":"git://github.com/sethsimon/Cataclysm-DDA.git","ssh_url":"git@github.com:sethsimon/Cataclysm-DDA.git","clone_url":"https://github.com/sethsimon/Cataclysm-DDA.git","svn_url":"https://github.com/sethsimon/Cataclysm-DDA","homepage":"http://en.cataclysmdda.com/","size":796926,"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":"df8fa67fa574dc67c6f213812038ecde28b1ff73","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-09-27T12:31:05Z","pushed_at":"2016-09-27T21:35:41Z","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":1083452,"stargazers_count":1083,"watchers_count":1083,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":965,"mirror_url":null,"open_issues_count":1276,"forks":965,"open_issues":1276,"watchers":1083,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/18540"},"issue":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18540"},"comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/18540/comments"},"review_comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/18540/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/18540/commits"},"statuses":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/6d2610b31ce7c1d4b801e108405791fc82955fc1"}}}}
{"actor":{"display_login":"Coolthulhu"}}