mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Invert the random location warning.
Campaigns should no longer be using these. Remove the warning when a location cannot be found, and emit a warning when they are used.
This commit is contained in:
parent
242f00390d
commit
a3cce8ff72
@ -152,13 +152,14 @@ class LocationFinder:
|
|||||||
def location_for(self, location_type: LocationType) -> Optional[PointWithHeading]:
|
def location_for(self, location_type: LocationType) -> Optional[PointWithHeading]:
|
||||||
position = self.control_point.preset_locations.random_for(location_type)
|
position = self.control_point.preset_locations.random_for(location_type)
|
||||||
if position is not None:
|
if position is not None:
|
||||||
return position
|
|
||||||
|
|
||||||
logging.warning(
|
logging.warning(
|
||||||
f"No campaign location for %s at %s",
|
f"Campaign relies on random generation of %s at %s. Support for random "
|
||||||
|
"objectives will be removed soon.",
|
||||||
location_type.value,
|
location_type.value,
|
||||||
self.control_point,
|
self.control_point,
|
||||||
)
|
)
|
||||||
|
return position
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user