- if (nsect++ == 0) {
- pr("PRODUCTION SIMULATION\n");
- pr(" sect des eff wkfc will make- p.e. cost use1 use2 use3 max1 max2 max3 max\n");
- }
-
- prxy("%4d,%-4d", nstr.x, nstr.y, player->cnum);
- pr(" %c", dchr[type].d_mnem);
- pr(" %3.0f%%", p_e * 100.0);
-
- pr(" %4d", wforce);
- if (vtype != I_NONE) {
- pr(" %4d", (int)(real + 0.5));
- } else if (type != SCT_ENLIST) {
- switch (pp->p_level) {
- case NAT_TLEV:
- case NAT_RLEV:
- pr(" %1.2f", real);
- break;
- case NAT_ELEV:
- case NAT_HLEV:
- pr(" %4.0f", real);
- break;
- default:
- pr("ERROR");
- break;
- }
- } else {
- int maxmil;
- int enlisted;
- int civs;
-
- civs = min(999, (int)((obrate * etu_per_update + 1.0)
- * sect.sct_item[I_CIVIL]));
- natp = getnatp(sect.sct_own);
- maxpop = max_pop((float)natp->nat_level[NAT_RLEV], §);
- civs = min(civs, maxpop);
- /* This isn't quite right, since research might
- rise/fall during the update, but it's the best
- we can really do */
- enlisted = 0;
- maxmil = (civs / 2) - sect.sct_item[I_MILIT];
- if (maxmil > 0) {
- enlisted = (etu_per_update
- * (10 + sect.sct_item[I_MILIT])
- * 0.05);
- if (enlisted > maxmil)
- enlisted = maxmil;
- }
- if (enlisted < 0)
- enlisted = 0;
- if (natp->nat_priorities[type] == 0) {
- maxmil = 0;
- }
- pr(" %4d mil 1.00 $%-5d%3dc",
- enlisted, enlisted * 3, enlisted);
- pr(" %3dc %4d\n",
- enlisted, maxmil);
- continue;
+ for (i = 0; i < MAXPRCON; ++i) {
+ cmnem[i] = cuse[i] = cmax[i] = 0;
+ if (!pp->p_camt[i])
+ continue;
+ it = pp->p_ctype[i];
+ if (CANT_HAPPEN(it <= I_NONE || I_MAX < it))
+ continue;
+ cmnem[i] = ichr[it].i_mnem;
+ cuse[i] = (int)ceil(take * pp->p_camt[i]);
+ cmax[i] = (int)ceil(mtake * pp->p_camt[i]);