config: Make product work independently configurable

The work required for a product is traditionally the amount of raw
materials, plus 1 for resource usage, or 1 if using neither.  Make it
independently configurable instead, via new product selector bwork,
backed by new struct pchrstr member p_bwork.  Keep the required work
exactly the same in the default configuration.

Clients that compute work from materials need to be updated.  Easy,
since build work is now exposed in xdump.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2021-01-07 07:14:27 +01:00
parent 8c9a383fa1
commit 1d8451e87b
10 changed files with 83 additions and 84 deletions

View file

@ -45,6 +45,7 @@ struct pchrstr {
int p_uid;
i_type p_ctype[MAXPRCON]; /* constituent types */
unsigned short p_camt[MAXPRCON]; /* constituent amounts */
int p_bwork; /* work to build one product unit */
i_type p_type; /* product item type, or I_NONE if level */
int p_level; /* level index (NAT_?LEV), or -1 if item */
int p_cost; /* dollars / product unit */