X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.py;h=35d1433b7b5b036afac60481ff79ee22f6625519;hp=3a777e1c5ba0f5cbc0a7acba8a6087353b9cecd4;hb=097ac6ffc1531b44d06767be40045795a92321e5;hpb=6e3f4a22696681b7d782fce97eb3b19a6a52e171 diff --git a/sst.py b/sst.py index 3a777e1..35d1433 100755 --- a/sst.py +++ b/sst.py @@ -5335,10 +5335,21 @@ def setup(): game.nkinks = game.nhelp = game.casual = game.abandoned = 0 game.iscate = game.resting = game.imine = game.icrystl = game.icraft = False game.isatb = game.state.nplankl = 0 - game.state.starkl = game.state.basekl = 0 + game.state.starkl = game.state.basekl = game.state.nworldkl = 0 game.iscraft = "onship" game.landed = False game.alive = True + + # the galaxy + game.state.galaxy = fill2d(GALSIZE, lambda i_unused, j_unused: Quadrant()) + # the starchart + game.state.chart = fill2d(GALSIZE, lambda i_unused, j_unused: Page()) + + game.state.planets = [] # Planet information + game.state.baseq = [] # Base quadrant coordinates + game.state.kcmdr = [] # Commander quadrant coordinates + game.statekscmdr = Coord() # Supercommander quadrant coordinates + # Starchart is functional but we've never seen it game.lastchart = FOREVER # Put stars in the galaxy @@ -5898,8 +5909,13 @@ def makemoves(): clrscr() setwnd(message_window) clrscr() + abandon_passed = False for (cmd, opt) in commands: - if cmd.startswith(scanner.token.upper()): + # commands after ABANDON cannot be abbreviated + if cmd == "ABANDON": + abandon_passed = True + if cmd == scanner.token.upper() or (not abandon_passed \ + and cmd.startswith(scanner.token.upper())): break; if cmd == "": listCommands()