(get_materials): Redesign.
(shiprepair, planerepair, landrepair): Use it. Behavioral change: ship repairs outside harbors and plane repairs by a carrier can use fewer materials. Before, such repairs consumed each required commodity as far as available. Now, they consume the same fraction of the real cost of each commodity, i.e. commodity use is limited by the most scarce commodity. Neither old nor new behavior make much sense, but the new code is simpler.
This commit is contained in:
parent
63bdc89835
commit
ac9cdf5bb9
5 changed files with 51 additions and 127 deletions
|
@ -42,7 +42,7 @@
|
|||
void fill_update_array(int *bp, struct sctstr *sp);
|
||||
int gt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm);
|
||||
void pt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm, int amount);
|
||||
void get_materials(struct sctstr *sp, int *bp, int *mvec, int check);
|
||||
int get_materials(struct sctstr *, int *, int *, int);
|
||||
|
||||
extern long money[MAXNOC];
|
||||
extern long pops[MAXNOC];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue