{"action":"created","issue":{"url":"https://api.github.com/repos/OoliteProject/oolite/issues/208","repository_url":"https://api.github.com/repos/OoliteProject/oolite","labels_url":"https://api.github.com/repos/OoliteProject/oolite/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/OoliteProject/oolite/issues/208/comments","events_url":"https://api.github.com/repos/OoliteProject/oolite/issues/208/events","html_url":"https://github.com/OoliteProject/oolite/issues/208","id":183219828,"number":208,"title":"Incorrect event order - playerEnteredNewGalaxy after shipWillExitWitchspace","user":{"login":"AndSDev","id":13585370,"avatar_url":"https://avatars.githubusercontent.com/u/13585370?v=3","gravatar_id":"","url":"https://api.github.com/users/AndSDev","html_url":"https://github.com/AndSDev","followers_url":"https://api.github.com/users/AndSDev/followers","following_url":"https://api.github.com/users/AndSDev/following{/other_user}","gists_url":"https://api.github.com/users/AndSDev/gists{/gist_id}","starred_url":"https://api.github.com/users/AndSDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndSDev/subscriptions","organizations_url":"https://api.github.com/users/AndSDev/orgs","repos_url":"https://api.github.com/users/AndSDev/repos","events_url":"https://api.github.com/users/AndSDev/events{/privacy}","received_events_url":"https://api.github.com/users/AndSDev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-15T16:50:52Z","updated_at":"2016-10-15T19:34:48Z","closed_at":null,"body":"According to the documentation:\r\n\r\n> playerEnteredNewGalaxy\r\n> The playerEnteredNewGalaxy handler is called just before shipWillExitWitchspace.\r\n> the sequence of events for a player jumping to a different galaxy is as follows:\r\n>\r\n> shipWillEnterWitchspace (world event)\r\n> playerWillEnterWitchspace (NPC ship event)\r\n> **playerEnteredNewGalaxy** (world event)\r\n> shipWillExitWitchspace (world event)\r\n> shipExitedWitchspace (world event)\r\n\r\nBut in log:\r\n> 19:41:21.420 [test]: shipWillEnterWitchspace\r\n> 19:41:21.426 [test]: playerWillEnterWitchspace\r\n> 19:41:23.309 [test]: shipWillExitWitchspace\r\n> 19:41:23.486 [test]: **playerEnteredNewGalaxy**\r\n> 19:41:27.415 [test]: shipExitedWitchspace\r\n\r\nTested on oolite-trunk-1.85.0.160812-dev.mac (Mac OS X)."},"comment":{"url":"https://api.github.com/repos/OoliteProject/oolite/issues/comments/254006141","html_url":"https://github.com/OoliteProject/oolite/issues/208#issuecomment-254006141","issue_url":"https://api.github.com/repos/OoliteProject/oolite/issues/208","id":254006141,"user":{"login":"AnotherCommander","id":623526,"avatar_url":"https://avatars.githubusercontent.com/u/623526?v=3","gravatar_id":"","url":"https://api.github.com/users/AnotherCommander","html_url":"https://github.com/AnotherCommander","followers_url":"https://api.github.com/users/AnotherCommander/followers","following_url":"https://api.github.com/users/AnotherCommander/following{/other_user}","gists_url":"https://api.github.com/users/AnotherCommander/gists{/gist_id}","starred_url":"https://api.github.com/users/AnotherCommander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnotherCommander/subscriptions","organizations_url":"https://api.github.com/users/AnotherCommander/orgs","repos_url":"https://api.github.com/users/AnotherCommander/repos","events_url":"https://api.github.com/users/AnotherCommander/events{/privacy}","received_events_url":"https://api.github.com/users/AnotherCommander/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T19:34:48Z","updated_at":"2016-10-15T19:34:48Z","body":"Behaviour confirmed and it is because of this in PlayerEntity -enterGalacticWitchspace:\r\n```\r\n[self witchEnd]; // sets coordinates\r\n\t\r\n[self doScriptEvent:OOJSID(\"playerEnteredNewGalaxy\") withArgument:[NSNumber numberWithUnsignedInt:galaxy_number]];\r\n```\r\nThe [self witchEnd] part ends up calling the PlayerEntity -leaveWitchspace method, which contains the call to shipWillExitWitchspace. The question is, is this a bug in the code or a bug in the documentation?"}}
{"actor":{"display_login":"AnotherCommander"}}