]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/scut.c
Require friendly relations for trade ship to pay off
[empserver] / src / lib / commands / scut.c
index 9454f3e28edc44133a7641633ccde903e8a79b9f..f5adb17aa1f914323ba60bda87b974f4fde2f090 100644 (file)
@@ -165,7 +165,8 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
 
     mp = &mchr[(int)sp->shp_type];
     getsect(sp->shp_x, sp->shp_y, &sect);
 
     mp = &mchr[(int)sp->shp_type];
     getsect(sp->shp_x, sp->shp_y, &sect);
-    if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2) {
+    if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2
+       && getrel(getnatp(sect.sct_own), sp->shp_own) >= FRIENDLY) {
        dist = mapdist(sp->shp_x, sp->shp_y,
                       sp->shp_orig_x, sp->shp_orig_y);
        /* Don't disclose distance to to pirates */
        dist = mapdist(sp->shp_x, sp->shp_y,
                       sp->shp_orig_x, sp->shp_orig_y);
        /* Don't disclose distance to to pirates */