(P_SHELL, P_GUN, P_PETROL, P_IRON, P_DUST, P_BAR, P_FOOD, P_OIL)

(P_LCM, P_HCM, P_TLEV, P_RLEV, P_ELEV, P_HLEV, P_URAN): Use -1 instead
of 0 for `no product', shift down product indexes and update
product.config and sector.config accordingly.
(budg, prod, show_sect_capab, produce, produce_sect): Adapt test for
no product.
(ef_elt_byname): Remove the hack to hide pchr[0].
(prod_eff): Oops on no product.
This commit is contained in:
Markus Armbruster 2006-06-05 17:44:25 +00:00
parent 08937006d7
commit f284b0beab
9 changed files with 62 additions and 60 deletions

View file

@ -96,7 +96,7 @@ budg(void)
pr("%-17s\t\t", dchr[i].d_name);
if (i == SCT_ENLIST)
pr("%ld mil \t", p_sect[i][0]);
else if (pchr[dchr[i].d_prd].p_cost != 0)
else if (dchr[i].d_prd >= 0)
pr("%ld %-7s\t", p_sect[i][0], pchr[dchr[i].d_prd].p_sname);
else
pr("\t\t");