work: Don't let embarked engineers work
Engineers can work even when loaded on a ship or land unit. They happily raise sea sector efficiency. That's just wrong. It's questionable even on land, because unloading need not be possible. Has been that way since the command was added in Empire 2. Add the missing check. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
5f3c64c062
commit
e23e4cd738
1 changed files with 6 additions and 1 deletions
|
@ -27,7 +27,7 @@
|
||||||
* work.c: Implementation of the work command
|
* work.c: Implementation of the work command
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Markus Armbruster, 2009-2016
|
* Markus Armbruster, 2009-2021
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -67,6 +67,11 @@ work(void)
|
||||||
continue;
|
continue;
|
||||||
if (!(lchr[(int)land.lnd_type].l_flags & L_ENGINEER))
|
if (!(lchr[(int)land.lnd_type].l_flags & L_ENGINEER))
|
||||||
continue;
|
continue;
|
||||||
|
if (land.lnd_ship >= 0 || land.lnd_land >= 0) {
|
||||||
|
pr("%s is on a %s\n",
|
||||||
|
prland(&land), land.lnd_ship >= 0 ? "ship" : "land unit");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (land.lnd_mobil <= 0) {
|
if (land.lnd_mobil <= 0) {
|
||||||
pr("%s has no mobility!\n", prland(&land));
|
pr("%s has no mobility!\n", prland(&land));
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue