{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest_game/issues/911","repository_url":"https://api.github.com/repos/minetest/minetest_game","labels_url":"https://api.github.com/repos/minetest/minetest_game/issues/911/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest_game/issues/911/comments","events_url":"https://api.github.com/repos/minetest/minetest_game/issues/911/events","html_url":"https://github.com/minetest/minetest_game/pull/911","id":140357785,"number":911,"title":"Allow both sides of the bed to be digged up.","user":{"login":"sofar","id":1880041,"avatar_url":"https://avatars.githubusercontent.com/u/1880041?v=3","gravatar_id":"","url":"https://api.github.com/users/sofar","html_url":"https://github.com/sofar","followers_url":"https://api.github.com/users/sofar/followers","following_url":"https://api.github.com/users/sofar/following{/other_user}","gists_url":"https://api.github.com/users/sofar/gists{/gist_id}","starred_url":"https://api.github.com/users/sofar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sofar/subscriptions","organizations_url":"https://api.github.com/users/sofar/orgs","repos_url":"https://api.github.com/users/sofar/repos","events_url":"https://api.github.com/users/sofar/events{/privacy}","received_events_url":"https://api.github.com/users/sofar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minetest/minetest_game/labels/One%20approval","name":"One approval","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/minetest/minetest_game/milestones/1","html_url":"https://github.com/minetest/minetest_game/milestones/0.4.14","labels_url":"https://api.github.com/repos/minetest/minetest_game/milestones/1/labels","id":1618907,"number":1,"title":"0.4.14","description":"","creator":{"login":"paramat","id":3686677,"avatar_url":"https://avatars.githubusercontent.com/u/3686677?v=3","gravatar_id":"","url":"https://api.github.com/users/paramat","html_url":"https://github.com/paramat","followers_url":"https://api.github.com/users/paramat/followers","following_url":"https://api.github.com/users/paramat/following{/other_user}","gists_url":"https://api.github.com/users/paramat/gists{/gist_id}","starred_url":"https://api.github.com/users/paramat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paramat/subscriptions","organizations_url":"https://api.github.com/users/paramat/orgs","repos_url":"https://api.github.com/users/paramat/repos","events_url":"https://api.github.com/users/paramat/events{/privacy}","received_events_url":"https://api.github.com/users/paramat/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":22,"state":"open","created_at":"2016-03-02T21:48:39Z","updated_at":"2016-03-15T16:43:02Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-03-12T07:30:07Z","updated_at":"2016-03-16T13:55:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minetest/minetest_game/pulls/911","html_url":"https://github.com/minetest/minetest_game/pull/911","diff_url":"https://github.com/minetest/minetest_game/pull/911.diff","patch_url":"https://github.com/minetest/minetest_game/pull/911.patch"},"body":"Tested with nodebreaker, fire.\r\n\r\nIf called from lua, minetest.remove_node() calls on_destruct() callbacks\r\nbefore the map is actually updated. This means that we can't look at the\r\nmap data to determine if we're done cleaning up adjacent nodes, and we\r\nhave to stop recursing some other way.\r\n\r\nThere's no data we can pass around through functions that would survive\r\nscope to a secondary on_destruct() callback, so we have to maintain\r\nlocal state somewhere in the mod namespace.\r\n\r\nIn this case, we keep a bitflag. The bitflag is set to \"true\" by\r\ndefault. On the first half removal, the flag is flipped and afterwards\r\nwe remove the other half node. When the on_destruct for the other half\r\nis running, it's value is false and we flip it back to true without\r\nremoving the other half node.\r\n\r\nThis thus prevents recursing.\r\n\r\nTo facilitate easier finding of the bed partner, we tell our on_destruct\r\nwhether we're a top or bottom half node through a passed flag.\r\n\r\nNow that the top is diggable, we just need to assure that it drops a\r\nbottom bed part."},"comment":{"url":"https://api.github.com/repos/minetest/minetest_game/issues/comments/197342586","html_url":"https://github.com/minetest/minetest_game/pull/911#issuecomment-197342586","issue_url":"https://api.github.com/repos/minetest/minetest_game/issues/911","id":197342586,"user":{"login":"Ekdohibs","id":2923554,"avatar_url":"https://avatars.githubusercontent.com/u/2923554?v=3","gravatar_id":"","url":"https://api.github.com/users/Ekdohibs","html_url":"https://github.com/Ekdohibs","followers_url":"https://api.github.com/users/Ekdohibs/followers","following_url":"https://api.github.com/users/Ekdohibs/following{/other_user}","gists_url":"https://api.github.com/users/Ekdohibs/gists{/gist_id}","starred_url":"https://api.github.com/users/Ekdohibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ekdohibs/subscriptions","organizations_url":"https://api.github.com/users/Ekdohibs/orgs","repos_url":"https://api.github.com/users/Ekdohibs/repos","events_url":"https://api.github.com/users/Ekdohibs/events{/privacy}","received_events_url":"https://api.github.com/users/Ekdohibs/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T13:55:50Z","updated_at":"2016-03-16T13:55:50Z","body":":+1: now."}}