Parallel cleanups in the C and scratch Python code.
[super-star-trek.git] / src / planets.c
index a34b1f694b06b0c68a4f2faf5de49fc2875524d7..df9efcc3126c36f6919900f1cd34bb59ed825639 100644 (file)
@@ -23,7 +23,7 @@ void preport(void)
     skip(1);
     for (i = 0; i < game.inplan; i++) {
        if ((game.state.plnets[i].known != unknown
-           && game.state.plnets[i].crystals != absent)
+           && game.state.plnets[i].inhabited == UNINHABITED)
            || (idebug && game.state.plnets[i].w.x !=0)
            ) {
            iknow = true;
@@ -55,7 +55,7 @@ void orbit(void)
        prout(_("Both warp and impulse engines damaged."));
        return;
     }
-    if (game.plnet.x == 0 || abs(game.sector.x-game.plnet.x) > 1 || abs(game.sector.y-game.plnet.y) > 1) {
+    if (!is_valid(game.plnet) || abs(game.sector.x-game.plnet.x) > 1 || abs(game.sector.y-game.plnet.y) > 1) {
        crmshp();
        prout(_(" not adjacent to planet."));
        skip(1);
@@ -386,7 +386,7 @@ void shuttle(void)
        game.state.plnets[game.iplnet].known = shuttle_down;
        game.landed = true;
        game.icraft = false;
-       prout(_("Trip complete"));
+       prout(_("Trip complete."));
        return;
     }
 }