aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/ExtensionHandler.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs15
3 files changed, 11 insertions, 18 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ExtensionHandler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ExtensionHandler.cs
index d8f7a84..3f1bd54 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ExtensionHandler.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ExtensionHandler.cs
@@ -32,7 +32,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces;
32 32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{ 34{
35 class ExtensionHandler : IExtension 35 class ExtensionHandler : IExtension
36 { 36 {
37 private readonly Dictionary<Type, object> m_instances; 37 private readonly Dictionary<Type, object> m_instances;
38 38
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
index 2ddc31b..df60709 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 private Scene m_scene; 52 private Scene m_scene;
53 53
54 private readonly Dictionary<UUID,MRMBase> m_scripts = new Dictionary<UUID, MRMBase>(); 54 private readonly Dictionary<UUID,MRMBase> m_scripts = new Dictionary<UUID, MRMBase>();
55 55
56 private readonly Dictionary<Type,object> m_extensions = new Dictionary<Type, object>(); 56 private readonly Dictionary<Type,object> m_extensions = new Dictionary<Type, object>();
@@ -77,7 +77,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
77 { 77 {
78 m_log.Info("[MRM] Enabling MRM Module"); 78 m_log.Info("[MRM] Enabling MRM Module");
79 m_scene = scene; 79 m_scene = scene;
80 80
81 // when hidden, we don't listen for client initiated script events 81 // when hidden, we don't listen for client initiated script events
82 // only making the MRM engine available for region modules 82 // only making the MRM engine available for region modules
83 if (!source.Configs["MRM"].GetBoolean("Hidden", false)) 83 if (!source.Configs["MRM"].GetBoolean("Hidden", false))
@@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
85 scene.EventManager.OnRezScript += EventManager_OnRezScript; 85 scene.EventManager.OnRezScript += EventManager_OnRezScript;
86 scene.EventManager.OnStopScript += EventManager_OnStopScript; 86 scene.EventManager.OnStopScript += EventManager_OnStopScript;
87 } 87 }
88 88
89 scene.EventManager.OnFrame += EventManager_OnFrame; 89 scene.EventManager.OnFrame += EventManager_OnFrame;
90 90
91 scene.RegisterModuleInterface<IMRMModule>(this); 91 scene.RegisterModuleInterface<IMRMModule>(this);
@@ -291,7 +291,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
291 291
292 public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID) 292 public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID)
293 { 293 {
294
295 m_log.Info("[MRM] Created MRM Instance"); 294 m_log.Info("[MRM] Created MRM Instance");
296 295
297 IWorld world; 296 IWorld world;
@@ -304,7 +303,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
304 303
305 public void PostInitialise() 304 public void PostInitialise()
306 { 305 {
307
308 } 306 }
309 307
310 public void Close() 308 public void Close()
@@ -350,7 +348,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
350 if (!Directory.Exists(tmp)) 348 if (!Directory.Exists(tmp))
351 Directory.CreateDirectory(tmp); 349 Directory.CreateDirectory(tmp);
352 350
353
354 m_log.Info("MRM 2"); 351 m_log.Info("MRM 2");
355 352
356 try 353 try
@@ -396,8 +393,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
396 393
397 parameters.IncludeDebugInformation = true; 394 parameters.IncludeDebugInformation = true;
398 395
399 string rootPath = 396 string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
400 Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
401 397
402 List<string> libraries = new List<string>(); 398 List<string> libraries = new List<string>();
403 string[] lines = Script.Split(new string[] {"\n"}, StringSplitOptions.RemoveEmptyEntries); 399 string[] lines = Script.Split(new string[] {"\n"}, StringSplitOptions.RemoveEmptyEntries);
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index 0786bd9..922eaaf 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -29,6 +29,7 @@ using System.Collections;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Security; 30using System.Security;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
33using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
34 35
@@ -81,16 +82,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
81 get { 82 get {
82 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>(); 83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
83 84
84 Hashtable internalAttachments = GetSP().Appearance.GetAttachments(); 85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
85 if (internalAttachments != null) 86 foreach (AvatarAttachment attach in internalAttachments)
86 { 87 {
87 foreach (DictionaryEntry element in internalAttachments) 88 attachments.Add(new SPAvatarAttachment(m_rootScene, this, attach.AttachPoint,
88 { 89 new UUID(attach.ItemID),
89 Hashtable attachInfo = (Hashtable)element.Value; 90 new UUID(attach.AssetID), m_security));
90 attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key,
91 new UUID((string) attachInfo["item"]),
92 new UUID((string) attachInfo["asset"]), m_security));
93 }
94 } 91 }
95 92
96 return attachments.ToArray(); 93 return attachments.ToArray();