diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 2ce4f7b55..09fe5182c 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1204,6 +1204,7 @@ findkeyword(const char *s, const struct locale * lang) if(*s == '@') s++; #endif if (findtoken(&lnames->keywords, s, (void**)&i)==E_TOK_NOMATCH) return NOKEYWORD; + if (global.disabled[i]) return NOKEYWORD; return (keyword_t) i; } @@ -2095,6 +2096,17 @@ parse_tagbegin(struct xml_stack *stack, void *data) log_printf("required tag 'file' missing from include"); return XML_USERERROR; } + } else if (strcmp(tag->name, "order")==0) { + const char * name = xml_value(tag, "name"); + if (xml_bvalue(tag, "disable")) { + int k; + for (k=0;k!=MAXKEYWORDS;++k) { + if (strncmp(keywords[k], name, strlen(name))==0) { + global.disabled[k]=0; + break; + } + } + } } else if (strcmp(tag->name, "races")==0) { read_races(stack->stream, stack); } else if (strcmp(tag->name, "strings")==0) { diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index faaa98d3d..9b93daf56 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -159,14 +159,6 @@ struct xml_stack; #define NEWRACE_VERSION 307 #define UGROUPS_VERSION 400 /* nicht aktivieren, nicht fertig */ -/* globale settings des Spieles */ -typedef struct settings { - const char *gamename; - struct attrib *attribs; - unsigned int data_version; -} settings; -extern settings global; - #define RELEASE_VERSION NEWRACE_VERSION /* @@ -1175,4 +1167,13 @@ extern const char *locales[]; extern race_t old_race(const struct race *); extern const struct race * new_race[]; +/* globale settings des Spieles */ +typedef struct settings { + const char *gamename; + struct attrib *attribs; + unsigned int data_version; + boolean disabled[MAXKEYWORDS]; +} settings; +extern settings global; + #endif diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index d9f7dbbaa..6c4996031 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -73,7 +73,7 @@ #include #include - +#if 0 static int skillmodifieslearning(void) { @@ -99,6 +99,7 @@ skillmodifieslearning(void) } return 0; } +#endif extern void reorder_owners(struct region * r); diff --git a/src/res/eressea.xml b/src/res/eressea.xml index 9ea9b1785..30c6ade7a 100644 --- a/src/res/eressea.xml +++ b/src/res/eressea.xml @@ -10,8 +10,10 @@ - + Game specific + + diff --git a/src/res/vinyambar.xml b/src/res/vinyambar.xml index 4ba1d129b..09eebc3d9 100644 --- a/src/res/vinyambar.xml +++ b/src/res/vinyambar.xml @@ -12,6 +12,9 @@ Game specific + + +