aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-09 19:30:40 +0000
committerMelanie Thielker2008-11-09 19:30:40 +0000
commit664e8a464e4608afeb590a3330ccc69e7988138b (patch)
tree099c17a1769a7e7ac16232c5a20f5d9515a1d480 /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
parentCause llGetInventoryType to return the asset type, which corresponds with (diff)
downloadopensim-SC-664e8a464e4608afeb590a3330ccc69e7988138b.zip
opensim-SC-664e8a464e4608afeb590a3330ccc69e7988138b.tar.gz
opensim-SC-664e8a464e4608afeb590a3330ccc69e7988138b.tar.bz2
opensim-SC-664e8a464e4608afeb590a3330ccc69e7988138b.tar.xz
Script region crossing. This has not user functionality, but lays all the
groundwork.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs38
1 files changed, 31 insertions, 7 deletions
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
126 /// <summary> 126 /// <summary>
127 /// Start all the scripts contained in this prim's inventory 127 /// Start all the scripts contained in this prim's inventory
128 /// </summary> 128 /// </summary>
129 public void CreateScriptInstances(int startParam, bool postOnRez, string engine) 129 public void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource)
130 { 130 {
131 lock (m_taskInventory) 131 lock (m_taskInventory)
132 { 132 {
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
134 { 134 {
135 if ((int)InventoryType.LSL == item.InvType) 135 if ((int)InventoryType.LSL == item.InvType)
136 { 136 {
137 CreateScriptInstance(item, startParam, postOnRez, engine); 137 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
138 } 138 }
139 } 139 }
140 } 140 }
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Scenes
163 /// </summary> 163 /// </summary>
164 /// <param name="item"></param> 164 /// <param name="item"></param>
165 /// <returns></returns> 165 /// <returns></returns>
166 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine) 166 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource)
167 { 167 {
168 // m_log.InfoFormat( 168 // m_log.InfoFormat(
169 // "[PRIM INVENTORY]: " + 169 // "[PRIM INVENTORY]: " +
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes
194 m_taskInventory[item.ItemID].PermsGranter = UUID.Zero; 194 m_taskInventory[item.ItemID].PermsGranter = UUID.Zero;
195 string script = Utils.BytesToString(asset.Data); 195 string script = Utils.BytesToString(asset.Data);
196 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script, 196 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script,
197 startParam, postOnRez, engine); 197 startParam, postOnRez, engine, stateSource);
198 m_parentGroup.AddActiveScriptCount(1); 198 m_parentGroup.AddActiveScriptCount(1);
199 ScheduleFullUpdate(); 199 ScheduleFullUpdate();
200 } 200 }
@@ -208,13 +208,13 @@ namespace OpenSim.Region.Environment.Scenes
208 /// <param name="itemId"> 208 /// <param name="itemId">
209 /// A <see cref="UUID"/> 209 /// A <see cref="UUID"/>
210 /// </param> 210 /// </param>
211 public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine) 211 public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource)
212 { 212 {
213 lock (m_taskInventory) 213 lock (m_taskInventory)
214 { 214 {
215 if (m_taskInventory.ContainsKey(itemId)) 215 if (m_taskInventory.ContainsKey(itemId))
216 { 216 {
217 CreateScriptInstance(m_taskInventory[itemId], startParam, postOnRez, engine); 217 CreateScriptInstance(m_taskInventory[itemId], startParam, postOnRez, engine, stateSource);
218 } 218 }
219 else 219 else
220 { 220 {
@@ -765,7 +765,7 @@ namespace OpenSim.Region.Environment.Scenes
765 return ret; 765 return ret;
766 } 766 }
767 767
768 string[] GetScriptAssemblies() 768 public string[] GetScriptAssemblies()
769 { 769 {
770 IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 770 IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
771 771
@@ -789,5 +789,29 @@ namespace OpenSim.Region.Environment.Scenes
789 } 789 }
790 return ret.ToArray(); 790 return ret.ToArray();
791 } 791 }
792
793 public Dictionary<UUID, string> GetScriptStates()
794 {
795 IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
796 Dictionary<UUID, string> ret = new Dictionary<UUID, string>();
797
798 foreach (TaskInventoryItem item in m_taskInventory.Values)
799 {
800 if (item.InvType == 10)
801 {
802 foreach (IScriptModule e in engines)
803 {
804 string n = e.GetXMLState(item.ItemID);
805 if (n != "")
806 {
807 if (!ret.ContainsKey(item.ItemID))
808 ret[item.ItemID] = n;
809 break;
810 }
811 }
812 }
813 }
814 return ret;
815 }
792 } 816 }
793} 817}