From 37af1d7eb9083c203d0c6a7d566937509da098b5 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 15 Jan 2021 08:16:13 +0100 Subject: [PATCH] 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 --- src/lib/commands/work.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 85a2dfe1..545618e6 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -67,6 +67,11 @@ work(void) continue; if (!(lchr[(int)land.lnd_type].l_flags & L_ENGINEER)) 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) { pr("%s has no mobility!\n", prland(&land)); continue;