check for existence of spell descriptions

This commit is contained in:
Steffen Mecke 2015-01-13 22:08:12 +01:00
parent 22e8e39a99
commit 231f9bb39a
3 changed files with 21 additions and 0 deletions

View File

@ -316,6 +316,20 @@ const curse_type *ct_find(const char *c)
return NULL;
}
void ct_checknames() {
int i, qi;
quicklist *ctl;
for (i = 0; i < 256; ++i) {
ctl = cursetypes[i];
for (qi = 0; ctl; ql_advance(&ctl, &qi, 1)) {
curse_type *type = (curse_type *)ql_get(ctl, qi);
curse_name(type, default_locale);
}
}
}
/* ------------------------------------------------------------- */
/* get_curse identifiziert eine Verzauberung über die ID und gibt
* einen pointer auf die struct zurück.

View File

@ -288,6 +288,7 @@ extern "C" {
int find_cursebyname(const char *c);
const curse_type *ct_find(const char *c);
void ct_register(const curse_type *);
void ct_checknames(void);
/* Regionszauber */
curse *cfindhash(int i);

View File

@ -1841,8 +1841,14 @@ static void write_script(FILE * F, const faction * f)
fputc('\n', F);
}
static void check_messages_exist(void) {
ct_checknames();
}
int init_reports(void)
{
check_messages_exist();
prepare_reports();
{
if (_access(reportpath(), 0) != 0) {