From 664e8a464e4608afeb590a3330ccc69e7988138b Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 9 Nov 2008 19:30:40 +0000
Subject: Script region crossing. This has not user functionality, but lays all
the groundwork.
---
.../Scenes/SceneObjectPart.Inventory.cs | 38 ++++++++++++++++++----
1 file changed, 31 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 2f08322..501f199 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Scenes
///
/// Start all the scripts contained in this prim's inventory
///
- public void CreateScriptInstances(int startParam, bool postOnRez, string engine)
+ public void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource)
{
lock (m_taskInventory)
{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if ((int)InventoryType.LSL == item.InvType)
{
- CreateScriptInstance(item, startParam, postOnRez, engine);
+ CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
}
}
}
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine)
+ public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource)
{
// m_log.InfoFormat(
// "[PRIM INVENTORY]: " +
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes
m_taskInventory[item.ItemID].PermsGranter = UUID.Zero;
string script = Utils.BytesToString(asset.Data);
m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script,
- startParam, postOnRez, engine);
+ startParam, postOnRez, engine, stateSource);
m_parentGroup.AddActiveScriptCount(1);
ScheduleFullUpdate();
}
@@ -208,13 +208,13 @@ namespace OpenSim.Region.Environment.Scenes
///
/// A
///
- public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine)
+ public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource)
{
lock (m_taskInventory)
{
if (m_taskInventory.ContainsKey(itemId))
{
- CreateScriptInstance(m_taskInventory[itemId], startParam, postOnRez, engine);
+ CreateScriptInstance(m_taskInventory[itemId], startParam, postOnRez, engine, stateSource);
}
else
{
@@ -765,7 +765,7 @@ namespace OpenSim.Region.Environment.Scenes
return ret;
}
- string[] GetScriptAssemblies()
+ public string[] GetScriptAssemblies()
{
IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces();
@@ -789,5 +789,29 @@ namespace OpenSim.Region.Environment.Scenes
}
return ret.ToArray();
}
+
+ public Dictionary GetScriptStates()
+ {
+ IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces();
+ Dictionary ret = new Dictionary();
+
+ foreach (TaskInventoryItem item in m_taskInventory.Values)
+ {
+ if (item.InvType == 10)
+ {
+ foreach (IScriptModule e in engines)
+ {
+ string n = e.GetXMLState(item.ItemID);
+ if (n != "")
+ {
+ if (!ret.ContainsKey(item.ItemID))
+ ret[item.ItemID] = n;
+ break;
+ }
+ }
+ }
+ }
+ return ret;
+ }
}
}
--
cgit v1.1