From 84c6a4b7b56d1bd6b96a874d0e85e2126959fa14 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 25 Feb 2017 21:24:47 +0100 Subject: [PATCH] remove last vestiges of the rm_* material names --- clibs | 2 +- res/adamantium.xml | 2 +- res/core/resources/iron.xml | 2 +- res/core/resources/laen.xml | 2 +- res/core/resources/stone.xml | 2 +- res/e3a/resources/iron.xml | 2 +- res/e3a/resources/stone.xml | 2 +- src/economy.test.c | 3 +-- src/kernel/xmlreader.c | 4 +--- 9 files changed, 9 insertions(+), 12 deletions(-) diff --git a/clibs b/clibs index b91413316..27c8b3202 160000 --- a/clibs +++ b/clibs @@ -1 +1 @@ -Subproject commit b91413316ce13044c555084a9f605983586107b4 +Subproject commit 27c8b3202b52766465743c3324fc0b52c5ba4b11 diff --git a/res/adamantium.xml b/res/adamantium.xml index decc5636c..bb94dfc12 100644 --- a/res/adamantium.xml +++ b/res/adamantium.xml @@ -1,7 +1,7 @@ - + diff --git a/res/core/resources/iron.xml b/res/core/resources/iron.xml index 3f8897abc..469840669 100644 --- a/res/core/resources/iron.xml +++ b/res/core/resources/iron.xml @@ -1,5 +1,5 @@ - + diff --git a/res/core/resources/laen.xml b/res/core/resources/laen.xml index 12062bf07..30531c0fe 100644 --- a/res/core/resources/laen.xml +++ b/res/core/resources/laen.xml @@ -1,5 +1,5 @@ - + diff --git a/res/core/resources/stone.xml b/res/core/resources/stone.xml index c227dcc5c..91d3aac5d 100644 --- a/res/core/resources/stone.xml +++ b/res/core/resources/stone.xml @@ -1,5 +1,5 @@ - + diff --git a/res/e3a/resources/iron.xml b/res/e3a/resources/iron.xml index 06b70e45a..7ffe36f1e 100644 --- a/res/e3a/resources/iron.xml +++ b/res/e3a/resources/iron.xml @@ -1,5 +1,5 @@ - + diff --git a/res/e3a/resources/stone.xml b/res/e3a/resources/stone.xml index 746b79c21..dfb039093 100644 --- a/res/e3a/resources/stone.xml +++ b/res/e3a/resources/stone.xml @@ -1,5 +1,5 @@ - + diff --git a/src/economy.test.c b/src/economy.test.c index aea42491d..6d9c84542 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -348,7 +348,6 @@ static void test_make_item(CuTest *tc) { struct item_type *itype; const struct resource_type *rt_silver; resource_type *rtype; - rawmaterial_type *rmt; resource_limit *rdata; double d = 0.6; @@ -382,7 +381,7 @@ static void test_make_item(CuTest *tc) { free(itype->construction->materials); itype->construction->materials = 0; rtype->flags |= RTF_LIMITED; - rmt = rmt_create(rtype); + rmt_create(rtype); rdata = rtype->limit = calloc(1, sizeof(resource_limit)); add_resource(u->region, 1, 300, 150, rtype); u->region->resources->amount = 300; /* there are 300 stones at level 1 */ diff --git a/src/kernel/xmlreader.c b/src/kernel/xmlreader.c index 74459270c..737a12f66 100644 --- a/src/kernel/xmlreader.c +++ b/src/kernel/xmlreader.c @@ -978,10 +978,8 @@ static int parse_resources(xmlDocPtr doc) } xmlXPathFreeObject(result); - name = xmlGetProp(node, BAD_CAST "material"); - if (name) { + if (xml_bvalue(node, "material", false)) { rmt_create(rtype); - xmlFree(name); } /* reading eressea/resources/resource/resourcelimit */