Log information about the generated campaign.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1735
This commit is contained in:
Benjamin Fischer 2022-03-17 02:03:21 +01:00 committed by GitHub
parent f7ced1aea6
commit 4a666705c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,8 @@ class NewGameWizard(QtWidgets.QWizard):
if campaign is None:
campaign = self.campaigns[0]
logging.info("New campaign selected: %s", campaign.name)
if self.field("usePreset"):
start_date = TIME_PERIODS[
list(TIME_PERIODS.keys())[self.field("timePeriod")]
@ -122,6 +124,7 @@ class NewGameWizard(QtWidgets.QWizard):
else:
start_date = self.theater_page.calendar.selectedDate().toPython()
logging.info("New campaign start date: %s", start_date.strftime("%m/%d/%Y"))
settings = Settings(
player_income_multiplier=self.field("player_income_multiplier") / 10,
enemy_income_multiplier=self.field("enemy_income_multiplier") / 10,
@ -161,7 +164,14 @@ class NewGameWizard(QtWidgets.QWizard):
blue_faction = self.faction_selection_page.selected_blue_faction
red_faction = self.faction_selection_page.selected_red_faction
logging.info("New campaign blue faction: %s", blue_faction.name)
logging.info("New campaign red faction: %s", red_faction.name)
theater = campaign.load_theater()
logging.info("New campaign theater: %s", theater.terrain.name)
generator = GameGenerator(
blue_faction,
red_faction,