{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/5619","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/5619/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/5619/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/5619/events","html_url":"https://github.com/minetest/minetest/pull/5619","id":222960098,"number":5619,"title":"Add on_flood() callback.","user":{"login":"sofar","id":1880041,"avatar_url":"https://avatars2.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":[{"id":73368983,"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Script%20API","name":"@ Script API","color":"009800","default":false},{"id":73368921,"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Server%20/%20Client%20/%20Env.","name":"@ Server / Client / Env.","color":"009800","default":false},{"id":471238548,"url":"https://api.github.com/repos/minetest/minetest/labels/Feature","name":"Feature","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/minetest/minetest/milestones/8","html_url":"https://github.com/minetest/minetest/milestone/8","labels_url":"https://api.github.com/repos/minetest/minetest/milestones/8/labels","id":2252366,"number":8,"title":"0.4.16","description":"","creator":{"login":"est31","id":8872119,"avatar_url":"https://avatars1.githubusercontent.com/u/8872119?v=3","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":26,"state":"open","created_at":"2017-01-15T04:12:46Z","updated_at":"2017-04-20T06:16:23Z","due_on":"2017-05-21T07:00:00Z","closed_at":null},"comments":6,"created_at":"2017-04-20T06:16:23Z","updated_at":"2017-04-20T14:22:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/5619","html_url":"https://github.com/minetest/minetest/pull/5619","diff_url":"https://github.com/minetest/minetest/pull/5619.diff","patch_url":"https://github.com/minetest/minetest/pull/5619.patch"},"body":"This callback is called if a liquid definitely floods a non-air\r\nnode on the map. The callback arguments are `(pos, oldnode, newnode)`\r\nand can return a `bool` value indicating whether flooding the\r\nnode should be cancelled (`return true` will prevent the node\r\nfrom flooding).\r\n\r\nDocumentation is added, the callback function was tested with a\r\nmodified minetest_game.\r\n\r\nNote that `return true` will likely cause the node's `on_flood()`\r\ncallback to be called every second until the node gets removed,\r\nso care must be taken to prevent many callbacks from using this\r\nreturn value. The current default liquid update interval is 1.0\r\nseconds, which isn't unmanageable.\r\n\r\nThe larger aim of this patch is to remove the lava cooling ABM,\r\nwhich is a significant cost to idle servers that have lava on their\r\nmap. This callback will be much more efficient."},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/295756029","html_url":"https://github.com/minetest/minetest/pull/5619#issuecomment-295756029","issue_url":"https://api.github.com/repos/minetest/minetest/issues/5619","id":295756029,"user":{"login":"paramat","id":3686677,"avatar_url":"https://avatars3.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},"created_at":"2017-04-20T14:22:52Z","updated_at":"2017-04-20T14:22:52Z","body":"Good to see this being done at last.\r\nCould you explain the usage of 'return true' stopping the node being flooded? I can only see this causing unending repeated callbacks, which should be avoided, how would we avoid this if the node is not flooded?"}}
{"actor":{"display_login":"paramat"}}