biqqles / flint

A parser and API for Freelancer and its formats
https://github.com/biqqles/flint/wiki
Mozilla Public License 2.0
8 stars 2 forks source link

fix System.lanes() #17

Open san-e opened 1 year ago

san-e commented 1 year ago

Turns out System.lanes() is completely broken. As soon as it encounters the last ring in a lane, rings.get(current_ring.next_ring) will throw an exception. This PR works around that.

Alternatively, this could also be fixed by altering EntitySet.get()'s behaviour to include default values, which it looks like was the expected behaviour here