(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:
parent
08937006d7
commit
f284b0beab
9 changed files with 62 additions and 60 deletions
|
@ -95,9 +95,9 @@ ef_elt_byname(int type, char *name)
|
|||
offsetof(struct ichrstr, i_name),
|
||||
sizeof(ichr[0]));
|
||||
case EF_PRODUCT:
|
||||
return 1 + stmtch(name, pchr + 1,
|
||||
offsetof(struct pchrstr, p_sname),
|
||||
sizeof(pchr[0]));
|
||||
return stmtch(name, pchr,
|
||||
offsetof(struct pchrstr, p_sname),
|
||||
sizeof(pchr[0]));
|
||||
case EF_TABLE:
|
||||
return stmtch(name, empfile,
|
||||
offsetof(struct empfile, name),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue