{"action":"created","issue":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/328","repository_url":"https://api.github.com/repos/CBATeam/CBA_A3","labels_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/328/comments","events_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/328/events","html_url":"https://github.com/CBATeam/CBA_A3/pull/328","id":154871127,"number":328,"title":"add 'CBA_fnc_addPlayerEventHandler'","user":{"login":"commy2","id":6576312,"avatar_url":"https://avatars.githubusercontent.com/u/6576312?v=3","gravatar_id":"","url":"https://api.github.com/users/commy2","html_url":"https://github.com/commy2","followers_url":"https://api.github.com/users/commy2/followers","following_url":"https://api.github.com/users/commy2/following{/other_user}","gists_url":"https://api.github.com/users/commy2/gists{/gist_id}","starred_url":"https://api.github.com/users/commy2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commy2/subscriptions","organizations_url":"https://api.github.com/users/commy2/orgs","repos_url":"https://api.github.com/users/commy2/repos","events_url":"https://api.github.com/users/commy2/events{/privacy}","received_events_url":"https://api.github.com/users/commy2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CBATeam/CBA_A3/labels/Feature","name":"Feature","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"commy2","id":6576312,"avatar_url":"https://avatars.githubusercontent.com/u/6576312?v=3","gravatar_id":"","url":"https://api.github.com/users/commy2","html_url":"https://github.com/commy2","followers_url":"https://api.github.com/users/commy2/followers","following_url":"https://api.github.com/users/commy2/following{/other_user}","gists_url":"https://api.github.com/users/commy2/gists{/gist_id}","starred_url":"https://api.github.com/users/commy2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commy2/subscriptions","organizations_url":"https://api.github.com/users/commy2/orgs","repos_url":"https://api.github.com/users/commy2/repos","events_url":"https://api.github.com/users/commy2/events{/privacy}","received_events_url":"https://api.github.com/users/commy2/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-14T19:24:34Z","updated_at":"2016-05-14T21:44:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/328","html_url":"https://github.com/CBATeam/CBA_A3/pull/328","diff_url":"https://github.com/CBATeam/CBA_A3/pull/328.diff","patch_url":"https://github.com/CBATeam/CBA_A3/pull/328.patch"},"body":"Port (?) from ACE.\r\nThis is a framework to add event handlers based around properties of the players avatar that are pretty usefull, but unfortunately require polling.\r\n\r\nPossible events:\r\n        - `\"unit\"`       - player controlled unit changed\r\n        - `\"weapon\"`     - currently selected weapon change\r\n        - `\"loadout\"`    - players loadout changed\r\n        - `\"vehicle\"`    - players current vehicle changed\r\n        - `\"turret\"`     - position in vehicle changed\r\n        - `\"visionMode\"` - player changed to normal/night/thermal view\r\n        - `\"cameraView\"` - camera mode changed (\"Internal\", \"External\", \"Gunner\" etc.)\r\n        - `\"visibleMap\"` - opened or closed map"},"comment":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/comments/219253220","html_url":"https://github.com/CBATeam/CBA_A3/pull/328#issuecomment-219253220","issue_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/328","id":219253220,"user":{"login":"esteldunedain","id":7674951,"avatar_url":"https://avatars.githubusercontent.com/u/7674951?v=3","gravatar_id":"","url":"https://api.github.com/users/esteldunedain","html_url":"https://github.com/esteldunedain","followers_url":"https://api.github.com/users/esteldunedain/followers","following_url":"https://api.github.com/users/esteldunedain/following{/other_user}","gists_url":"https://api.github.com/users/esteldunedain/gists{/gist_id}","starred_url":"https://api.github.com/users/esteldunedain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esteldunedain/subscriptions","organizations_url":"https://api.github.com/users/esteldunedain/orgs","repos_url":"https://api.github.com/users/esteldunedain/repos","events_url":"https://api.github.com/users/esteldunedain/events{/privacy}","received_events_url":"https://api.github.com/users/esteldunedain/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T21:44:12Z","updated_at":"2016-05-14T21:44:12Z","body":"Mmm, I celebrate that this are getting added to CBA. However, I'm not really fond of the way it's executed for two reasons:\r\n\r\n1- Most of the events are trivially cheap to evaluate, but instead of adding them to a single loop that always run (like in ACE), each one is tucked in it's own EH function, making them slower. This is specially true if you want to use many or all of them (like in ACE). I would instead recommend that either all of them are installed by default, or all are installed when the first is.\r\n\r\n2- That a new installer function is required `CBA_fnc_addPlayerEventHandler` instead of `CBA_fnc_addLocalEvent`"}}