Load airfield data when called for airport.

The for_theater method is always called before for_airport is during
normal gameplay, but I'm writing a linter to show missing airfield data
that calls for_airport first.
This commit is contained in:
Dan Albert 2022-09-08 14:06:39 -07:00
parent a679c19af1
commit 229008577b
2 changed files with 1 additions and 0 deletions

View File

@ -179,6 +179,7 @@ class AirfieldData:
@classmethod @classmethod
def for_airport(cls, theater: ConflictTheater, airport: Airport) -> AirfieldData: def for_airport(cls, theater: ConflictTheater, airport: Airport) -> AirfieldData:
cls._load_for_theater_if_needed(theater)
return cls._airfields[theater.terrain.name][airport.id] return cls._airfields[theater.terrain.name][airport.id]
@classmethod @classmethod

View File