forked from github/server
remove artsculpture and genericbuilding.
deal with buildings having an unknown type.
This commit is contained in:
parent
bd59271b71
commit
794dae11cf
|
@ -4,9 +4,8 @@
|
|||
<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="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="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">
|
||||
<construction skill="building" minskill="2" reqsize="100" maxsize="100">
|
||||
|
|
|
@ -912,7 +912,7 @@
|
|||
<string name="illusioncastle">
|
||||
<text locale="de">Traumschlößchen</text>
|
||||
</string>
|
||||
<string name="genericbuilding">
|
||||
<string name="building">
|
||||
<text locale="de">Struktur</text>
|
||||
</string>
|
||||
<string name="artacademy">
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
<string name="dam">
|
||||
<text locale="en">dam</text>
|
||||
</string>
|
||||
<string name="genericbuilding">
|
||||
<string name="building">
|
||||
<text locale="en">structure</text>
|
||||
</string>
|
||||
<string name="harbour">
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
<string name="dam">
|
||||
<text locale="fr">barrage</text>
|
||||
</string>
|
||||
<string name="genericbuilding">
|
||||
<string name="building">
|
||||
<text locale="fr">bâtiment</text>
|
||||
</string>
|
||||
<string name="harbour">
|
||||
|
|
|
@ -325,8 +325,13 @@ const building_type *findbuildingtype(const char *name,
|
|||
building_type *btype = (building_type *)selist_get(ql, qi);
|
||||
|
||||
const char *n = LOC(lang, btype->_name);
|
||||
type.v = (void *)btype;
|
||||
addtoken((struct tnode **)&bn->names, n, type);
|
||||
if (!n) {
|
||||
log_error("building type %s has no translation in %s",
|
||||
btype->_name, locale_name(lang));
|
||||
} else {
|
||||
type.v = (void *)btype;
|
||||
addtoken((struct tnode **)&bn->names, n, type);
|
||||
}
|
||||
}
|
||||
bnames = bn;
|
||||
}
|
||||
|
|
|
@ -1529,6 +1529,11 @@ struct building *read_building(gamedata *data) {
|
|||
READ_INT(store, &b->size);
|
||||
READ_STR(store, name, sizeof(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);
|
||||
|
||||
/* repairs, bug 2221: */
|
||||
|
|
Loading…
Reference in New Issue