From d4cf03ccbd1bd47a4637320b2f50502f4a43ca2a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 18 Feb 2017 13:42:41 -0500 Subject: [PATCH] Add failure message for unlikely circumstance. --- sst.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sst.py b/sst.py index 9b35fd7..d3c8606 100755 --- a/sst.py +++ b/sst.py @@ -4247,11 +4247,15 @@ def mayday(): # There's one in this quadrant ddist = (game.base - game.sector).distance() else: + ibq = None # Force base-quadrant game to persist past loop ddist = FOREVER for ibq in game.state.baseq: xdist = QUADSIZE * (ibq - game.quadrant).distance() if xdist < ddist: ddist = xdist + if ibq is None: + prout(_("No starbases remain. You are alone in a hostile galaxy.")) + return # Since starbase not in quadrant, set up new quadrant game.quadrant = ibq newqad() -- 2.31.1