From b4e9c5dcb73ecd7b31dc866c00e0e43f40d2ae92 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Aug 2016 19:08:54 +0200 Subject: [PATCH] show: Show infra costs in the same format as sector build costs Use similar column headings, and show cost for 100% instead of 1%. Signed-off-by: Markus Armbruster --- src/lib/subs/show.c | 11 ++++++----- tests/version/journal.log | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib/subs/show.c b/src/lib/subs/show.c index abeb9530..0c660db7 100644 --- a/src/lib/subs/show.c +++ b/src/lib/subs/show.c @@ -425,11 +425,12 @@ show_sect_build(int foo) if (!intrchr[i].in_enable) continue; if (first) - pr("\nInfrastructure building - adding 1 point of efficiency costs:\n" - " type lcms hcms mobility $$$$\n"); - pr("%-20s %4d %4d %8d %4d\n", - intrchr[i].in_name, intrchr[i].in_lcms, intrchr[i].in_hcms, - intrchr[i].in_mcost, intrchr[i].in_dcost); + pr("\n build 100%% efficiency\n" + "infrastructure type lcm hcm mobil $\n"); + pr("%-23.23s %4d %4d %5d %5d\n", + intrchr[i].in_name, + intrchr[i].in_lcms * 100, intrchr[i].in_hcms * 100, + intrchr[i].in_mcost * 100, intrchr[i].in_dcost * 100); first = 0; } } diff --git a/tests/version/journal.log b/tests/version/journal.log index 6a962dab..c67f171a 100644 --- a/tests/version/journal.log +++ b/tests/version/journal.log @@ -117,9 +117,9 @@ Play#0 output Play#0 1 ~ plains 0 0 100 0 0 Play#0 output Play#0 1 any other 0 0 100 100 0 Play#0 output Play#0 1 - Play#0 output Play#0 1 Infrastructure building - adding 1 point of efficiency costs: - Play#0 output Play#0 1 type lcms hcms mobility $$$$ - Play#0 output Play#0 1 road network 2 2 1 2 + Play#0 output Play#0 1 build 100% efficiency + Play#0 output Play#0 1 infrastructure type lcm hcm mobil $ + Play#0 output Play#0 1 road network 200 200 100 200 Play#0 output Play#0 6 0 640 Play#0 input show sect c Play#0 command show