config: Define infra build cost and mobility use per 100%
Infrastructure build cost is defined by infra column dcost (struct sctintrins member in_dcost). It's the cost per point of efficiency. In contrast, sector and unit build cost is defined for 100%, by sect-chr, ship-chr, plane-chr, land-chr, nuke-chr column cost. Switch to build cost per 100%, for flexibility and consistency: replace struct sctintrins member in_dcost by in_cost, and selector dcost by cost. With cost values that aren't multiple of 100, the build cost may have to be rounded. Do this exactly like we round sector build cost: the amount is limited to money * 100 / cost rounded down, but the money charged is actual amount * money / 100 rounded randomly. Do the same for mobility use: replace struct sctintrins member in_mcost by in_bmobil, and selector mcost by bmobil, with similar rounding. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
f9114aecd8
commit
c8b51ec1a8
8 changed files with 42 additions and 43 deletions
|
@ -218,8 +218,8 @@ struct sctintrins {
|
|||
char *in_name;
|
||||
unsigned char in_lcms; /* construction materials */
|
||||
unsigned char in_hcms;
|
||||
unsigned char in_dcost; /* dollars */
|
||||
unsigned char in_mcost; /* mobility */
|
||||
short in_bmobil; /* mobility to build 100% */
|
||||
int in_cost; /* cost to build 100% */
|
||||
unsigned char in_enable; /* enabled iff non-zero */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue