From 3c338e4e563509e480d5eab71134126d1d7aadf5 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 15 Apr 2009 18:51:17 +0000 Subject: Convert both script engines to new region module format. Add proper unload handling to XEngine. Add needed stubs to DotNetEngine. --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 7 +++++++ OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 1c865e8..8e3d026 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -93,6 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance private bool m_postOnRez; private bool m_startedFromSavedState = false; private string m_CurrentState = String.Empty; + private UUID m_RegionID = UUID.Zero; //private ISponsor m_ScriptSponsor; private Dictionary, KeyValuePair> @@ -231,6 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance m_MaxScriptQueue = maxScriptQueue; m_stateSource = stateSource; m_postOnRez = postOnRez; + m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; if (part != null) { @@ -980,5 +982,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance return ScriptSerializer.Serialize(this); } + + public UUID RegionID + { + get { return m_RegionID; } + } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index cf98cf1..9fe48df 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs @@ -60,7 +60,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); XEngine.XEngine engine = new XEngine.XEngine(); - engine.Initialise(scene, initConfigSource); + engine.Initialise(initConfigSource); + engine.AddRegion(scene); m_lslApi = new LSL_Api(); m_lslApi.Initialize(engine, part, part.LocalId, part.UUID); -- cgit v1.1