X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.py;h=9397ce8319ba5af0935159c8e3a2a38c6bb7bf04;hp=a3455bfbf20e076b7c6439e1ecf5422cefadd0ec;hb=d0ffbafb48d16caafb4274717910116131805d68;hpb=6e10945fffe610c696959c102ca4ee0344e50df4 diff --git a/src/sst.py b/src/sst.py index a3455bf..9397ce8 100644 --- a/src/sst.py +++ b/src/sst.py @@ -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: @@ -3913,7 +3919,6 @@ def setwarp(): break scanner.chew() proutn(_("Warp factor- ")) - scanner.chew() if key != "IHREAL": huh() return @@ -4779,7 +4784,7 @@ def report(): scanner.chew() s1 = "" and game.thawed and _("thawed ") s2 = {1:"short", 2:"medium", 4:"long"}[game.length] - s3 = (None, _("novice"). _("fair"), + s3 = (None, _("novice"), _("fair"), _("good"), _("expert"), _("emeritus"))[game.skill] prout(_("You %s a %s%s %s game.") % ((_("were playing"), _("are playing"))[game.alldone], s1, s2, s3)) if game.skill>SKILL_GOOD and game.thawed and not game.alldone: @@ -4873,7 +4878,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." @@ -5741,7 +5747,7 @@ def setpassword(): break else: game.passwd = "" - for i in range(8): + for i in range(3): game.passwd += chr(ord('a')+randrange(26)) # Code from sst.c begins here