]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/work.c
Update copyright notice
[empserver] / src / lib / commands / work.c
index 903717279e6cfd5f5f2ef201e406e0a87aa5c886..ea9b0042a9a1ebef368d08624949b4055b9dc786 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  work.c: Implementation of the work command
- * 
+ *
  *  Known contributors to this file:
  *     Markus Armbruster, 2008
  */
@@ -87,6 +87,11 @@ work(void)
        }
        cost = 0.0;
        w = buildeff(&sect, w, &cost);
+       if (w == 0) {
+           pr("%s can't change efficiency in %s\n",
+              prland(&land), xyas(land.lnd_x, land.lnd_y, player->cnum));
+           continue;
+       }
        if (player->dolcost + cost > natp->nat_money) {
            pr("You can't afford to work that much in %s!\n",
               xyas(land.lnd_x, land.lnd_y, player->cnum));