From: Eric S. Raymond Date: Sat, 18 Feb 2017 18:42:41 +0000 (-0500) Subject: Add failure message for unlikely circumstance. X-Git-Tag: 2.2~52 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=d4cf03ccbd1bd47a4637320b2f50502f4a43ca2a;p=super-star-trek.git Add failure message for unlikely circumstance. --- 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()