]> git.pond.sub.org Git - empserver/commitdiff
collect: Don't permit confiscation of active capital
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 11 Jun 2016 14:45:39 +0000 (16:45 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:59 +0000 (19:59 +0200)
The whole idea of a sector acquiescing to takeover by lawyers waving
loan documents "proving" it's rightfully theirs is pretty
preposterous.  But a capital giving itself up that way (and then
paying out half the nation's treasury on top) beggars belief.
Disallow it.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
info/collect.t
src/lib/commands/coll.c

index b5889bbfade3e77cfb9d067781de28a265c94528..494f90d29c79892eb0931bd78c1b72d3758ceb4e 100644 (file)
@@ -8,8 +8,6 @@ Through the collect command overdue loans can be \*Qcleared up\*U.
 If you should find that you have a problem debtor who refuses
 to pay up on your kind loan you can always seize one or more
 of his/her sectors.
-Perhaps the mere threat of a collection on
-someone's capital may do the trick!
 .s1
 To settle up accounts on overdue loan #9 you would type:
 .EX collect 9
index 4b6a0b28ba6213420d4e02f691cd3c0fda5e6692..1afc7d979b19d209f17c607da40a1ba89cd90d3a 100644 (file)
@@ -50,6 +50,7 @@ coll(void)
     char *p;
     struct lonstr loan;
     struct sctstr sect;
+    struct natstr *lonee_np;
     coord x, y;
     double owed;
     double pay;
@@ -76,6 +77,7 @@ coll(void)
        return RET_FAIL;
     }
 
+    lonee_np = getnatp(loan.l_lonee);
     pr("You are owed $%.2f on that loan.\n", owed);
     p = getstarg(player->argp[2],
                 "What sector do you wish to confiscate? ", buf);
@@ -106,6 +108,12 @@ coll(void)
           owed);
        return RET_FAIL;
     }
+    if (!influx(lonee_np)
+       && sect.sct_x == lonee_np->nat_xcap
+       && sect.sct_y == lonee_np->nat_ycap) {
+       pr("%s's capital cannot be confiscated.\n", cname(loan.l_lonee));
+       return RET_FAIL;
+    }
     pr("That sector (and its contents) is valued at $%.2f\n", pay);
 
     sect.sct_item[I_MILIT] = 1;        /* FIXME now where did this guy come from? */
@@ -115,15 +123,11 @@ coll(void)
      * unwanted things, like generate che.
      */
     sect.sct_own = player->cnum;
-
     memset(sect.sct_dist, 0, sizeof(sect.sct_dist));
     memset(sect.sct_del, 0, sizeof(sect.sct_del));
     sect.sct_off = 1;
     sect.sct_dist_x = sect.sct_x;
     sect.sct_dist_y = sect.sct_y;
-
-    if (sect.sct_type == SCT_CAPIT || sect.sct_type == SCT_MOUNT)
-       caploss(&sect, loan.l_lonee, "that was %s's capital!\n");
     putsect(&sect);
     nreport(player->cnum, N_SEIZE_SECT, loan.l_lonee, 1);
     owed = loan_owed(&loan, time(&now));