aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs21
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 6d8096f..fca4617 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -52,6 +52,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
52 public string Source; 52 public string Source;
53 public int StartParam; 53 public int StartParam;
54 public AppDomain AppDomain; 54 public AppDomain AppDomain;
55 public Dictionary<string, IScriptApi> Apis;
55 } 56 }
56 57
57 public class ScriptManager 58 public class ScriptManager
@@ -168,15 +169,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
168 // Add it to our script memstruct 169 // Add it to our script memstruct
169 m_scriptEngine.m_ScriptManager.SetScript(localID, itemID, id); 170 m_scriptEngine.m_ScriptManager.SetScript(localID, itemID, id);
170 171
171 LSL_Api LSL = new LSL_Api(); 172 id.Apis = new Dictionary<string, IScriptApi>();
172 OSSL_Api OSSL = new OSSL_Api();
173 173
174 LSL.Initialize(m_scriptEngine, m_host, localID, itemID); 174 ApiManager am = new ApiManager();
175 OSSL.Initialize(m_scriptEngine, m_host, localID, itemID);
176 175
177 // Start the script - giving it the APIs 176 foreach (string api in am.GetApis())
178 CompiledScript.InitApi("LSL", LSL); 177 {
179 CompiledScript.InitApi("OSSL", OSSL); 178 id.Apis[api] = am.CreateApi(api);
179 id.Apis[api].Initialize(m_scriptEngine, m_host,
180 localID, itemID);
181 }
182
183 foreach (KeyValuePair<string,IScriptApi> kv in id.Apis)
184 {
185 CompiledScript.InitApi(kv.Key, kv.Value);
186 }
180 187
181 // Fire the first start-event 188 // Fire the first start-event
182 int eventFlags = 189 int eventFlags =