- /* the "sy" request is undocumented */
- static char requests[][3] =
- {"","da","co","po","ls","wa","en","to","sh","kl","sy", "ti"};
-
- int i, j, jj, req=0;
- int goodScan=true, leftside=true, rightside=true, title=false;
- switch (l) {
- case SCAN_FULL: // SRSCAN
- if (damaged(DSRSENS)) {
- /* Allow base's sensors if docked */
- if (game.condition != docked) {
- prout(_(" S.R. SENSORS DAMAGED!"));
- goodScan=false;
- }
- else
- prout(_(" [Using Base's sensors]"));
- }
- else prout(_(" Short-range scan"));
- if (goodScan && !damaged(DRADIO)) {
- game.state.chart[game.quadrant.x][game.quadrant.y].klingons = game.state.galaxy[game.quadrant.x][game.quadrant.y].klingons;
- game.state.chart[game.quadrant.x][game.quadrant.y].starbase = game.state.galaxy[game.quadrant.x][game.quadrant.y].starbase;
- game.state.chart[game.quadrant.x][game.quadrant.y].stars = game.state.galaxy[game.quadrant.x][game.quadrant.y].stars;
- game.state.galaxy[game.quadrant.x][game.quadrant.y].charted = true;
- }
- scan();
- if (isit("chart")) title = 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;