Order of JS events when galactic jumping
Posted: Sun Oct 16, 2016 9:39 am
This is a quick heads up regarding the order of JS events that are executed when a galactic jump takes place.
A recent bug report on github (issue #208) highlighted the fact that there was a discrepancy with what the wiki says about playerEnteredNewGalaxy and what happens in reality. The event playerEnteredNewGalaxy has been for years executed after shipWillExitWitchspace, although the wiki declares the opposite since pretty much 2009.
A fix has been commited to make the JS events during galactic hyperspace match what the wiki says. However, there is a possibility of unintended behaviour for existing OXPs that rely on the (apparently incorrect) order of events we've had till now. So, if you have an OXP that uses the playerEnteredNewGalaxy event, please make sure that it still works OK and let us know in this thread in case there are any issues. At the end of the day, it may be just easier to change the wiki and keep the order of events unchanged, but it looks like the right order of events should be as per wiki and not what we've had so far.
A recent bug report on github (issue #208) highlighted the fact that there was a discrepancy with what the wiki says about playerEnteredNewGalaxy and what happens in reality. The event playerEnteredNewGalaxy has been for years executed after shipWillExitWitchspace, although the wiki declares the opposite since pretty much 2009.
A fix has been commited to make the JS events during galactic hyperspace match what the wiki says. However, there is a possibility of unintended behaviour for existing OXPs that rely on the (apparently incorrect) order of events we've had till now. So, if you have an OXP that uses the playerEnteredNewGalaxy event, please make sure that it still works OK and let us know in this thread in case there are any issues. At the end of the day, it may be just easier to change the wiki and keep the order of events unchanged, but it looks like the right order of events should be as per wiki and not what we've had so far.