config: Make work to build sectors configurable

Traditionally, building up 100% takes 100 work.  Make the work to
build configurable, via new sect-chr selector bwork, backed by new
struct dchrstr member d_bwork.  Keep the required work exactly the
same for now.

Tearing down sectors remains four times easier than building.

Clients that hardcode sector build work 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 2016-06-05 22:49:07 +02:00
parent bb9619c053
commit 2ffd7b948d
6 changed files with 143 additions and 142 deletions

View file

@ -402,8 +402,8 @@ show_sect_build(int foo)
{
int i, first;
pr(" build 100%% eff maint\n"
"sector type lcm hcm $ $\n");
pr(" build 100%% efficiency maint\n"
"sector type lcm hcm avail $ $\n");
for (i = 0; dchr[i].d_name; i++) {
if (dchr[i].d_mnem == 0)
continue;
@ -413,12 +413,13 @@ show_sect_build(int foo)
&& !dchr[i].d_mat[I_LCM] && !dchr[i].d_mat[I_HCM]
&& dchr[i].d_maint == 0)
continue; /* the usual, skip */
pr("%c %-21.21s %5d%5d %5d %5d\n",
pr("%c %-21.21s %4d %4d %5d %5d %5d\n",
dchr[i].d_mnem, dchr[i].d_name,
dchr[i].d_mat[I_LCM], dchr[i].d_mat[I_HCM], dchr[i].d_cost,
dchr[i].d_mat[I_LCM], dchr[i].d_mat[I_HCM],
dchr[i].d_bwork, dchr[i].d_cost,
dchr[i].d_maint * etu_per_update);
}
pr("any other 0 0 100 0\n");
pr("any other 0 0 100 100 0\n");
first = 1;
for (i = 0; intrchr[i].in_name; i++) {