MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / StartPlugin

Method StartPlugin

src/openrct2/scripting/ScriptEngine.cpp:969–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

967}
968
969void ScriptEngine::StartPlugin(std::shared_ptr<Plugin> plugin)
970{
971 if (!plugin->HasStarted() && ShouldStartPlugin(plugin))
972 {
973 ScriptExecutionInfo::PluginScope scope(_execInfo, plugin, false);
974 try
975 {
976 LogPluginInfo(plugin, "Started");
977 plugin->Start();
978 }
979 catch (const std::exception& e)
980 {
981 _console.WriteLineError(e.what());
982 }
983 }
984}
985
986void ScriptEngine::StopPlugin(std::shared_ptr<Plugin> plugin, bool unregistering)
987{

Callers

nothing calls this directly

Calls 4

HasStartedMethod · 0.80
WriteLineErrorMethod · 0.80
StartMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected