forked from github/server
reduce cron log spam
This commit is contained in:
parent
9ceea5bd44
commit
3eead446d0
|
@ -1691,9 +1691,9 @@ void do_combatmagic(battle * b, combatmagic_t was)
|
||||||
if (was == DO_PRECOMBATSPELL) {
|
if (was == DO_PRECOMBATSPELL) {
|
||||||
for (s = b->sides; s != b->sides + b->nsides; ++s) {
|
for (s = b->sides; s != b->sides + b->nsides; ++s) {
|
||||||
fighter *fig = 0;
|
fighter *fig = 0;
|
||||||
if (s->bf->attacker) {
|
if (fval(s->faction, FFL_CURSED) && s->bf->attacker) {
|
||||||
spell *sp = find_spell("igjarjuk");
|
spell *sp = find_spell("igjarjuk");
|
||||||
if (sp && fval(s->faction, FFL_CURSED)) {
|
if (sp) {
|
||||||
int si;
|
int si;
|
||||||
for (si = 0; s->enemies[si]; ++si) {
|
for (si = 0; s->enemies[si]; ++si) {
|
||||||
side *se = s->enemies[si];
|
side *se = s->enemies[si];
|
||||||
|
|
|
@ -1204,7 +1204,7 @@ faction *readfaction(struct gamedata * data)
|
||||||
READ_STR(data->store, name, sizeof(name));
|
READ_STR(data->store, name, sizeof(name));
|
||||||
f->banner = _strdup(name);
|
f->banner = _strdup(name);
|
||||||
|
|
||||||
log_printf(stdout, " - Lese Partei %s (%s)\n", f->name, factionid(f));
|
log_debug(" - Lese Partei %s (%s)", f->name, factionid(f));
|
||||||
|
|
||||||
READ_STR(data->store, name, sizeof(name));
|
READ_STR(data->store, name, sizeof(name));
|
||||||
if (set_email(&f->email, name) != 0) {
|
if (set_email(&f->email, name) != 0) {
|
||||||
|
@ -1385,7 +1385,7 @@ int readgame(const char *filename, bool backup)
|
||||||
FILE *F;
|
FILE *F;
|
||||||
|
|
||||||
init_locales();
|
init_locales();
|
||||||
log_printf(stdout, "- reading game data from %s\n", filename);
|
log_debug("- reading game data from %s\n", filename);
|
||||||
sprintf(path, "%s/%s", datapath(), filename);
|
sprintf(path, "%s/%s", datapath(), filename);
|
||||||
|
|
||||||
if (backup) {
|
if (backup) {
|
||||||
|
@ -1433,7 +1433,7 @@ int readgame(const char *filename, bool backup)
|
||||||
a_read(&store, &global.attribs, NULL);
|
a_read(&store, &global.attribs, NULL);
|
||||||
READ_INT(&store, &turn);
|
READ_INT(&store, &turn);
|
||||||
global.data_turn = turn;
|
global.data_turn = turn;
|
||||||
log_printf(stdout, " - reading turn %d\n", turn);
|
log_debug(" - reading turn %d\n", turn);
|
||||||
rng_init(turn);
|
rng_init(turn);
|
||||||
++global.cookie;
|
++global.cookie;
|
||||||
READ_INT(&store, &nread); /* max_unique_id = ignore */
|
READ_INT(&store, &nread); /* max_unique_id = ignore */
|
||||||
|
@ -1501,7 +1501,7 @@ int readgame(const char *filename, bool backup)
|
||||||
/* Read factions */
|
/* Read factions */
|
||||||
read_alliances(&store);
|
read_alliances(&store);
|
||||||
READ_INT(&store, &nread);
|
READ_INT(&store, &nread);
|
||||||
log_printf(stdout, " - Einzulesende Parteien: %d\n", nread);
|
log_debug(" - Einzulesende Parteien: %d\n", nread);
|
||||||
fp = &factions;
|
fp = &factions;
|
||||||
while (*fp)
|
while (*fp)
|
||||||
fp = &(*fp)->next;
|
fp = &(*fp)->next;
|
||||||
|
@ -1522,7 +1522,7 @@ int readgame(const char *filename, bool backup)
|
||||||
if (rmax < 0) {
|
if (rmax < 0) {
|
||||||
rmax = nread;
|
rmax = nread;
|
||||||
}
|
}
|
||||||
log_printf(stdout, " - Einzulesende Regionen: %d/%d\r", rmax, nread);
|
log_debug(" - Einzulesende Regionen: %d/%d\r", rmax, nread);
|
||||||
while (--nread >= 0) {
|
while (--nread >= 0) {
|
||||||
unit **up;
|
unit **up;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -1530,7 +1530,7 @@ int readgame(const char *filename, bool backup)
|
||||||
READ_INT(&store, &y);
|
READ_INT(&store, &y);
|
||||||
|
|
||||||
if ((nread & 0x3FF) == 0) { /* das spart extrem Zeit */
|
if ((nread & 0x3FF) == 0) { /* das spart extrem Zeit */
|
||||||
log_printf(stdout, " - Einzulesende Regionen: %d/%d * %d,%d \r", rmax, nread, x, y);
|
log_debug(" - Einzulesende Regionen: %d/%d * %d,%d \r", rmax, nread, x, y);
|
||||||
}
|
}
|
||||||
--rmax;
|
--rmax;
|
||||||
|
|
||||||
|
@ -1635,16 +1635,15 @@ int readgame(const char *filename, bool backup)
|
||||||
update_interval(u->faction, u->region);
|
update_interval(u->faction, u->region);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log_printf(stdout, "\n");
|
|
||||||
read_borders(&store);
|
read_borders(&store);
|
||||||
|
|
||||||
binstore_done(&store);
|
binstore_done(&store);
|
||||||
fstream_done(&strm);
|
fstream_done(&strm);
|
||||||
/* Unaufgeloeste Zeiger initialisieren */
|
/* Unaufgeloeste Zeiger initialisieren */
|
||||||
log_printf(stdout, "fixing unresolved references.\n");
|
log_debug("fixing unresolved references.\n");
|
||||||
resolve();
|
resolve();
|
||||||
|
|
||||||
log_printf(stdout, "updating area information for lighthouses.\n");
|
log_debug("updating area information for lighthouses.\n");
|
||||||
for (r = regions; r; r = r->next) {
|
for (r = regions; r; r = r->next) {
|
||||||
if (r->flags & RF_LIGHTHOUSE) {
|
if (r->flags & RF_LIGHTHOUSE) {
|
||||||
building *b;
|
building *b;
|
||||||
|
@ -1652,7 +1651,7 @@ int readgame(const char *filename, bool backup)
|
||||||
update_lighthouse(b);
|
update_lighthouse(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log_printf(stdout, "marking factions as alive.\n");
|
log_debug("marking factions as alive.\n");
|
||||||
for (f = factions; f; f = f->next) {
|
for (f = factions; f; f = f->next) {
|
||||||
if (f->flags & FFL_NPC) {
|
if (f->flags & FFL_NPC) {
|
||||||
f->alive = 1;
|
f->alive = 1;
|
||||||
|
@ -1699,7 +1698,7 @@ int readgame(const char *filename, bool backup)
|
||||||
if (loadplane || maxregions >= 0) {
|
if (loadplane || maxregions >= 0) {
|
||||||
remove_empty_factions();
|
remove_empty_factions();
|
||||||
}
|
}
|
||||||
log_printf(stdout, "Done loading turn %d.\n", turn);
|
log_debug("Done loading turn %d.\n", turn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1805,7 +1804,7 @@ int writegame(const char *filename)
|
||||||
WRITE_INT(&store, n);
|
WRITE_INT(&store, n);
|
||||||
WRITE_SECTION(&store);
|
WRITE_SECTION(&store);
|
||||||
|
|
||||||
log_printf(stdout, " - Schreibe %d Parteien...\n", n);
|
log_debug(" - Schreibe %d Parteien...\n", n);
|
||||||
for (f = factions; f; f = f->next) {
|
for (f = factions; f; f = f->next) {
|
||||||
if (fval(f, FFL_NPC)) {
|
if (fval(f, FFL_NPC)) {
|
||||||
clear_npc_orders(f);
|
clear_npc_orders(f);
|
||||||
|
@ -1819,13 +1818,12 @@ int writegame(const char *filename)
|
||||||
n = listlen(regions);
|
n = listlen(regions);
|
||||||
WRITE_INT(&store, n);
|
WRITE_INT(&store, n);
|
||||||
WRITE_SECTION(&store);
|
WRITE_SECTION(&store);
|
||||||
log_printf(stdout, " - Schreibe Regionen: %d \r", n);
|
log_debug(" - Schreibe Regionen: %d", n);
|
||||||
|
|
||||||
for (r = regions; r; r = r->next, --n) {
|
for (r = regions; r; r = r->next, --n) {
|
||||||
/* plus leerzeile */
|
/* plus leerzeile */
|
||||||
if ((n % 1024) == 0) { /* das spart extrem Zeit */
|
if ((n % 1024) == 0) { /* das spart extrem Zeit */
|
||||||
log_printf(stdout, " - Schreibe Regionen: %d \r", n);
|
log_debug(" - Schreibe Regionen: %d", n);
|
||||||
fflush(stdout);
|
|
||||||
}
|
}
|
||||||
WRITE_SECTION(&store);
|
WRITE_SECTION(&store);
|
||||||
WRITE_INT(&store, r->x);
|
WRITE_INT(&store, r->x);
|
||||||
|
@ -1876,7 +1874,6 @@ int writegame(const char *filename)
|
||||||
binstore_done(&store);
|
binstore_done(&store);
|
||||||
fstream_done(&strm);
|
fstream_done(&strm);
|
||||||
|
|
||||||
log_printf(stdout, "\nOk.\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue