]> git.pond.sub.org Git - empserver/commitdiff
collect: Don't disclose sector value when it exceeds loan
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 11 Jun 2016 14:04:54 +0000 (16:04 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:59 +0000 (19:59 +0200)
When collect refuses to confiscate a sector because it's value exceeds
the amount owed, it still tells the player the exact value.  Don't.
Don't give the player something for nothing.

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

index 665307b9969756a469d72a7313133c89a56d84d6..b5889bbfade3e77cfb9d067781de28a265c94528 100644 (file)
@@ -23,10 +23,7 @@ debtor to which you are adjacent.
 Any adjacent sector includes any sector you have that borders the
 sector you wish to confiscate.
 .s1
 Any adjacent sector includes any sector you have that borders the
 sector you wish to confiscate.
 .s1
-The program then paws over the sector and assesses its value:
-.NF
-That sector (and its contents) is valued at $2345.00
-.FI
+The program then paws over the sector and assesses its value.
 If the amount you are owed exceeds this amount the sector
 becomes yours!
 If the value of the sector is close enough to the
 If the amount you are owed exceeds this amount the sector
 becomes yours!
 If the value of the sector is close enough to the
index 0e4fc1d3d58a26c790772986b9981d2efcb459e8..4b6a0b28ba6213420d4e02f691cd3c0fda5e6692 100644 (file)
  *
  *  ---
  *
  *
  *  ---
  *
- *  coll.c: Collet on a loan
+ *  coll.c: Collect on a loan
  *
  *  Known contributors to this file:
  *     Pat Loney, 1992
  *     Steve McClure, 1996-2000
  *
  *  Known contributors to this file:
  *     Pat Loney, 1992
  *     Steve McClure, 1996-2000
+ *     Markus Armbruster, 2004-2016
  */
 
 #include <config.h>
  */
 
 #include <config.h>
@@ -100,11 +101,13 @@ coll(void)
        val = sect.sct_item[ichr[i].i_uid];
        pay += val * ichr[i].i_value;
     }
        val = sect.sct_item[ichr[i].i_uid];
        pay += val * ichr[i].i_value;
     }
-    pr("That sector (and its contents) is valued at $%.2f\n", pay);
     if (pay > owed * 1.2) {
     if (pay > owed * 1.2) {
-       pr("That is more than is owed!\n");
+       pr("That sector (and its contents) is valued at more than %.2f.\n",
+          owed);
        return RET_FAIL;
     }
        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? */
 
     /*
     sect.sct_item[I_MILIT] = 1;        /* FIXME now where did this guy come from? */
 
     /*