(lcarg, ldump): Display civ, mil, and uw cargo for land units.

Remove full name from lcarg() to make room.  Closes #889646.
This commit is contained in:
Ron Koenderink 2006-01-31 17:32:33 +00:00
parent 7b9fdf8b95
commit c500f4adc3
2 changed files with 22 additions and 3 deletions

View file

@ -105,12 +105,15 @@ lcarg(void)
if ((player->cnum != land.lnd_own) && !player->god)
continue;
if (nunits++ == 0)
pr("lnd# unit type x,y a eff sh gun pet irn dst bar oil lcm hcm rad\n");
pr("lnd# unit x,y a eff civ mil uw sh gun pet irn dst bar oil lcm hcm rad\n");
pr("%4d ", ni.cur);
pr("%-16.16s ", lchr[(int)land.lnd_type].l_name);
pr("%-4.4s ", lchr[(int)land.lnd_type].l_name);
prxy("%4d,%-4d ", land.lnd_x, land.lnd_y, player->cnum);
pr(" %c", land.lnd_army);
pr("%4d%%", land.lnd_effic);
pr("%4d", land.lnd_item[I_CIVIL]);
pr("%4d", land.lnd_item[I_MILIT]);
pr("%4d", land.lnd_item[I_UW]);
pr("%4d", land.lnd_item[I_SHELL]);
pr("%4d", land.lnd_item[I_GUN]);
pr("%4d", land.lnd_item[I_PETROL]);

View file

@ -62,7 +62,7 @@ ldump(void)
nunits = 0;
if (!player->argp[2]) {
for (n = 1; n <= 39; n++)
for (n = 1; n <= 41; n++)
field[n - 1] = n;
field[n - 1] = 0;
} else {
@ -147,6 +147,10 @@ ldump(void)
field[i++] = 38;
} else if (!strcmp("aaf", player->argp[n])) {
field[i++] = 39;
} else if (!strcmp("uw", player->argp[n])) {
field[i++] = 40;
} else if (!strcmp("civ", player->argp[n])) {
field[i++] = 41;
} else {
pr("Unrecognized field %s\n", player->argp[n]);
}
@ -285,6 +289,12 @@ ldump(void)
case 39:
pr(" aaf");
break;
case 40:
pr(" uw");
break;
case 41:
pr(" civ");
break;
}
n++;
}
@ -429,6 +439,12 @@ ldump(void)
case 39:
pr(" %d", land.lnd_aaf);
break;
case 40:
pr(" %d", land.lnd_item[I_UW]);
break;
case 41:
pr(" %d", land.lnd_item[I_CIVIL]);
break;
}
}
pr("\n");