BrokenRegistry / Rotp-Fusion

Other
22 stars 4 forks source link

Check whether can track ships from turn to turn #12

Closed dHannasch closed 1 year ago

dHannasch commented 1 year ago

Lots of machinery, but this doesn't actually take the plunge and change the display.

The new function Empire.matchShipsSeenThisTurnToShipsSeenLastTurn() attempts to match ships visible now with ships visible last turn, using only information that the empire knows. If you know that matching, you know the vector.

I tried to brainstorm every possible reason the empire might not be totally 100% certain. E.g. if the ship is at a star system, any star system, give up immediately because the empire can't be sure that the ship wasn't built that turn.

There is one change here that touches on active code. I wanted to formalize exactly what comes with having a ShipView object, so I added public static functions to ShipView, just so that the fleet display checks a conditional for displaying the Travel Speed just like it has a conditional for everything else. This way, the fact that the Travel Speed is always visible is held in the ShipView rather than in the RacesMilitaryUI.