remove artsculpture and genericbuilding.

deal with buildings having an unknown type.
This commit is contained in:
Enno Rehling 2017-02-24 14:29:14 +01:00
parent bd59271b71
commit 794dae11cf
6 changed files with 16 additions and 7 deletions

View File

@ -4,9 +4,8 @@
<building name="illusioncastle" capacity="0" maxcapacity="0" maxsize="0" nobuild="yes"/> <building name="illusioncastle" capacity="0" maxcapacity="0" maxsize="0" nobuild="yes"/>
<building name="xmas_exit" maxsize="10" maxcapacity="2" nobuild="yes" nodestroy="yes" unique="yes"/> <building name="xmas_exit" maxsize="10" maxcapacity="2" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="caldera" capacity="1" nodestroy="yes" nobuild="yes"/> <building name="caldera" capacity="1" nodestroy="yes" nobuild="yes"/>
<building name="genericbuilding" namechange="no" maxsize="1" nobuild="yes"/> <building name="building" namechange="no" maxsize="1" nobuild="yes"/>
<building name="artacademy" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/> <building name="artacademy" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="artsculpture" namechange="no" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="blessedstonecircle" maxcapacity="3" maxsize="100" nobuild="yes" magic="yes" magres="60" magresbonus="30" auraregen="1.50"> <building name="blessedstonecircle" maxcapacity="3" maxsize="100" nobuild="yes" magic="yes" magres="60" magresbonus="30" auraregen="1.50">
<construction skill="building" minskill="2" reqsize="100" maxsize="100"> <construction skill="building" minskill="2" reqsize="100" maxsize="100">

View File

@ -912,7 +912,7 @@
<string name="illusioncastle"> <string name="illusioncastle">
<text locale="de">Traumschlößchen</text> <text locale="de">Traumschlößchen</text>
</string> </string>
<string name="genericbuilding"> <string name="building">
<text locale="de">Struktur</text> <text locale="de">Struktur</text>
</string> </string>
<string name="artacademy"> <string name="artacademy">

View File

@ -310,7 +310,7 @@
<string name="dam"> <string name="dam">
<text locale="en">dam</text> <text locale="en">dam</text>
</string> </string>
<string name="genericbuilding"> <string name="building">
<text locale="en">structure</text> <text locale="en">structure</text>
</string> </string>
<string name="harbour"> <string name="harbour">

View File

@ -324,7 +324,7 @@
<string name="dam"> <string name="dam">
<text locale="fr">barrage</text> <text locale="fr">barrage</text>
</string> </string>
<string name="genericbuilding"> <string name="building">
<text locale="fr">bâtiment</text> <text locale="fr">bâtiment</text>
</string> </string>
<string name="harbour"> <string name="harbour">

View File

@ -325,9 +325,14 @@ const building_type *findbuildingtype(const char *name,
building_type *btype = (building_type *)selist_get(ql, qi); building_type *btype = (building_type *)selist_get(ql, qi);
const char *n = LOC(lang, btype->_name); const char *n = LOC(lang, btype->_name);
if (!n) {
log_error("building type %s has no translation in %s",
btype->_name, locale_name(lang));
} else {
type.v = (void *)btype; type.v = (void *)btype;
addtoken((struct tnode **)&bn->names, n, type); addtoken((struct tnode **)&bn->names, n, type);
} }
}
bnames = bn; bnames = bn;
} }
if (findtoken(bn->names, name, &type) == E_TOK_NOMATCH) if (findtoken(bn->names, name, &type) == E_TOK_NOMATCH)

View File

@ -1529,6 +1529,11 @@ struct building *read_building(gamedata *data) {
READ_INT(store, &b->size); READ_INT(store, &b->size);
READ_STR(store, name, sizeof(name)); READ_STR(store, name, sizeof(name));
b->type = bt_find(name); b->type = bt_find(name);
if (!b->type) {
log_error("building %d has unknown type %s", b->no, name);
b->type = bt_find("building");
assert(b->type);
}
read_attribs(data, &b->attribs, b); read_attribs(data, &b->attribs, b);
/* repairs, bug 2221: */ /* repairs, bug 2221: */