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 d7a9593f35
commit 9b84153038
10 changed files with 82 additions and 83 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 */