Page 1 of 1

Order of JS events when galactic jumping

Posted: Sun Oct 16, 2016 9:39 am
by another_commander
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.

Re: Order of JS events when galactic jumping

Posted: Mon Oct 17, 2016 11:27 am
by Cody
On the subject of galactic jumps (but nothing to do with JS events): are they classed as witchspace jumps? They are subtly different.
If I attempt a galactic jump too close to a station, Oolite tells me the witchspace jump has been aborted. That doesn't feel right.