From 993e59413a3d5b84031459701108178f116bf2cc Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 25 Dec 2020 17:31:26 -0800 Subject: [PATCH] Add pretty-print for AircraftProcurementRequest. --- game/procurement.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/game/procurement.py b/game/procurement.py index 6dd299eb..9d8af156 100644 --- a/game/procurement.py +++ b/game/procurement.py @@ -31,6 +31,12 @@ class AircraftProcurementRequest: task_capability: FlightType number: int + def __str__(self) -> str: + task = self.task_capability.value + distance = self.range.nautical_miles + target = self.near.name + return f"{self.number} ship {task} within {distance} nm of {target}" + class ProcurementAi: def __init__(self, game: Game, for_player: bool, faction: Faction,