remove last vestiges of the rm_* material names

This commit is contained in:
Enno Rehling 2017-02-25 21:24:47 +01:00
parent d039ca2b2e
commit 84c6a4b7b5
9 changed files with 9 additions and 12 deletions

2
clibs

@ -1 +1 @@
Subproject commit b91413316ce13044c555084a9f605983586107b4 Subproject commit 27c8b3202b52766465743c3324fc0b52c5ba4b11

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<resources> <resources>
<resource name="adamantium" limited="yes" material="rm_adamantium"> <resource name="adamantium" limited="yes" material="yes">
<item weight="200" score="200"> <item weight="200" score="200">
<construction skill="mining" minskill="8"/> <construction skill="mining" minskill="8"/>
</item> </item>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="iron" limited="yes" material="rm_iron"> <resource name="iron" limited="yes" material="yes">
<item weight="500" score="10"> <item weight="500" score="10">
<construction skill="mining" minskill="1"/> <construction skill="mining" minskill="1"/>
</item> </item>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laen" limited="yes" material="rm_laen"> <resource name="laen" limited="yes" material="yes">
<item weight="200" score="100"> <item weight="200" score="100">
<construction skill="mining" minskill="7"/> <construction skill="mining" minskill="7"/>
</item> </item>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="stone" limited="yes" material="rm_stone"> <resource name="stone" limited="yes" material="yes">
<item weight="6000" score="10" big="yes"> <item weight="6000" score="10" big="yes">
<construction skill="quarrying" minskill="1"/> <construction skill="quarrying" minskill="1"/>
</item> </item>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="iron" limited="yes" material="rm_iron"> <resource name="iron" limited="yes" material="yes">
<item weight="500" score="10"> <item weight="500" score="10">
<construction skill="mining" minskill="1"/> <construction skill="mining" minskill="1"/>
</item> </item>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="stone" limited="yes" material="rm_stone"> <resource name="stone" limited="yes" material="yes">
<item weight="6000" score="10" big="yes"> <item weight="6000" score="10" big="yes">
<construction skill="quarrying" minskill="1"/> <construction skill="quarrying" minskill="1"/>
</item> </item>

View File

@ -348,7 +348,6 @@ static void test_make_item(CuTest *tc) {
struct item_type *itype; struct item_type *itype;
const struct resource_type *rt_silver; const struct resource_type *rt_silver;
resource_type *rtype; resource_type *rtype;
rawmaterial_type *rmt;
resource_limit *rdata; resource_limit *rdata;
double d = 0.6; double d = 0.6;
@ -382,7 +381,7 @@ static void test_make_item(CuTest *tc) {
free(itype->construction->materials); free(itype->construction->materials);
itype->construction->materials = 0; itype->construction->materials = 0;
rtype->flags |= RTF_LIMITED; rtype->flags |= RTF_LIMITED;
rmt = rmt_create(rtype); rmt_create(rtype);
rdata = rtype->limit = calloc(1, sizeof(resource_limit)); rdata = rtype->limit = calloc(1, sizeof(resource_limit));
add_resource(u->region, 1, 300, 150, rtype); add_resource(u->region, 1, 300, 150, rtype);
u->region->resources->amount = 300; /* there are 300 stones at level 1 */ u->region->resources->amount = 300; /* there are 300 stones at level 1 */

View File

@ -978,10 +978,8 @@ static int parse_resources(xmlDocPtr doc)
} }
xmlXPathFreeObject(result); xmlXPathFreeObject(result);
name = xmlGetProp(node, BAD_CAST "material"); if (xml_bvalue(node, "material", false)) {
if (name) {
rmt_create(rtype); rmt_create(rtype);
xmlFree(name);
} }
/* reading eressea/resources/resource/resourcelimit */ /* reading eressea/resources/resource/resourcelimit */