Remove CRs.
[super-star-trek.git] / planets.c
index 3de87c34405b99a733bd54bc2ebb5e6a5e4c2288..35ccec7550e1cea3585ce59e10900e7e1af2f3cb 100644 (file)
--- a/planets.c
+++ b/planets.c
@@ -78,7 +78,7 @@ void orbit(void) {
        height = (1400.+7200.*Rand());
        prout("Sulu-  \"Entered orbit at altitude %.2f kilometers.\"", height);
        inorbit = 1;
-       return;
+        ididit=1;
 }
 
 void sensor(void) {
@@ -89,21 +89,22 @@ void sensor(void) {
                return;
        }
        if (plnetx == 0) {
-               prout("No planet in this quadrant.");
-               return;
+               prout("Spock- \"No planet in this quadrant, Captain.\"");
+               return;
+       }
+       if ((plnetx != 0)&&(game.state.plnets[iplnet].known == 0)) {
+           prout("Spock-  \"Sensor scan for %s-", cramlc(quadrant, quadx, quady));
+           skip(1);
+           prout("         Planet at %s is of class %s.", 
+                  cramlc(sector, plnetx, plnety),
+                  classes[game.state.plnets[iplnet].pclass]);
+           if (game.state.plnets[iplnet].known==shuttle_down) 
+                   prout("         Sensors show Galileo still on surface.");
+           proutn("         Readings indicate");
+           if (game.state.plnets[iplnet].crystals == 0) proutn(" no");
+           prout(" dilithium crystals present.\"");
+           if (game.state.plnets[iplnet].known == unknown) game.state.plnets[iplnet].known = known;
        }
-       prout("Spock-  \"Sensor scan for %s-", cramlc(quadrant, quadx, quady));
-       skip(1);
-       prout("         Planet at %s is of class %s.", 
-              cramlc(sector, plnetx, plnety),
-              classes[game.state.plnets[iplnet].pclass]);
-       if (game.state.plnets[iplnet].known==shuttle_down) 
-               prout("         Sensors show Galileo still on surface.");
-       proutn("         Readings indicate");
-       if (game.state.plnets[iplnet].crystals == 0) proutn(" no");
-       prout(" dilithium crystals present.\"");
-       if (game.state.plnets[iplnet].known == unknown) game.state.plnets[iplnet].known = known;
-       return;
 }
 
 void beam(void) {
@@ -167,6 +168,7 @@ void beam(void) {
                skip(1);
                prout("Kirk-  \"Energize.\"");
        }
+        ididit=1;
        skip(1);
        prouts("WWHOOOIIIIIRRRRREEEE.E.E.  .  .  .  .   .    .");
        skip(2);
@@ -193,8 +195,6 @@ void beam(void) {
 }
 
 void mine(void) {
-
-       ididit = 0;
        skip(1);
        chew();
        if (landed!= 1) {
@@ -220,11 +220,11 @@ void mine(void) {
        if (consumeTime()) return;
        prout("Mining operation complete.");
        imine = 1;
-       return;
+        ididit=1;
 }
 
 void usecrystals(void) {
-
+       ididit=0;
        skip(1);
        chew();
        if (icrystl!=1) {
@@ -270,14 +270,13 @@ void usecrystals(void) {
        prout("   are going crazy, but I think it's");
        prout("   going to work!!  Congratulations, Sir!\"");
        cryprob *= 2.0;
-       return;
+       ididit=1;
 }
 
 void shuttle(void) {
 
        chew();
        skip(1);
-       ididit = 0;
        if(game.damage[DSHUTTL] != 0.0) {
                if (game.damage[DSHUTTL] == -1.0) {
                        if (inorbit && game.state.plnets[iplnet].known == shuttle_down)
@@ -387,7 +386,6 @@ void shuttle(void) {
                return;
        }
 }
-               
 
 void deathray(void) {
        double r = Rand();