Bugfix für kaputte Schiffstypen. Böser Hack.

This commit is contained in:
Enno Rehling 2002-02-03 13:32:26 +00:00
parent 94791030f5
commit 427cc7f116
2 changed files with 7 additions and 1 deletions

View File

@ -2050,6 +2050,7 @@ tagend(struct xml_stack * stack)
const xml_tag * tag = stack->tag; const xml_tag * tag = stack->tag;
if (strcmp(tag->name, "resource")==0) { if (strcmp(tag->name, "resource")==0) {
free(stack->state); free(stack->state);
init_resources();
} }
return XML_OK; return XML_OK;
} }
@ -2158,6 +2159,9 @@ static xml_callbacks xml_resource = {
void void
init_resources(void) init_resources(void)
{ {
static boolean initialized = false;
if (initialized) return;
initialized = true;
/* silver was never an item: */ /* silver was never an item: */
r_silver = new_resourcetype(&names[0], NULL, RTF_ITEM|RTF_POOLED); r_silver = new_resourcetype(&names[0], NULL, RTF_ITEM|RTF_POOLED);
i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0); i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0);

View File

@ -2631,8 +2631,10 @@ level(int days)
while (level_days(l)<=days) ++l; while (level_days(l)<=days) ++l;
return l-1; return l-1;
} }
#endif
int #if defined(CONVERT_SKILLPOINTS) || !SKILLPOINTS
static int
convert_skills(void) convert_skills(void)
{ {
region * r; region * r;