Fix date lagging behind 1 turn

This commit is contained in:
Raffson 2024-08-04 13:14:40 +02:00
parent 9dd25e933e
commit 97c65cfefa
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 3 additions and 1 deletions

View File

@ -187,7 +187,7 @@ class Game:
def generate_conditions(self, forced_time: time | None = None) -> Conditions:
return Conditions.generate(
self.theater,
self.current_day,
self.conditions.start_time.date(),
self.current_turn_time_of_day,
self.settings,
forced_time=forced_time,

View File

@ -91,6 +91,8 @@ class Conditions:
day += datetime.timedelta(days=1.0)
hours %= 24
else:
if start == 0:
day += datetime.timedelta(days=1.0)
hours = random.randint(start, end)
return day, hours