Add missing argument when fixing TOTs.

Part of https://github.com/dcs-liberation/dcs_liberation/issues/2746.
This commit is contained in:
zhexu14 2023-04-23 03:50:20 +10:00 committed by GitHub
parent 4bc8bf52e7
commit 1b72598803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,10 +169,10 @@ class QTopPanel(QFrame):
return packages
@staticmethod
def fix_tots(packages: List[Package]) -> None:
def fix_tots(packages: List[Package], now: datetime) -> None:
for package in packages:
estimator = TotEstimator(package)
package.time_over_target = estimator.earliest_tot()
package.time_over_target = estimator.earliest_tot(now)
def ato_has_clients(self) -> bool:
for package in self.game.blue.ato.packages:
@ -235,7 +235,7 @@ class QTopPanel(QFrame):
mbox.exec_()
clicked = mbox.clickedButton()
if clicked == auto:
self.fix_tots(negative_starts)
self.fix_tots(negative_starts, self.sim_controller.current_time_in_sim)
return True
elif clicked == ignore:
return True