mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Import DaytimeMap locally
Causes an exception otherwise, and at the same time a perfect example why a strongly typed language would be better in this case, because this would've been caught by a compiler!
This commit is contained in:
parent
9a0e8c9e4b
commit
87c75aa61e
@ -15,7 +15,7 @@ from game.utils import Distance, Heading, Pressure, inches_hg, interpolate, mete
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from game.settings import Settings
|
from game.settings import Settings
|
||||||
from game.theater import ConflictTheater, DaytimeMap
|
from game.theater import ConflictTheater
|
||||||
from game.theater.seasonalconditions import SeasonalConditions
|
from game.theater.seasonalconditions import SeasonalConditions
|
||||||
|
|
||||||
|
|
||||||
@ -323,6 +323,8 @@ class Conditions:
|
|||||||
night_disabled: bool,
|
night_disabled: bool,
|
||||||
) -> datetime.datetime:
|
) -> datetime.datetime:
|
||||||
if night_disabled:
|
if night_disabled:
|
||||||
|
from game.theater import DaytimeMap
|
||||||
|
|
||||||
logging.info("Skip Night mission due to user settings")
|
logging.info("Skip Night mission due to user settings")
|
||||||
time_range = DaytimeMap(
|
time_range = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=8), datetime.time(hour=9)),
|
dawn=(datetime.time(hour=8), datetime.time(hour=9)),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user