X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsst.py;h=501b40750c9e2d502eb2b3c3060fb462825cfebf;hb=a5d674eeaa338b2585222a9f405c7cb5d2f7fbe0;hp=cfdfe383e254b43119b4b57a5a74f9b2b407969d;hpb=e56967f9f71423371cfe28a2ffa246a89042d531;p=super-star-trek.git diff --git a/src/sst.py b/src/sst.py index cfdfe38..501b407 100644 --- a/src/sst.py +++ b/src/sst.py @@ -1482,8 +1482,8 @@ def targetcheck(w): return None return delta.bearing() -def photon(): - "Launch photon torpedo." +def torps(): + "Launch photon torpedo salvo." course = [] game.ididit = False if damaged(DPHOTON): @@ -3063,6 +3063,12 @@ curwnd = None def iostart(): global stdscr, rows + "for some recent versions of python2, the following enables UTF8" + "for the older ones we probably need to set C locale, and the python3" + "has no problems at all" + if sys.version_info.major < 3: + import locale + locale.setlocale(locale.LC_ALL, "") gettext.bindtextdomain("sst", "/usr/local/share/locale") gettext.textdomain("sst") if not (game.options & OPTION_CURSES): @@ -3148,7 +3154,7 @@ def skip(i): if game.options & OPTION_CURSES: (y, x) = curwnd.getyx() (my, mx) = curwnd.getmaxyx() - if curwnd == message_window and y >= my - 3: + if curwnd == message_window and y >= my - 2: pause_game() clrscr() else: @@ -4873,7 +4879,8 @@ def lrscan(silent): proutn(" ***") elif not silent: proutn(" %3d" % (game.state.chart[x][y].klingons*100 + game.state.chart[x][y].starbase * 10 + game.state.chart[x][y].stars)) - prout(" ") + if not silent: + prout(" ") def damagereport(): "Damage report." @@ -5898,8 +5905,8 @@ def makemoves(): phasers() if game.ididit: hitme = True - elif cmd == "TORPEDO": # photon torpedos - photon() + elif cmd in ("TORPEDO", "PHOTONS"): # photon torpedos + torps() if game.ididit: hitme = True elif cmd == "MOVE": # move under warp