|
|
@ -230,6 +230,7 @@ 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");
|
|
|
@ -240,6 +241,13 @@ bool Plugin::load(color_ostream &con)
|
|
|
|
plugin_abort_load;
|
|
|
|
plugin_abort_load;
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool *plug_dev = (bool*)LookupPlugin(plug, "plugin_dev");
|
|
|
|
|
|
|
|
if (*plug_dev && getenv("DFHACK_NO_DEV_PLUGINS"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
con.print("Skipping dev plugin: %s\n", *plug_name);
|
|
|
|
|
|
|
|
plugin_abort_load;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
*plug_self = this;
|
|
|
|
*plug_self = this;
|
|
|
|
RefAutolock lock(access);
|
|
|
|
RefAutolock lock(access);
|
|
|
|
plugin_init = (command_result (*)(color_ostream &, std::vector <PluginCommand> &)) LookupPlugin(plug, "plugin_init");
|
|
|
|
plugin_init = (command_result (*)(color_ostream &, std::vector <PluginCommand> &)) LookupPlugin(plug, "plugin_init");
|
|
|
|