{"action":"closed","number":1778,"pull_request":{"url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778","id":198747337,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NzQ3MzM3","html_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/1778","diff_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/1778.diff","patch_url":"https://github.com/scp-fs2open/fs2open.github.com/pull/1778.patch","issue_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/1778","number":1778,"state":"closed","locked":false,"title":"Add more generic scripting callback system","user":{"login":"asarium","id":1013983,"node_id":"MDQ6VXNlcjEwMTM5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/1013983?v=4","gravatar_id":"","url":"https://api.github.com/users/asarium","html_url":"https://github.com/asarium","followers_url":"https://api.github.com/users/asarium/followers","following_url":"https://api.github.com/users/asarium/following{/other_user}","gists_url":"https://api.github.com/users/asarium/gists{/gist_id}","starred_url":"https://api.github.com/users/asarium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asarium/subscriptions","organizations_url":"https://api.github.com/users/asarium/orgs","repos_url":"https://api.github.com/users/asarium/repos","events_url":"https://api.github.com/users/asarium/events{/privacy}","received_events_url":"https://api.github.com/users/asarium/received_events","type":"User","site_admin":false},"body":"The current scripting hook is pretty simple and straight forward but it\r\nmakes a couple of scripting applications harder to implement than\r\nneeded.\r\n\r\nFor example, a lot of scripts need to do some work every frame\r\nfor all or some objects. The script needs to manage an internal list of\r\nall the objects that are affected by that list which includes removing\r\ninvalid objects to conserve resources. This effectively mirrors what the\r\nengine already does and adds unnecessary overhead.\r\n\r\nIn these changes I added a generic event system which can be used by any\r\npart of the code for providing callbacks when a specific event occurs.\r\nAs an example, I added hooks for the pre- and post-move events to the\r\nobject class which are called before and after physics are applied to an\r\nobject.\r\n\r\nI integrated that feature into the scripting system so now a script can\r\nsimply register a function as a callback which will be called whenever\r\nthe target event is executed.","created_at":"2018-07-02T17:45:57Z","updated_at":"2018-07-05T22:13:03Z","closed_at":"2018-07-05T22:13:03Z","merged_at":"2018-07-05T22:13:03Z","merge_commit_sha":"646fb64c2fe9c63f3490792ccfa4061430405471","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":25393635,"node_id":"MDU6TGFiZWwyNTM5MzYzNQ==","url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778/commits","review_comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778/comments","review_comment_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/1778/comments","statuses_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/9651e7dca6cf6c3fa30e5e12577d5d27551e255f","head":{"label":"asarium:feature/scriptingCallbacks","ref":"feature/scriptingCallbacks","sha":"9651e7dca6cf6c3fa30e5e12577d5d27551e255f","user":{"login":"asarium","id":1013983,"node_id":"MDQ6VXNlcjEwMTM5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/1013983?v=4","gravatar_id":"","url":"https://api.github.com/users/asarium","html_url":"https://github.com/asarium","followers_url":"https://api.github.com/users/asarium/followers","following_url":"https://api.github.com/users/asarium/following{/other_user}","gists_url":"https://api.github.com/users/asarium/gists{/gist_id}","starred_url":"https://api.github.com/users/asarium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asarium/subscriptions","organizations_url":"https://api.github.com/users/asarium/orgs","repos_url":"https://api.github.com/users/asarium/repos","events_url":"https://api.github.com/users/asarium/events{/privacy}","received_events_url":"https://api.github.com/users/asarium/received_events","type":"User","site_admin":false},"repo":{"id":9516399,"node_id":"MDEwOlJlcG9zaXRvcnk5NTE2Mzk5","name":"fs2open.github.com","full_name":"asarium/fs2open.github.com","owner":{"login":"asarium","id":1013983,"node_id":"MDQ6VXNlcjEwMTM5ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/1013983?v=4","gravatar_id":"","url":"https://api.github.com/users/asarium","html_url":"https://github.com/asarium","followers_url":"https://api.github.com/users/asarium/followers","following_url":"https://api.github.com/users/asarium/following{/other_user}","gists_url":"https://api.github.com/users/asarium/gists{/gist_id}","starred_url":"https://api.github.com/users/asarium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asarium/subscriptions","organizations_url":"https://api.github.com/users/asarium/orgs","repos_url":"https://api.github.com/users/asarium/repos","events_url":"https://api.github.com/users/asarium/events{/privacy}","received_events_url":"https://api.github.com/users/asarium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asarium/fs2open.github.com","description":"Origin Repository for SCP FreeSpace 2 Open","fork":true,"url":"https://api.github.com/repos/asarium/fs2open.github.com","forks_url":"https://api.github.com/repos/asarium/fs2open.github.com/forks","keys_url":"https://api.github.com/repos/asarium/fs2open.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asarium/fs2open.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asarium/fs2open.github.com/teams","hooks_url":"https://api.github.com/repos/asarium/fs2open.github.com/hooks","issue_events_url":"https://api.github.com/repos/asarium/fs2open.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/asarium/fs2open.github.com/events","assignees_url":"https://api.github.com/repos/asarium/fs2open.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/asarium/fs2open.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/asarium/fs2open.github.com/tags","blobs_url":"https://api.github.com/repos/asarium/fs2open.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asarium/fs2open.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asarium/fs2open.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/asarium/fs2open.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asarium/fs2open.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/asarium/fs2open.github.com/languages","stargazers_url":"https://api.github.com/repos/asarium/fs2open.github.com/stargazers","contributors_url":"https://api.github.com/repos/asarium/fs2open.github.com/contributors","subscribers_url":"https://api.github.com/repos/asarium/fs2open.github.com/subscribers","subscription_url":"https://api.github.com/repos/asarium/fs2open.github.com/subscription","commits_url":"https://api.github.com/repos/asarium/fs2open.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/asarium/fs2open.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/asarium/fs2open.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/asarium/fs2open.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/asarium/fs2open.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/asarium/fs2open.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asarium/fs2open.github.com/merges","archive_url":"https://api.github.com/repos/asarium/fs2open.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asarium/fs2open.github.com/downloads","issues_url":"https://api.github.com/repos/asarium/fs2open.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/asarium/fs2open.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/asarium/fs2open.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/asarium/fs2open.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asarium/fs2open.github.com/labels{/name}","releases_url":"https://api.github.com/repos/asarium/fs2open.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/asarium/fs2open.github.com/deployments","created_at":"2013-04-18T07:56:53Z","updated_at":"2018-05-13T10:07:04Z","pushed_at":"2018-07-05T09:27:51Z","git_url":"git://github.com/asarium/fs2open.github.com.git","ssh_url":"git@github.com:asarium/fs2open.github.com.git","clone_url":"https://github.com/asarium/fs2open.github.com.git","svn_url":"https://github.com/asarium/fs2open.github.com","homepage":null,"size":151452,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"scp-fs2open:master","ref":"master","sha":"130057c64a7afadb60e59aac66151d1ff65abea0","user":{"login":"scp-fs2open","id":3302806,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/3302806?v=4","gravatar_id":"","url":"https://api.github.com/users/scp-fs2open","html_url":"https://github.com/scp-fs2open","followers_url":"https://api.github.com/users/scp-fs2open/followers","following_url":"https://api.github.com/users/scp-fs2open/following{/other_user}","gists_url":"https://api.github.com/users/scp-fs2open/gists{/gist_id}","starred_url":"https://api.github.com/users/scp-fs2open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scp-fs2open/subscriptions","organizations_url":"https://api.github.com/users/scp-fs2open/orgs","repos_url":"https://api.github.com/users/scp-fs2open/repos","events_url":"https://api.github.com/users/scp-fs2open/events{/privacy}","received_events_url":"https://api.github.com/users/scp-fs2open/received_events","type":"Organization","site_admin":false},"repo":{"id":7700081,"node_id":"MDEwOlJlcG9zaXRvcnk3NzAwMDgx","name":"fs2open.github.com","full_name":"scp-fs2open/fs2open.github.com","owner":{"login":"scp-fs2open","id":3302806,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/3302806?v=4","gravatar_id":"","url":"https://api.github.com/users/scp-fs2open","html_url":"https://github.com/scp-fs2open","followers_url":"https://api.github.com/users/scp-fs2open/followers","following_url":"https://api.github.com/users/scp-fs2open/following{/other_user}","gists_url":"https://api.github.com/users/scp-fs2open/gists{/gist_id}","starred_url":"https://api.github.com/users/scp-fs2open/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scp-fs2open/subscriptions","organizations_url":"https://api.github.com/users/scp-fs2open/orgs","repos_url":"https://api.github.com/users/scp-fs2open/repos","events_url":"https://api.github.com/users/scp-fs2open/events{/privacy}","received_events_url":"https://api.github.com/users/scp-fs2open/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scp-fs2open/fs2open.github.com","description":"Origin Repository for SCP FreeSpace 2 Open","fork":false,"url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com","forks_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/forks","keys_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/teams","hooks_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/hooks","issue_events_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/events","assignees_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/tags","blobs_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/languages","stargazers_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/stargazers","contributors_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/contributors","subscribers_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/subscribers","subscription_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/subscription","commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/merges","archive_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/downloads","issues_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/labels{/name}","releases_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/deployments","created_at":"2013-01-19T06:10:53Z","updated_at":"2018-07-05T22:12:58Z","pushed_at":"2018-07-05T22:13:03Z","git_url":"git://github.com/scp-fs2open/fs2open.github.com.git","ssh_url":"git@github.com:scp-fs2open/fs2open.github.com.git","clone_url":"https://github.com/scp-fs2open/fs2open.github.com.git","svn_url":"https://github.com/scp-fs2open/fs2open.github.com","homepage":null,"size":135441,"stargazers_count":115,"watchers_count":115,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":82,"mirror_url":null,"archived":false,"open_issues_count":117,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":82,"open_issues":117,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778"},"html":{"href":"https://github.com/scp-fs2open/fs2open.github.com/pull/1778"},"issue":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/1778"},"comments":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/issues/1778/comments"},"review_comments":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778/comments"},"review_comment":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/pulls/1778/commits"},"statuses":{"href":"https://api.github.com/repos/scp-fs2open/fs2open.github.com/statuses/9651e7dca6cf6c3fa30e5e12577d5d27551e255f"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"MageKing17","id":2095329,"node_id":"MDQ6VXNlcjIwOTUzMjk=","avatar_url":"https://avatars2.githubusercontent.com/u/2095329?v=4","gravatar_id":"","url":"https://api.github.com/users/MageKing17","html_url":"https://github.com/MageKing17","followers_url":"https://api.github.com/users/MageKing17/followers","following_url":"https://api.github.com/users/MageKing17/following{/other_user}","gists_url":"https://api.github.com/users/MageKing17/gists{/gist_id}","starred_url":"https://api.github.com/users/MageKing17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MageKing17/subscriptions","organizations_url":"https://api.github.com/users/MageKing17/orgs","repos_url":"https://api.github.com/users/MageKing17/repos","events_url":"https://api.github.com/users/MageKing17/events{/privacy}","received_events_url":"https://api.github.com/users/MageKing17/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":216,"deletions":30,"changed_files":9}}
{"actor":{"display_login":"MageKing17"}}