From: Eric S. Raymond Date: Tue, 10 Oct 2006 08:20:59 +0000 (+0000) Subject: Fix listCommands. X-Git-Tag: 2.0~97 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=00866f423e80e6c2316619d955e3bbda3d343e09;p=super-star-trek.git Fix listCommands. --- diff --git a/src/sst.py b/src/sst.py index 635816e..79c8e62 100644 --- a/src/sst.py +++ b/src/sst.py @@ -6064,12 +6064,14 @@ commands = { def listCommands(): "Generate a list of legal commands." - proutn(_("LEGAL COMMANDS ARE:")) - for (k, key) in enumerate(commands): + prout(_("LEGAL COMMANDS ARE:")) + emitted = 0 + for key in commands: if not commands[key] or (commands[key] & game.options): - if k % 5 == 0: + proutn("%-12s " % key) + emitted += 1 + if emitted % 5 == 4: skip(1) - proutn("%-12s " % key) skip(1) def helpme():