X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.py;h=08377bea38bcd2956ba158391b0482e04bc5b845;hp=064eba1a4c01430e59a5a208319f041feec6ec05;hb=972cea516e66fb65c86f084103f583d1c51941ef;hpb=3c04db74235bbcbd7ba4e2bc210a3d3d6b8e2fa4 diff --git a/sst.py b/sst.py index 064eba1..08377be 100755 --- a/sst.py +++ b/sst.py @@ -416,7 +416,7 @@ def randreal(*args): def welcoming(iq): "Would this quadrant welcome another Klingon?" - return iq.valid_Quadrant() and \ + return iq.valid_quadrant() and \ not game.state.galaxy[iq.i][iq.j].supernova and \ game.state.galaxy[iq.i][iq.j].klingons < MAXKLQUAD @@ -915,7 +915,7 @@ def doshield(shraise): action = "SHUP" else: scanner.chew() - return + return if action == "SHUP": # raise shields if game.shldup: prout(_("Shields already up.")) @@ -2664,7 +2664,6 @@ def selfdestruct(): prout(_("SELF-DESTRUCT-SEQUENCE-WILL-BE-ABORTED")) skip(1) scanner.next() - scanner.chew() if game.passwd != scanner.token: prouts(_("PASSWORD-REJECTED;")) skip(1) @@ -2692,11 +2691,9 @@ def kaboom(): skip(1) if len(game.enemies) != 0: whammo = 25.0 * game.energy - l=1 - while l <= len(game.enemies): + for l in range(len(game.enemies)): if game.enemies[l].power*game.enemies[l].kdist <= whammo: deadkl(game.enemies[l].location, game.quad[game.enemies[l].location.i][game.enemies[l].location.j], game.enemies[l].location) - l += 1 finish(FDILITHIUM) def killrate(): @@ -3161,16 +3158,11 @@ def skip(i): "Skip i lines. Pause game if this would cause a scrolling event." for dummy in range(i): if game.options & OPTION_CURSES: - (y, x) = curwnd.getyx() - (my, mx) = curwnd.getmaxyx() - if curwnd == message_window and y >= my - 2: - pause_game() - clrscr() - else: - try: - curwnd.move(y+1, 0) - except curses.error: - pass + (y, x) = curwnd.getyx() + try: + curwnd.move(y+1, 0) + except curses.error: + pass else: global linecount linecount += 1 @@ -3182,6 +3174,11 @@ def skip(i): def proutn(line): "Utter a line with no following line feed." if game.options & OPTION_CURSES: + (y, x) = curwnd.getyx() + (my, mx) = curwnd.getmaxyx() + if curwnd == message_window and y >= my - 2: + pause_game() + clrscr() curwnd.addstr(line) curwnd.refresh() else: @@ -5511,8 +5508,9 @@ def choose(): game.tourn = game.length = 0 game.thawed = False game.skill = SKILL_NONE - if not scanner.inqueue: # Can start with command line options - proutn(_("Would you like a regular, tournament, or saved game? ")) + scanner.chew() +# if not scanner.inqueue: # Can start with command line options + proutn(_("Would you like a regular, tournament, or saved game? ")) scanner.next() if scanner.sees("tournament"): while scanner.next() == "IHEOL":