...to the command list.
<literallayout>
Mnemonic: CAPTURE
-Shortest abbreviation: CA
+Shortest abbreviation: CAPTURE
Full commands: CAPTURE
</literallayout>
<para>Switch from tty to curses interface. Mainly useful for
debugging, when continuing a replayed game.</para>
+</sect1>
+<sect1><title>Option setting</title>
+
+<literallayout>
+Mnemonic: OP
+Full command: OPTIONS
+ OPTIONS SET
+ OPTIONS CLEAR
+</literallayout>
+
+<para>Set or clear feature flags. With no argument, list feature flags. The verbs SET and CLEAR
+are available to set or clear a list of feature flags following on the line. Mainly useful
+for development and improving test coverage.</para>
+
</sect1>
</chapter>
<chapter><title>Miscellaneous Notes</title>
T TRANSPORT transporter
W WARP <FACTOR> (none)
CU CURSES (none)
+ OP OPTIONS (none)
L. R. Scan: thousands digit: supernova
hundreds digit: Klingons
OPTION_COLOR = 0x04000000 # enable color display (ESR, 2010)
OPTION_DOTFILL = 0x08000000 # fix dotfill glitch in chart (ESR, 2019)
+option_names = {
+ "ALL": OPTION_ALL,
+ "TTY": OPTION_TTY,
+ "IOMODES": OPTION_IOMODES,
+ "PLANETS": OPTION_PLANETS,
+ "THOLIAN": OPTION_THOLIAN,
+ "THINGY": OPTION_THINGY,
+ "PROBE": OPTION_PROBE,
+ "SHOWME": OPTION_SHOWME,
+ "RAMMING": OPTION_RAMMING,
+ "MVBADDY": OPTION_MVBADDY,
+ "BLKHOLE": OPTION_BLKHOLE,
+ "BASE": OPTION_BASE,
+ "WORLDS": OPTION_WORLDS,
+ "AUTOSCAN": OPTION_AUTOSCAN,
+ "CAPTURE": OPTION_CAPTURE,
+ "CLOAK": OPTION_CLOAK,
+ "PLAIN": OPTION_PLAIN,
+ "ALMY": OPTION_ALMY,
+ "COLOR": OPTION_COLOR,
+ "DOTFILL": OPTION_DOTFILL,
+ }
+
# Define devices
DSRSENS = 0
DLRSENS = 1
skip(1)
return
+# This is new in SST2K.
+
+def goptions():
+ mode = scanner.nexttok()
+ if mode == "IHEOL":
+ active = []
+ for k, v in option_names.items():
+ if (v & game.options) and k != "ALL":
+ active.append(k)
+ active.sort()
+ prout(str(" ".join(active)))
+ elif scanner.token in {"set", "clear"}:
+ mode = scanner.token
+ changemask = 0
+ while True:
+ scanner.nexttok()
+ if scanner.type == "IHEOL":
+ break
+ if scanner.token.upper() in option_names:
+ changemask |= option_names[scanner.token.upper()]
+ else:
+ prout(_("No such option as ") + scanner.token)
+ if mode == "set":
+ if (not (game.options & OPTION_CURSES)) and (changemask & OPTION_CURSES):
+ iostart()
+ game.options |= changemask
+ elif mode == "clear":
+ if (game.options & OPTION_CURSES) and (not (changemask & OPTION_CURSES)):
+ ioend()
+ game.options &=~ changemask
+ prout(_("Acknowledged, Captain."))
+ else:
+ huh()
+ scanner.chew()
+ skip(1)
+
# Code from setup.c begins here
def prelim():
("PROBE", OPTION_PROBE),
("SAVE", 0),
("FREEZE", 0), # Synonym for SAVE
+ ("OPTIONS", 0),
("ABANDON", 0),
+ # No abbreviations accepted after this point
("DESTRUCT", 0),
("DEATHRAY", 0),
("CAPTURE", OPTION_CAPTURE),
("QUIT", 0),
("HELP", 0),
("SCORE", 0),
- ("CURSES", 0),
+ ("CURSES", 0),
("", 0),
]
elif cmd == "CURSES":
game.options |= (OPTION_CURSES | OPTION_COLOR)
iostart()
+ elif cmd == "OPTIONS":
+ goptions()
while True:
if game.alldone:
break # Game has ended
Enemy attack reduces shield strength to 87%, torpedoes left 10
Enemy attack reduces shield strength to 78%, torpedoes left 10
-COMMAND> laser auto
-LEGAL COMMANDS ARE:
-SRSCAN STATUS REQUEST LRSCAN
-PHASERS TORPEDO PHOTONS MOVE SHIELDS
-DOCK DAMAGES CHART IMPULSE REST
-WARP SENSORS ORBIT TRANSPORT MINE
-CRYSTALS SHUTTLE PLANETS REPORT COMPUTER
-COMMANDS EMEXIT PROBE SAVE FREEZE
-ABANDON DESTRUCT DEATHRAY CAPTURE CLOAK
-DEBUG MAYDAY SOS CALL QUIT
-HELP SCORE CURSES
COMMAND> p a
Weapons Officer Sulu- "High-speed shield control enabled, sir."
m a 10 10
sh up
m a 4 1 1 10
-laser auto
p a
1883
p a
Helmsman Sulu- "Entering standard orbit, Sir."
Sulu- "Entered orbit at altitude 7779.00 kilometers."
-COMMAND> beam
-LEGAL COMMANDS ARE:
-SRSCAN STATUS REQUEST LRSCAN
-PHASERS TORPEDO PHOTONS MOVE SHIELDS
-DOCK DAMAGES CHART IMPULSE REST
-WARP SENSORS ORBIT TRANSPORT MINE
-CRYSTALS SHUTTLE PLANETS REPORT COMPUTER
-COMMANDS EMEXIT PROBE SAVE FREEZE
-ABANDON DESTRUCT DEATHRAY CAPTURE CLOAK
-DEBUG MAYDAY SOS CALL QUIT
-HELP SCORE CURSES
COMMAND> shuttle
Spock- "Captain, we have no information on this planet
m a 2 9
m a 4 9
orbit
-beam
shuttle
crystals
shuttle
COMMAND> m a 1 10
-COMMAND> xhart
-LEGAL COMMANDS ARE:
-SRSCAN STATUS REQUEST LRSCAN
-PHASERS TORPEDO PHOTONS MOVE SHIELDS
-DOCK DAMAGES CHART IMPULSE REST
-WARP SENSORS ORBIT TRANSPORT MINE
-CRYSTALS SHUTTLE PLANETS REPORT COMPUTER
-COMMANDS EMEXIT PROBE SAVE FREEZE
-ABANDON DESTRUCT DEATHRAY CAPTURE CLOAK
-DEBUG MAYDAY SOS CALL QUIT
-HELP SCORE CURSES
COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
7 | ..1 ..8 .11 ..5 ..4 ... ... ... |
8 | ..5 ..7 .19 ..5 ..7 ... ... ... |
-COMMAND> chart 6 2 1 10
- STAR CHART FOR THE KNOWN GALAXY
- 1 2 3 4 5 6 7 8
-1 | ..3 ..4 ..4 ..1 ..7 ..5 ..3 ..3 |
-2 | ... ... ... .1. .1. ... ..7 ..3 |
-3 | ... ... ... ... ... ... ... ... |
-4 | ..1 ..2 ..7 ... ... ... ... ... |
-5 | 209 <..5> ..2 ... ... ... ... ... |
-6 | ..7 207 ..2 ..5 ..2 ... ... ... |
-7 | ..1 ..8 .11 ..5 ..4 ... ... ... |
-8 | ..5 ..7 .19 ..5 ..7 ... ... ... |
-
-COMMAND> n a 6 2 1 10
-LEGAL COMMANDS ARE:
-SRSCAN STATUS REQUEST LRSCAN
-PHASERS TORPEDO PHOTONS MOVE SHIELDS
-DOCK DAMAGES CHART IMPULSE REST
-WARP SENSORS ORBIT TRANSPORT MINE
-CRYSTALS SHUTTLE PLANETS REPORT COMPUTER
-COMMANDS EMEXIT PROBE SAVE FREEZE
-ABANDON DESTRUCT DEATHRAY CAPTURE CLOAK
-DEBUG MAYDAY SOS CALL QUIT
-HELP SCORE CURSES
-COMMAND> chart
- STAR CHART FOR THE KNOWN GALAXY
- 1 2 3 4 5 6 7 8
-1 | ..3 ..4 ..4 ..1 ..7 ..5 ..3 ..3 |
-2 | ... ... ... .1. .1. ... ..7 ..3 |
-3 | ... ... ... ... ... ... ... ... |
-4 | ..1 ..2 ..7 ... ... ... ... ... |
-5 | 209 <..5> ..2 ... ... ... ... ... |
-6 | ..7 207 ..2 ..5 ..2 ... ... ... |
-7 | ..1 ..8 .11 ..5 ..4 ... ... ... |
-8 | ..5 ..7 .19 ..5 ..7 ... ... ... |
-
COMMAND> m a 6 2 1 10
Ensign Chekov- "Course laid in, Captain."
dock
chart
m a 1 10
-xhart
chart
m a 7 4 1 10
chart
chart
m a 5 2 10 10
chart
-chart 6 2 1 10
-n a 6 2 1 10
-chart
m a 6 2 1 10
m a 1 9
torp 2 5 9 5 9