Alte externs entfernt, die nicht benutzt werden.

Veralteten Statistik-Output entfernt.
This commit is contained in:
Enno Rehling 2004-09-02 19:04:14 +00:00
parent d561c85b3e
commit f8daca105b
3 changed files with 6 additions and 70 deletions

View file

@ -19,11 +19,6 @@ extern "C" {
extern void register_weapons(void);
extern void init_weapons(void);
extern struct item_type it_mallornspear;
extern struct item_type it_mallornlance;
extern struct item_type it_mallorncrossbow;
extern struct item_type it_mallornbow;
#ifdef __cplusplus
}
#endif

View file

@ -594,70 +594,6 @@ fix_icastles(void)
}
}
typedef struct stats_t {
struct stats_t * next;
const struct item_type * type;
double number;
} stats_t;
static void
s_change(stats_t** s, const struct item_type * type, int count)
{
while (*s && (*s)->type!=type) s=&(*s)->next;
if (*s==NULL) {
*s = calloc(1, sizeof(stats_t));
(*s)->type = type;
}
(*s)->number += count;
}
static stats_t *
s_find(stats_t * s, const struct item_type * type)
{
while (s && s->type!=type) s=s->next;
return s;
}
static void
stats(void)
{
FILE * F;
stats_t * items = NULL;
char zText[MAX_PATH];
strcat(strcpy(zText, resourcepath()), "/stats");
F = fopen(zText, "wt");
if (F) {
region * r;
const item_type * itype;
for (r=regions;r;r=r->next) {
unit * u;
item * itm;
for (u=r->units;u;u=u->next) {
for (itm=u->items;itm;itm=itm->next) {
if (itm->number>50000000) {
log_error(("unit %s has %d %s\n", unitname(u), itm->number, resourcename(itm->type->rtype, 0)));
/* itm->number=1; */
}
s_change(&items, itm->type, itm->number);
}
}
}
for (itype=itemtypes;itype;itype=itype->next) {
stats_t * itm = s_find(items, itype);
if (itm && itm->number>0.0)
fprintf(F, "%4.0f %s\n", itm->number, locale_string(NULL, resourcename(itype->rtype, 0)));
else
fprintf(F, "%4.0f %s\n", 0.0, locale_string(NULL, resourcename(itype->rtype, 0)));
}
fclose(F);
} else {
perror(zText);
}
}
#if 0
static void
fix_herbs(void)
@ -1147,7 +1083,6 @@ korrektur(void)
fix_allies();
update_gmquests(); /* test gm quests */
/* fix_unitrefs(); */
stats();
warn_password();
fix_road_borders();
if (turn>1000) curse_emptiness(); /*** disabled ***/

View file

@ -1,3 +1,9 @@
[11:01] <Enno`> am besten wäre, wenn mailit nur die optionen, nicht das ganze script enthielte
[11:01] <Enno`> und ein skript dann mailit als input nähme
[11:02] <Enno`> also nur enno@eressea.upb.de pka3 BZIP2 nr cr zv
Deathcloud: Magieresistenz des Magiers in das attribut, nicht auflösen wenn magier tot.
Messungen:
Messen, was CR alleine kostet.
Messen, was no-ZV bringt. Zugvorlage abstellen.