From a3cce8ff72ff6fba1245ab945a29bfd99297ad75 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 18 May 2021 19:36:20 -0700 Subject: [PATCH] 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. --- game/theater/start_generator.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index 41eebbd1..5fd5f882 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -152,13 +152,14 @@ class LocationFinder: def location_for(self, location_type: LocationType) -> Optional[PointWithHeading]: position = self.control_point.preset_locations.random_for(location_type) if position is not None: + logging.warning( + f"Campaign relies on random generation of %s at %s. Support for random " + "objectives will be removed soon.", + location_type.value, + self.control_point, + ) return position - logging.warning( - f"No campaign location for %s at %s", - location_type.value, - self.control_point, - ) return None