forked from github/server
remove old gamecode-diabling logic
it was old, and not in use.
This commit is contained in:
parent
58fa2d4454
commit
f43d8a3297
|
@ -78,8 +78,6 @@ void game_init(void)
|
|||
register_itemtypes();
|
||||
register_xmlreader();
|
||||
register_archetypes();
|
||||
enable_xml_gamecode();
|
||||
|
||||
register_attributes();
|
||||
register_gmcmd();
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ without prior permission by the authors of Eressea.
|
|||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
static bool gamecode_enabled = false;
|
||||
|
||||
static building_type *bt_get_or_create(const char *name)
|
||||
{
|
||||
if (name != NULL) {
|
||||
|
@ -67,11 +65,6 @@ static building_type *bt_get_or_create(const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void enable_xml_gamecode(void)
|
||||
{
|
||||
gamecode_enabled = true;
|
||||
}
|
||||
|
||||
static void xml_readtext(xmlNodePtr node, struct locale **lang, xmlChar ** text)
|
||||
{
|
||||
xmlChar *propValue = xmlGetProp(node, BAD_CAST "locale");
|
||||
|
@ -304,7 +297,6 @@ static int parse_buildings(xmlDocPtr doc)
|
|||
xml_readconstruction(xpath, result->nodesetval, &btype->construction);
|
||||
xmlXPathFreeObject(result);
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading eressea/buildings/building/function */
|
||||
xpath->node = node;
|
||||
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||
|
@ -339,7 +331,6 @@ static int parse_buildings(xmlDocPtr doc)
|
|||
xmlFree(propValue);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
/* reading eressea/buildings/building/maintenance */
|
||||
result = xmlXPathEvalExpression(BAD_CAST "maintenance", xpath);
|
||||
|
@ -806,7 +797,6 @@ static weapon_type *xml_readweapon(xmlXPathContextPtr xpath, item_type * itype)
|
|||
}
|
||||
xmlXPathFreeObject(result);
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading weapon/function */
|
||||
xpath->node = node;
|
||||
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||
|
@ -832,7 +822,6 @@ static weapon_type *xml_readweapon(xmlXPathContextPtr xpath, item_type * itype)
|
|||
xmlFree(propValue);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
xpath->node = node;
|
||||
return wtype;
|
||||
|
@ -912,7 +901,6 @@ static item_type *xml_readitem(xmlXPathContextPtr xpath, resource_type * rtype)
|
|||
}
|
||||
xmlXPathFreeObject(result);
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading item/function */
|
||||
xpath->node = node;
|
||||
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||
|
@ -949,7 +937,6 @@ static item_type *xml_readitem(xmlXPathContextPtr xpath, resource_type * rtype)
|
|||
xmlFree(propValue);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
return itype;
|
||||
}
|
||||
|
@ -1068,7 +1055,6 @@ static int parse_resources(xmlDocPtr doc)
|
|||
xmlFree(name);
|
||||
}
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading eressea/resources/resource/function */
|
||||
xpath->node = node;
|
||||
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||
|
@ -1097,7 +1083,6 @@ static int parse_resources(xmlDocPtr doc)
|
|||
xmlFree(propValue);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
/* reading eressea/resources/resource/resourcelimit */
|
||||
xpath->node = node;
|
||||
|
@ -1585,7 +1570,6 @@ static int parse_spells(xmlDocPtr doc)
|
|||
if (k >= 0 && k <= 3)
|
||||
sp->sptyp |= modes[k];
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading eressea/spells/spell/function */
|
||||
pf_generic cast = 0;
|
||||
pf_generic fumble = 0;
|
||||
|
@ -1624,7 +1608,6 @@ static int parse_spells(xmlDocPtr doc)
|
|||
sp->cast = (spell_f)cast;
|
||||
sp->fumble = (fumble_f)fumble;
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
/* reading eressea/spells/spell/resource */
|
||||
xpath->node = node;
|
||||
|
@ -1869,7 +1852,6 @@ static int parse_races(xmlDocPtr doc)
|
|||
}
|
||||
xmlXPathFreeObject(result);
|
||||
|
||||
if (gamecode_enabled) {
|
||||
/* reading eressea/races/race/function */
|
||||
xpath->node = node;
|
||||
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||
|
@ -1904,7 +1886,6 @@ static int parse_races(xmlDocPtr doc)
|
|||
xmlFree(propValue);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
}
|
||||
|
||||
/* reading eressea/races/race/familiar */
|
||||
xpath->node = node;
|
||||
|
@ -2110,9 +2091,6 @@ static int parse_messages(xmlDocPtr doc)
|
|||
xmlNodeSetPtr nodes;
|
||||
int i;
|
||||
|
||||
if (!gamecode_enabled)
|
||||
return 0;
|
||||
|
||||
xpath = xmlXPathNewContext(doc);
|
||||
|
||||
/* reading eressea/messages/message */
|
||||
|
|
|
@ -16,7 +16,6 @@ without prior permission by the authors of Eressea.
|
|||
extern "C" {
|
||||
#endif
|
||||
extern void register_xmlreader(void);
|
||||
extern void enable_xml_gamecode(void);
|
||||
|
||||
/* game-specific callbacks */
|
||||
extern void (*set_spelldata_cb) (struct spell * sp);
|
||||
|
|
Loading…
Reference in New Issue