MCPcopy Create free account
hub / github.com/DFHack/dfhack / init

Method init

library/PluginManager.cpp:879–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879void PluginManager::init()
880{
881 loadAll();
882
883 bool any_loaded = false;
884 for (auto& p : all_plugins)
885 {
886 if (p.second->getState() == Plugin::PS_LOADED)
887 {
888 any_loaded = true;
889 break;
890 }
891 }
892 if (!any_loaded && !listPlugins().empty())
893 {
894 Core::printerr("\n"
895"All plugins present failed to load.\n"
896"If you are using Windows XP, this is probably due to a Visual Studio 2015 bug.\n"
897"Windows XP is unsupported by Microsoft as of 2014, so we do not support it.\n\n"
898"If this was unexpected and you are not using Windows XP, please report this.\n\n"
899 );
900 }
901}
902
903bool PluginManager::addPlugin(string name)
904{

Callers 4

InitSimulationThreadMethod · 0.45
mainFunction · 0.45
dfhack_random_initFunction · 0.45
dfhack_random_perlinFunction · 0.45

Calls 3

printerrFunction · 0.50
getStateMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected