{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/10846","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/10846/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/10846/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/10846/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/10846","id":54105672,"number":10846,"title":"Light player_activity refactor","user":{"login":"bdholder","id":3722565,"avatar_url":"https://avatars.githubusercontent.com/u/3722565?v=3","gravatar_id":"","url":"https://api.github.com/users/bdholder","html_url":"https://github.com/bdholder","followers_url":"https://api.github.com/users/bdholder/followers","following_url":"https://api.github.com/users/bdholder/following{/other_user}","gists_url":"https://api.github.com/users/bdholder/gists{/gist_id}","starred_url":"https://api.github.com/users/bdholder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdholder/subscriptions","organizations_url":"https://api.github.com/users/bdholder/orgs","repos_url":"https://api.github.com/users/bdholder/repos","events_url":"https://api.github.com/users/bdholder/events{/privacy}","received_events_url":"https://api.github.com/users/bdholder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-12T20:57:37Z","updated_at":"2015-01-16T01:49:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/10846","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/10846","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/10846.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/10846.patch"},"body":"With the aim of cleaning up game.h/cpp and setting the stage for eventual implementation of player_activity polymorphism, most functions dealing with executing player activities have been pulled out of game.cpp and a couple of other files, given consistent names and made private member functions of player_activity.\r\n\r\nI originally planned to actually implement inheritance from player_activity (hence \"light\"), but at present there are several obstacles to doing so, the most difficult of which is the issue of serialization. Serializing objects via polymorphic pointers is a nontrivial task and one which the current serialization mechanisms do not support.\r\n\r\nBoost contains a serialization library which appears sufficient to answer our purposes, and using it seems to me greatly preferable to reimplementing such functionality, but the decision of if/when to use it is not mine to make and I didn't want to waste a lot of effort on it only to have it rejected.\r\n\r\nAt the very least, this refactor is a step toward encapsulation and modularity."},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/70196488","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/10846#issuecomment-70196488","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/10846","id":70196488,"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},"created_at":"2015-01-16T01:49:19Z","updated_at":"2015-01-16T01:49:19Z","body":"Ah thanks."}}