add correct interface

master
Christopher Latza 2020-06-10 21:26:18 +02:00
parent 124707f7f9
commit 728a07475e
2 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<Reference name="OpenSim.Region.CoreModules" path="../../../bin"/> <Reference name="OpenSim.Region.CoreModules" path="../../../bin"/>
<Reference name="OpenSim.Region.Framework" path="../../../bin"/> <Reference name="OpenSim.Region.Framework" path="../../../bin"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared.Api" path="../../../bin"/> <Reference name="OpenSim.Region.ScriptEngine.Shared.Api" path="../../../bin"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared" path="../../../bin"/>
<Reference name="OpenSim.Region.Framework" path="../../../bin"/> <Reference name="OpenSim.Region.Framework" path="../../../bin"/>
<Reference name="OpenSim.Framework" path="../../../bin"/> <Reference name="OpenSim.Framework" path="../../../bin"/>
<Reference name="OpenSim.Framework.Console" path="../../../bin"/> <Reference name="OpenSim.Framework.Console" path="../../../bin"/>

View File

@ -4,6 +4,8 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.ScriptEngine.Interfaces;
using OpenSim.Region.ScriptEngine.Shared.Api;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
@ -26,6 +28,8 @@ namespace OpenSim.Modules.PathFinding
private bool m_enabled = true; private bool m_enabled = true;
private string m_dataDirectory = "./PathFindingData"; private string m_dataDirectory = "./PathFindingData";
private IScriptModuleComms m_scriptModule; private IScriptModuleComms m_scriptModule;
private AsyncCommandManager m_asyncCommands = null;
private IScriptEngine m_scriptEngine = null;
public string Name public string Name
{ {
@ -106,6 +110,17 @@ namespace OpenSim.Modules.PathFinding
m_enabled = false; m_enabled = false;
} }
m_scriptEngine = m_scene.RequestModuleInterface<IScriptEngine>();
if (m_scriptEngine != null)
{
m_asyncCommands = new AsyncCommandManager(m_scriptEngine);
}
else
{
m_log.Error("[" + Name + "]: Error while loading AsyncCommandManager");
}
m_log.Info("[" + Name + "]: Region loading done!"); m_log.Info("[" + Name + "]: Region loading done!");
} }
} }