From: Markus Armbruster Date: Sat, 13 Sep 2008 22:05:58 +0000 (-0400) Subject: Require friendly relations for trade ship to pay off X-Git-Tag: v4.3.17~22 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=3318e4e4e5816d89ab13f4a33cdcc30211cbc55b Require friendly relations for trade ship to pay off --- diff --git a/info/Trade-ships.t b/info/Trade-ships.t index 95034546a..ce29cadd4 100644 --- a/info/Trade-ships.t +++ b/info/Trade-ships.t @@ -12,8 +12,8 @@ In the empire version, you make a trade ship, using lots of cm's, and costing $2500. You then sail it to a harbor somewhere and scuttle it. You then receive money, with a varying rate of return. .s1 -The trade ship MUST be scuttled in a harbor that is at least 2% efficient to -make money. (In other sectors, +The trade ship MUST be scuttled in a friendly harbor that is at least +2% efficient to make money. (In other sectors, it sinks quietly, like most ships) You may scuttle it in either a harbor you own, or the harbor of an ally. Pirates who capture a trade ship may also gain money from it, just as if they were the lawful owner (although the news knows diff --git a/src/lib/commands/scut.c b/src/lib/commands/scut.c index 9454f3e28..f5adb17aa 100644 --- a/src/lib/commands/scut.c +++ b/src/lib/commands/scut.c @@ -165,7 +165,8 @@ scuttle_tradeship(struct shpstr *sp, int interactive) mp = &mchr[(int)sp->shp_type]; getsect(sp->shp_x, sp->shp_y, §); - 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 */