The way new systems were being added was reinstantiating sectors with
new sectors, then placing systems somewhere else.
This has been fixed by the addition of the setSystem(System) method to
the Sector class, so that the sector can be given a system without
having to be recreated.
It should also be noted that it is possible to instantiate ships and
systems that think they're in different sectors than the ones they're
being stored in. This hasn't created any known bugs for systems, but
ships move based on where they think they are, not where they actually
are, so their first move is sometimes in the wrong direction. We should
look into some way of only being able to supply a single position when
creating anything that has a position.
The way new systems were being added was reinstantiating sectors with new sectors, then placing systems somewhere else.
This has been fixed by the addition of the setSystem(System) method to the Sector class, so that the sector can be given a system without having to be recreated.
It should also be noted that it is possible to instantiate ships and systems that think they're in different sectors than the ones they're being stored in. This hasn't created any known bugs for systems, but ships move based on where they think they are, not where they actually are, so their first move is sometimes in the wrong direction. We should look into some way of only being able to supply a single position when creating anything that has a position.