- Orks wieder in den Parteibericht.

This commit is contained in:
Christian Schlittchen 2002-02-18 16:19:50 +00:00
parent 117733928b
commit 5cf07a350c
2 changed files with 55 additions and 16 deletions

View File

@ -3312,13 +3312,22 @@ writeforward(void)
fclose(forwardFile); fclose(forwardFile);
} }
static void
out_faction(FILE *file, faction *f)
{
fprintf(file, "%s (%.3s/%.3s), %d Einh., %d Pers., $%d, %d %s\n",
factionname(f), LOC(default_locale, rc_name(f->race, 0)),
neue_gebiete[f->magiegebiet], f->nunits, f->number, f->money,
turn - f->lastorders, turn - f->lastorders != 1 ? "NMRs" : "NMR ");
}
void void
report_summary(summary * s, summary * o, boolean full) report_summary(summary * s, summary * o, boolean full)
{ {
FILE * F = NULL; FILE * F = NULL;
int i, newplayers = 0; int i, newplayers = 0;
faction * f; faction * f;
int nmrs[ORDERGAP]; int nmrs[ORDERGAP+1];
{ {
char zText[MAX_PATH]; char zText[MAX_PATH];
@ -3351,7 +3360,7 @@ report_summary(summary * s, summary * o, boolean full)
fprintf(F, "Aktive Vulkane: %d\n\n", s->active_volcanos); fprintf(F, "Aktive Vulkane: %d\n\n", s->active_volcanos);
} }
for (i = 0; i <= RC_AQUARIAN; i++) if (s->factionrace[i] && playerrace(new_race[i])) { for (i = 0; i < MAXRACES; i++) if (s->factionrace[i] && playerrace(new_race[i])) {
fprintf(F, "%14svölker: %s\n", fprintf(F, "%14svölker: %s\n",
LOC(default_locale, rc_name(new_race[i], 3)), pcomp(s->factionrace[i], o->factionrace[i])); LOC(default_locale, rc_name(new_race[i], 3)), pcomp(s->factionrace[i], o->factionrace[i]));
} }
@ -3379,7 +3388,7 @@ report_summary(summary * s, summary * o, boolean full)
rcomp(s->poprace[i],o->poprace[i])); rcomp(s->poprace[i],o->poprace[i]));
} }
} else { } else {
for (i = 0; i <= RC_AQUARIAN; i++) if (s->poprace[i] && playerrace(new_race[i])) { for (i = 0; i < MAXRACES; i++) if (s->poprace[i] && playerrace(new_race[i])) {
fprintf(F, "%20s: %s\n", LOC(default_locale, rc_name(new_race[i], 1)), fprintf(F, "%20s: %s\n", LOC(default_locale, rc_name(new_race[i], 1)),
rcomp(s->poprace[i],o->poprace[i])); rcomp(s->poprace[i],o->poprace[i]));
} }
@ -3410,7 +3419,7 @@ report_summary(summary * s, summary * o, boolean full)
fprintf(F, "\n\n"); fprintf(F, "\n\n");
for (i = 0; i != ORDERGAP; i++) { for (i = 0; i != ORDERGAP+1; ++i) {
nmrs[i] = 0; nmrs[i] = 0;
} }
@ -3418,13 +3427,17 @@ report_summary(summary * s, summary * o, boolean full)
if (f->age <= 1 && turn - f->lastorders == 1) { if (f->age <= 1 && turn - f->lastorders == 1) {
newplayers++; newplayers++;
} else if (f->no != MONSTER_FACTION) { } else if (f->no != MONSTER_FACTION) {
nmrs[min(ORDERGAP-1,turn-f->lastorders)]++; nmrs[min(ORDERGAP,turn-f->lastorders)]++;
} }
} }
for (i = 0; i != ORDERGAP; i++) { for (i = 0; i != ORDERGAP+1; ++i) {
fprintf(F, "%d %s:\t\t %d\n", i, if(i == ORDERGAP) {
i != 1 ? "NMRs" : "NMR ", nmrs[i]); fprintf(F, "+ NMRs:\t\t %d\n", nmrs[i]);
} else {
fprintf(F, "%d %s:\t\t %d\n", i,
i != 1 ? "NMRs" : "NMR ", nmrs[i]);
}
} }
if (age) { if (age) {
if (age[2] != 0) { if (age[2] != 0) {
@ -3439,12 +3452,26 @@ report_summary(summary * s, summary * o, boolean full)
if (factions) if (factions)
fprintf(F, "\nParteien:\n\n"); fprintf(F, "\nParteien:\n\n");
for (f = factions; f; f = f->next) for (f = factions; f; f = f->next) {
fprintf(F, "%s (%.3s/%.3s), %d Einh., %d Pers., $%d, %d %s\n", out_faction(F, f);
factionname(f), LOC(default_locale, rc_name(f->race, 0)), neue_gebiete[f->magiegebiet], }
f->nunits, f->number, f->money,
turn - f->lastorders, if(full) {
turn - f->lastorders != 1 ? "NMRs" : "NMR "); fprintf(F, "\n\nFactions with NMRs:\n");
for (i = ORDERGAP; i > 0; --i) {
for(f=factions; f; f=f->next) {
if(i == ORDERGAP) {
if(turn - f->lastorders >= i) {
out_faction(F, f);
}
} else {
if(turn - f->lastorders == i) {
out_faction(F, f);
}
}
}
}
}
fclose(F); fclose(F);

View File

@ -2470,10 +2470,16 @@ peasant_adjustment(void)
terrain_t ter; terrain_t ter;
int sum, avg, c; int sum, avg, c;
double freeall, pool; /* long long is illegal */ double freeall, pool; /* long long is illegal */
long long s;
region *r;
s = 0;
for(r=regions; r; r=r->next) {
s += rpeasants(r);
}
log_printf("BAUERN vorher: %lld\n",s);
for(ter = 0; ter < MAXTERRAINS; ter++) { for(ter = 0; ter < MAXTERRAINS; ter++) {
region *r;
if(terrain[ter].production_max <= 0) continue; if(terrain[ter].production_max <= 0) continue;
c = 0; c = 0;
@ -2548,6 +2554,12 @@ peasant_adjustment(void)
} }
} }
s = 0;
for(r=regions; r; r=r->next) {
s += rpeasants(r);
}
log_printf("BAUERN nachher: %lld\n",s);
return 0; return 0;
} }