From 4b8c429d00669ee193ecc4f441c047e20fe607b2 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 29 May 2016 11:58:32 +0200 Subject: [PATCH] bomb: Don't list bombable commodities on invalid selection comm_bomb() first lists commodities that can be bombed and are present, then prompts for the one to bomb. If the player selects a bomb-proof one, it rejects it, lists the bombable ones, and prompts again. This can only happen when option SUPER_BARS is enabled, and the player selects bars. Looks like this: Bomb what? (ship, plane, land unit, efficiency, commodities) c some civilians some military commodity to bomb? b You can't bomb bars of gold! Bombable: civilians, military, shells, guns, petrol, iron ore, dust (gold), food, oil, light products, heavy products, uncompensated workers, radioactive materials commodity to bomb? The list is of marginal value. It was more useful back when comm_bomb() didn't list commodities before prompting (BSD Empire 1.1). It's also illegible. Drop it. Signed-off-by: Markus Armbruster --- src/lib/commands/bomb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index a1dc3685..1de00905 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -329,16 +329,9 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target) if (&ichr[bombcomm[i]] == ip) break; } - if (i == nbomb) { + if (i == nbomb) pr("You can't bomb %s!\n", ip->i_name); - for (i = 0; i < nbomb; i++) { - if (opt_SUPER_BARS && bombcomm[i] == I_BAR) - continue; - pr("%s%s", i == 0 ? "Bombable: " : ", ", - ichr[bombcomm[i]].i_name); - } - pr("\n"); - } else + else break; } for (qp = list->q_forw; qp != list; qp = next) {