{"action":"opened","number":25169,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25169","id":211037241,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDM3MjQx","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25169","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25169.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25169.patch","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25169","number":25169,"state":"open","locked":false,"title":"Add workaround for active item activity.targets","user":{"login":"alanbrady","id":60370,"node_id":"MDQ6VXNlcjYwMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/60370?v=4","gravatar_id":"","url":"https://api.github.com/users/alanbrady","html_url":"https://github.com/alanbrady","followers_url":"https://api.github.com/users/alanbrady/followers","following_url":"https://api.github.com/users/alanbrady/following{/other_user}","gists_url":"https://api.github.com/users/alanbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/alanbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanbrady/subscriptions","organizations_url":"https://api.github.com/users/alanbrady/orgs","repos_url":"https://api.github.com/users/alanbrady/repos","events_url":"https://api.github.com/users/alanbrady/events{/privacy}","received_events_url":"https://api.github.com/users/alanbrady/received_events","type":"User","site_admin":false},"body":"#### Summary\r\nSUMMARY: Bugfixes \"Add workaround for reloading cold water\"\r\n\r\n#### Purpose of change\r\nThis adds a workaround to #25076.  The problem is activity.targets is using an item_location to reference items between turns.  This is bad and breaks horrifically when active items are getting processed because the pointer gets destroyed.\r\n\r\n#### Describe the solution\r\nThis workaround prevents processing items that are being using for an activity in the normal way and instead uses a way that doesn't break the item_location reference.  This isn't pretty or elegant, but it gets the job done.\r\n\r\n#### Describe alternatives you've considered\r\nI want to fix this in a better way because this is gross.  You could probably find prettier solutions here, but what really needs to happen is activity.targets gets refactored into something less broken that doesn't rely on a pointer.  What would be a really sweet solution would be UUIDs for activity relationships but that requires a good chunk of code and a whole lot of testing.  We're on the brink of 0.D people, let's not break everything.  I do plan on personally undertaking such an task, but for now there are other, more broken, things that can fixed.\r\n\r\n#### Additional context\r\nhttps://github.com/CleverRaven/Cataclysm-DDA/issues/19437 was the last discussion on UUIDs.  I think I have a pretty good understanding of what Kevin has in mind if we do something like UUIDs, so I am optimistic.\r\nhttps://github.com/CleverRaven/Cataclysm-DDA/pull/24228 made items able to be frozen which causes them to be triggered for active processing.","created_at":"2018-08-27T08:14:06Z","updated_at":"2018-08-27T08:14:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25169/commits","review_comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25169/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/25169/comments","statuses_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/cbd309643744ab7369bdf7aaf2ec62191c438d8d","head":{"label":"alanbrady:active-item-hack","ref":"active-item-hack","sha":"cbd309643744ab7369bdf7aaf2ec62191c438d8d","user":{"login":"alanbrady","id":60370,"node_id":"MDQ6VXNlcjYwMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/60370?v=4","gravatar_id":"","url":"https://api.github.com/users/alanbrady","html_url":"https://github.com/alanbrady","followers_url":"https://api.github.com/users/alanbrady/followers","following_url":"https://api.github.com/users/alanbrady/following{/other_user}","gists_url":"https://api.github.com/users/alanbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/alanbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanbrady/subscriptions","organizations_url":"https://api.github.com/users/alanbrady/orgs","repos_url":"https://api.github.com/users/alanbrady/repos","events_url":"https://api.github.com/users/alanbrady/events{/privacy}","received_events_url":"https://api.github.com/users/alanbrady/received_events","type":"User","site_admin":false},"repo":{"id":134346330,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQzNDYzMzA=","name":"Cataclysm-DDA","full_name":"alanbrady/Cataclysm-DDA","owner":{"login":"alanbrady","id":60370,"node_id":"MDQ6VXNlcjYwMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/60370?v=4","gravatar_id":"","url":"https://api.github.com/users/alanbrady","html_url":"https://github.com/alanbrady","followers_url":"https://api.github.com/users/alanbrady/followers","following_url":"https://api.github.com/users/alanbrady/following{/other_user}","gists_url":"https://api.github.com/users/alanbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/alanbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanbrady/subscriptions","organizations_url":"https://api.github.com/users/alanbrady/orgs","repos_url":"https://api.github.com/users/alanbrady/repos","events_url":"https://api.github.com/users/alanbrady/events{/privacy}","received_events_url":"https://api.github.com/users/alanbrady/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alanbrady/Cataclysm-DDA","description":"Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.","fork":true,"url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA","forks_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/forks","keys_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/teams","hooks_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/hooks","issue_events_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/issues/events{/number}","events_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/events","assignees_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/assignees{/user}","branches_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/branches{/branch}","tags_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/tags","blobs_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/git/refs{/sha}","trees_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/statuses/{sha}","languages_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/languages","stargazers_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/stargazers","contributors_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/contributors","subscribers_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/subscribers","subscription_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/subscription","commits_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/commits{/sha}","git_commits_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/git/commits{/sha}","comments_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/comments{/number}","issue_comment_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/issues/comments{/number}","contents_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/contents/{+path}","compare_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/merges","archive_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/downloads","issues_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/issues{/number}","pulls_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/pulls{/number}","milestones_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/milestones{/number}","notifications_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/labels{/name}","releases_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/releases{/id}","deployments_url":"https://api.github.com/repos/alanbrady/Cataclysm-DDA/deployments","created_at":"2018-05-22T01:56:00Z","updated_at":"2018-08-26T21:26:34Z","pushed_at":"2018-08-27T07:52:07Z","git_url":"git://github.com/alanbrady/Cataclysm-DDA.git","ssh_url":"git@github.com:alanbrady/Cataclysm-DDA.git","clone_url":"https://github.com/alanbrady/Cataclysm-DDA.git","svn_url":"https://github.com/alanbrady/Cataclysm-DDA","homepage":"http://cataclysmdda.org","size":1287550,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"CleverRaven:master","ref":"master","sha":"b7cb44c51bad52fcc18fd8fd1eabd99bda2cef85","user":{"login":"CleverRaven","id":4367009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjcwMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/4367009?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1OTczODU1","name":"Cataclysm-DDA","full_name":"CleverRaven/Cataclysm-DDA","owner":{"login":"CleverRaven","id":4367009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjcwMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/4367009?v=4","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 turn-based survival game set in a post-apocalyptic world.","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":"2018-08-27T08:03:57Z","pushed_at":"2018-08-27T07:27:53Z","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://cataclysmdda.org","size":1287618,"stargazers_count":2055,"watchers_count":2055,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1390,"mirror_url":null,"archived":false,"open_issues_count":947,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1390,"open_issues":947,"watchers":2055,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25169"},"html":{"href":"https://github.com/CleverRaven/Cataclysm-DDA/pull/25169"},"issue":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25169"},"comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/25169/comments"},"review_comments":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/25169/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/25169/commits"},"statuses":{"href":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/statuses/cbd309643744ab7369bdf7aaf2ec62191c438d8d"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":35,"deletions":15,"changed_files":1}}
{"actor":{"display_login":"alanbrady"}}