(IPKG): New.

(ichr): Set IPKG packing bonus for all sectors to 1.
(move): Use it.  No functional change.
(deliver, dodistribute): Use it.  Inefficient sectors now get IPKG
instead of NPKG packing bonus, cutting civilian packing bonus from 10
to 1.

(dodistribute): Export uses the better of sector or distribution
center packing bonus.  Previously, it assumed that distribution center
WPKG packing is always best.  Which is currently true, but needlessly
breaks the abstraction.
This commit is contained in:
Markus Armbruster 2004-08-28 08:43:57 +00:00
parent 92799db17b
commit 5ec392227a
5 changed files with 52 additions and 59 deletions

View file

@ -61,11 +61,9 @@ move(void)
int left;
int mcost, dam;
int infected;
int stype;
int vtype;
int amt_src;
int amt_dst;
struct dchrstr *dp;
struct ichrstr *ip;
int work;
int loyal;
@ -100,8 +98,6 @@ move(void)
return RET_FAIL;
}
}
stype = sect.sct_type;
dp = &dchr[stype];
infected = sect.sct_pstage == PLG_INFECT;
amt_src = sect.sct_item[vtype];
if (!istest && amt_src <= 0) {
@ -155,10 +151,8 @@ move(void)
if (amount <= 0)
return RET_SYN;
packing = ip->i_pkg[dp->d_pkg];
if (packing > 1 && sect.sct_effic < 60)
packing = 1;
weight = (double)amount *ip->i_lbs / packing;
packing = sect.sct_effic >= 60 ? dchr[sect.sct_type].d_pkg : IPKG;
weight = (double)amount * ip->i_lbs / ip->i_pkg[packing];
/*
* First remove commodities from source sector
*/