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 committed by Raffson
parent a3d58daa3c
commit 46a3aa9540
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 1 additions and 0 deletions

View File

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

View File