- /* the "sy" request is undocumented */
- static char requests[][3] =
- {"","da","co","po","ls","wa","en","to","sh","kl","sy", "ti"};
- int leftside=TRUE, rightside=TRUE, i, j, jj, req=0, nn=FALSE;
- int goodScan=TRUE;
- switch (l) {
- case SCAN_FULL: // SRSCAN
- if (game.damage[DSRSENS] != 0) {
- /* Allow base's sensors if docked */
- if (game.condit != IHDOCKED) {
- prout(" S.R. SENSORS DAMAGED!");
- goodScan=FALSE;
- }
- else
- prout(" [Using Base's sensors]");
- }
- else prout(" Short-range scan");
- if (goodScan && !game.damage[DRADIO]) {
- game.state.chart[game.quadx][game.quady].klingons = game.state.galaxy[game.quadx][game.quady].klingons;
- game.state.chart[game.quadx][game.quady].starbase = game.state.galaxy[game.quadx][game.quady].starbase;
- game.state.chart[game.quadx][game.quady].stars = game.state.galaxy[game.quadx][game.quady].stars;
- game.state.galaxy[game.quadx][game.quady].charted = TRUE;
- }
- scan();
- if (isit("chart")) nn = TRUE;
- if (isit("no")) rightside = FALSE;
- chew();
- prout(" 1 2 3 4 5 6 7 8 9 10");
- break;
- case SCAN_REQUEST:
- while (scan() == IHEOL)
- proutn("Information desired? ");
- chew();
- for (req = 1; req <= sizeof(requests)/sizeof(requests[0]); req++)
- if (strncmp(citem,requests[req],min(2,strlen(citem)))==0)
- break;
- if (req > sizeof(requests)/sizeof(requests[0])) {
- prout("UNRECOGNIZED REQUEST. Legal requests are:");
- prout(" date, condition, position, lsupport, warpfactor,");
- prout(" energy, torpedoes, shields, klingons, time, system, bases.");
- return FALSE;