config: Generalize infrastructure build materials storage
Infrastructure requires lcms and hcms to build. The build materials are exposed as infrastructure columns lcms, hcms (struct sctintrins members in_lcms, in_hcms). They are per point of efficiency. In contrast, sector and unit build materials are defined for 100%. We want to define build materials for 100% now, for flexibility and consistency, and we want to optionally support more build materials in the future. Replace members in_lcms and in_hcms by array in_mat[], and provide selectors l_build and h_build. Additionally provide selectors for all other item types, with value zero, to help clients prepare for future additional materials. Use CA_DUMP_ONLY to keep them out of configuration tables until they actually work. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
c8b51ec1a8
commit
5d3abc9917
8 changed files with 52 additions and 50 deletions
|
@ -216,8 +216,8 @@ extern struct dchrstr dchr[SCT_TYPE_MAX + 2];
|
|||
/* Each cost is per point of efficency */
|
||||
struct sctintrins {
|
||||
char *in_name;
|
||||
unsigned char in_lcms; /* construction materials */
|
||||
unsigned char in_hcms;
|
||||
short in_mat[I_MAX+1]; /* materials to build 100% */
|
||||
/* non-zero only for I_LCM and I_HCM */
|
||||
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