mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix date given to the conditions generator.
`Game.date` is actually the start date, not the current date. Not renaming to avoid breaking save compat. This fix won't have any effect on existing saves until they pass the turn because this is encoded into the conditions generated at the start of the turn, but it will fix on the next turn. Fixes https://github.com/Khopa/dcs_liberation/issues/973
This commit is contained in:
parent
828c87df39
commit
ab746b5195
@ -96,6 +96,7 @@ class Game:
|
||||
self.enemy_name = enemy_name
|
||||
self.enemy_country = db.FACTIONS[enemy_name].country
|
||||
self.turn = 0
|
||||
# NB: This is the *start* date. It is never updated.
|
||||
self.date = date(start_date.year, start_date.month, start_date.day)
|
||||
self.game_stats = GameStats()
|
||||
self.game_stats.update(self)
|
||||
@ -152,7 +153,7 @@ class Game:
|
||||
|
||||
def generate_conditions(self) -> Conditions:
|
||||
return Conditions.generate(
|
||||
self.theater, self.date, self.current_turn_time_of_day, self.settings
|
||||
self.theater, self.current_day, self.current_turn_time_of_day, self.settings
|
||||
)
|
||||
|
||||
def sanitize_sides(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user