]> git.pond.sub.org Git - empserver/commitdiff
Forbid selling conquered populace
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Jul 2012 12:51:45 +0000 (14:51 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 13 Jul 2012 18:15:34 +0000 (20:15 +0200)
Only relevant when the deity allows selling civilians by customizing
table item, which is probably a bad idea.

src/lib/commands/sell.c

index 2b5197143ce2f15786c387ad354916449ff8805a..0970f8ca8a3da76e06119de17994bb2e96890afd 100644 (file)
@@ -94,6 +94,10 @@ sell(void)
        pr("Sectors need at least 1 mobility to sell goods.\n");
        return RET_FAIL;
     }
+    if (ip->i_uid == I_CIVIL && sect.sct_oldown != sect.sct_own) {
+       pr("You can't sell conquered populace!\n");
+       return RET_FAIL;
+    }
     p = getstarg(player->argp[3], "Quantity: ", buf);
     if (!p || !*p)
        return RET_SYN;