diff options
author | Melanie Thielker | 2008-11-08 14:35:52 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-08 14:35:52 +0000 |
commit | e93828fe00f3ccc222c760eaf930de33cbc6c0e0 (patch) | |
tree | 7def7c34705ab9b5e883a392d4594d648fc949f1 /OpenSim/Region | |
parent | Change Version string from 0.5.11 to 0.6.0 for release. (diff) | |
download | opensim-SC-e93828fe00f3ccc222c760eaf930de33cbc6c0e0.zip opensim-SC-e93828fe00f3ccc222c760eaf930de33cbc6c0e0.tar.gz opensim-SC-e93828fe00f3ccc222c760eaf930de33cbc6c0e0.tar.bz2 opensim-SC-e93828fe00f3ccc222c760eaf930de33cbc6c0e0.tar.xz |
Add some discovery code, laying groundwork for region-crossing scripts
No user functionality yet
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/Interfaces/IScriptModule.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | 3 |
3 files changed, 29 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d4346e4..2f08322 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -32,6 +32,7 @@ using OpenMetaverse; | |||
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications.Cache; | 34 | using OpenSim.Framework.Communications.Cache; |
35 | using OpenSim.Region.Interfaces; | ||
35 | using OpenSim.Region.Environment.Interfaces; | 36 | using OpenSim.Region.Environment.Interfaces; |
36 | using OpenSim.Region.Environment.Scenes.Scripting; | 37 | using OpenSim.Region.Environment.Scenes.Scripting; |
37 | 38 | ||
@@ -763,5 +764,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
763 | 764 | ||
764 | return ret; | 765 | return ret; |
765 | } | 766 | } |
767 | |||
768 | string[] GetScriptAssemblies() | ||
769 | { | ||
770 | IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | ||
771 | |||
772 | List<string> ret = new List<string>(); | ||
773 | |||
774 | foreach (TaskInventoryItem item in m_taskInventory.Values) | ||
775 | { | ||
776 | if (item.InvType == 10) | ||
777 | { | ||
778 | foreach (IScriptModule e in engines) | ||
779 | { | ||
780 | string n = e.GetAssemblyName(item.ItemID); | ||
781 | if (n != "") | ||
782 | { | ||
783 | if (!ret.Contains(n)) | ||
784 | ret.Add(n); | ||
785 | break; | ||
786 | } | ||
787 | } | ||
788 | } | ||
789 | } | ||
790 | return ret.ToArray(); | ||
791 | } | ||
766 | } | 792 | } |
767 | } | 793 | } |
diff --git a/OpenSim/Region/Interfaces/IScriptModule.cs b/OpenSim/Region/Interfaces/IScriptModule.cs index e01b472..9dca862 100644 --- a/OpenSim/Region/Interfaces/IScriptModule.cs +++ b/OpenSim/Region/Interfaces/IScriptModule.cs | |||
@@ -34,5 +34,8 @@ namespace OpenSim.Region.Interfaces | |||
34 | public interface IScriptModule | 34 | public interface IScriptModule |
35 | { | 35 | { |
36 | string ScriptEngineName { get; } | 36 | string ScriptEngineName { get; } |
37 | |||
38 | string GetAssemblyName(UUID itemID); | ||
39 | string GetXMLState(UUID itemID); | ||
37 | } | 40 | } |
38 | } | 41 | } |
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 29b83dc..db05d47 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | |||
@@ -72,8 +72,5 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
72 | string ScriptEngineName { get; } | 72 | string ScriptEngineName { get; } |
73 | ILog Log { get; } | 73 | ILog Log { get; } |
74 | IScriptApi GetApi(UUID itemID, string name); | 74 | IScriptApi GetApi(UUID itemID, string name); |
75 | |||
76 | string GetAssemblyName(UUID itemID); | ||
77 | string GetXMLState(UUID itemID); | ||
78 | } | 75 | } |
79 | } | 76 | } |