edit: Print ship and land unit items with field width 5

print_items() uses field widths between 3 and 5.  They go back all the
way to Empire 1, and are fine for the stock game.  Widen the narrower
ones to 5, because a consistent field width looks tidier, and can
avoid misaligned columns with customized ships and land units.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2017-08-27 12:37:53 +02:00
parent 6e320cc625
commit 2902cc22c4
2 changed files with 25 additions and 25 deletions

View file

@ -267,22 +267,22 @@ print_plane(struct plnstr *plane)
static void static void
print_items(short item[]) print_items(short item[])
{ {
pr("civ mil uw food shl gun pet irn dst oil lcm hcm rad\n"); pr(" civ mil uw food sh gun pet iron dust oil lcm hcm rad\n"
pr(" c m u f s g p i d o l h r\n"); " c m u f s g p i d o l h r\n"
pr("%3d", item[I_CIVIL]); "%5d%5d%5d%5d%5d%5d%5d%5d%5d%5d%5d%5d%5d\n",
pr("%4d", item[I_MILIT]); item[I_CIVIL],
pr("%4d", item[I_UW]); item[I_MILIT],
pr("%5d", item[I_FOOD]); item[I_UW],
pr("%4d", item[I_SHELL]); item[I_FOOD],
pr("%4d", item[I_GUN]); item[I_SHELL],
pr("%5d", item[I_PETROL]); item[I_GUN],
pr("%5d", item[I_IRON]); item[I_PETROL],
pr("%5d", item[I_DUST]); item[I_IRON],
pr("%5d", item[I_OIL]); item[I_DUST],
pr("%5d", item[I_LCM]); item[I_OIL],
pr("%5d", item[I_HCM]); item[I_LCM],
pr("%4d", item[I_RAD]); item[I_HCM],
pr("\n"); item[I_RAD]);
} }
static void static void

View file

@ -1487,7 +1487,7 @@
Play#0 output Play#0 1 Mobility <M>: 0 Fleet <F>: Play#0 output Play#0 1 Mobility <M>: 0 Fleet <F>:
Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0 Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0
Play#0 output Play#0 1 Plague Stage <a>: 0 Plague Time <b>: 0 Play#0 output Play#0 1 Plague Stage <a>: 0 Plague Time <b>: 0
Play#0 output Play#0 1 civ mil uw food shl gun pet irn dst oil lcm hcm rad Play#0 output Play#0 1 civ mil uw food sh gun pet iron dust oil lcm hcm rad
Play#0 output Play#0 1 c m u f s g p i d o l h r Play#0 output Play#0 1 c m u f s g p i d o l h r
Play#0 output Play#0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Play#0 output Play#0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Play#0 output Play#0 4 %c xxxxx -- thing value : Play#0 output Play#0 4 %c xxxxx -- thing value :
@ -1511,7 +1511,7 @@
Play#0 output Play#0 1 Mobility <M>: 2 Fleet <F>: Play#0 output Play#0 1 Mobility <M>: 2 Fleet <F>:
Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0 Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0
Play#0 output Play#0 1 Plague Stage <a>: 0 Plague Time <b>: 0 Play#0 output Play#0 1 Plague Stage <a>: 0 Plague Time <b>: 0
Play#0 output Play#0 1 civ mil uw food shl gun pet irn dst oil lcm hcm rad Play#0 output Play#0 1 civ mil uw food sh gun pet iron dust oil lcm hcm rad
Play#0 output Play#0 1 c m u f s g p i d o l h r Play#0 output Play#0 1 c m u f s g p i d o l h r
Play#0 output Play#0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 Play#0 output Play#0 1 0 1 0 1 0 0 0 0 0 0 0 0 0
Play#0 output Play#0 4 %c xxxxx -- thing value : Play#0 output Play#0 4 %c xxxxx -- thing value :
@ -1552,7 +1552,7 @@
Play#0 output Play#0 1 Fortification <F>: 0 Land unit <Y>: -1 Play#0 output Play#0 1 Fortification <F>: 0 Land unit <Y>: -1
Play#0 output Play#0 1 Ship <S>: -1 Retreat percentage <Z>: 42 Play#0 output Play#0 1 Ship <S>: -1 Retreat percentage <Z>: 42
Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0 Play#0 output Play#0 1 Retreat path <R>: '' Retreat Flags <W>: 0
Play#0 output Play#0 1 civ mil uw food shl gun pet irn dst oil lcm hcm rad Play#0 output Play#0 1 civ mil uw food sh gun pet iron dust oil lcm hcm rad
Play#0 output Play#0 1 c m u f s g p i d o l h r Play#0 output Play#0 1 c m u f s g p i d o l h r
Play#0 output Play#0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Play#0 output Play#0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Play#0 output Play#0 4 %c xxxxx -- thing value : Play#0 output Play#0 4 %c xxxxx -- thing value :