Treat plugins without a "plugin_dev" symbol as ordinary plugins

develop
lethosor 2015-05-24 11:42:22 -04:00
parent 1bb5239e5b
commit e27493fa02
1 changed files with 1 additions and 2 deletions

@ -230,7 +230,6 @@ bool Plugin::load(color_ostream &con)
plugin_check_symbol("plugin_self") plugin_check_symbol("plugin_self")
plugin_check_symbol("plugin_init") plugin_check_symbol("plugin_init")
plugin_check_symbol("plugin_globals") plugin_check_symbol("plugin_globals")
plugin_check_symbol("plugin_dev")
const char ** plug_name =(const char ** ) LookupPlugin(plug, "name"); const char ** plug_name =(const char ** ) LookupPlugin(plug, "name");
const char ** plug_version =(const char ** ) LookupPlugin(plug, "version"); const char ** plug_version =(const char ** ) LookupPlugin(plug, "version");
Plugin **plug_self = (Plugin**)LookupPlugin(plug, "plugin_self"); Plugin **plug_self = (Plugin**)LookupPlugin(plug, "plugin_self");
@ -243,7 +242,7 @@ bool Plugin::load(color_ostream &con)
return false; return false;
} }
bool *plug_dev = (bool*)LookupPlugin(plug, "plugin_dev"); bool *plug_dev = (bool*)LookupPlugin(plug, "plugin_dev");
if (*plug_dev && getenv("DFHACK_NO_DEV_PLUGINS")) if (plug_dev && *plug_dev && getenv("DFHACK_NO_DEV_PLUGINS"))
{ {
con.print("Skipping dev plugin: %s\n", *plug_name); con.print("Skipping dev plugin: %s\n", *plug_name);
plugin_abort_load; plugin_abort_load;