aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock')
-rw-r--r--OpenSim/Tests/Common/Mock/MockScriptEngine.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
index 6a53fe7..b444241 100644
--- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
+++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using Nini.Config; 32using Nini.Config;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenSim.Framework;
34using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 36using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.ScriptEngine.Interfaces; 37using OpenSim.Region.ScriptEngine.Interfaces;
@@ -110,8 +111,11 @@ namespace OpenSim.Tests.Common
110 { 111 {
111// Console.WriteLine("Posting event {0} for {1}", name, itemID); 112// Console.WriteLine("Posting event {0} for {1}", name, itemID);
112 113
113 EventParams evParams = new EventParams(name, args, null); 114 return PostScriptEvent(itemID, new EventParams(name, args, null));
115 }
114 116
117 public bool PostScriptEvent(UUID itemID, EventParams evParams)
118 {
115 List<EventParams> eventsForItem; 119 List<EventParams> eventsForItem;
116 120
117 if (!PostedEvents.ContainsKey(itemID)) 121 if (!PostedEvents.ContainsKey(itemID))
@@ -132,9 +136,22 @@ namespace OpenSim.Tests.Common
132 return true; 136 return true;
133 } 137 }
134 138
139 public bool PostObjectEvent(uint localID, EventParams evParams)
140 {
141 return PostObjectEvent(m_scene.GetSceneObjectPart(localID), evParams);
142 }
143
135 public bool PostObjectEvent(UUID itemID, string name, object[] args) 144 public bool PostObjectEvent(UUID itemID, string name, object[] args)
136 { 145 {
137 throw new System.NotImplementedException (); 146 return PostObjectEvent(m_scene.GetSceneObjectPart(itemID), new EventParams(name, args, null));
147 }
148
149 private bool PostObjectEvent(SceneObjectPart part, EventParams evParams)
150 {
151 foreach (TaskInventoryItem item in part.Inventory.GetInventoryItems(InventoryType.LSL))
152 PostScriptEvent(item.ItemID, evParams);
153
154 return true;
138 } 155 }
139 156
140 public void SuspendScript(UUID itemID) 157 public void SuspendScript(UUID itemID)
@@ -187,16 +204,6 @@ namespace OpenSim.Tests.Common
187 throw new System.NotImplementedException (); 204 throw new System.NotImplementedException ();
188 } 205 }
189 206
190 public bool PostScriptEvent(UUID itemID,EventParams parms)
191 {
192 throw new System.NotImplementedException ();
193 }
194
195 public bool PostObjectEvent (uint localID, EventParams parms)
196 {
197 throw new System.NotImplementedException ();
198 }
199
200 public DetectParams GetDetectParams(UUID item, int number) 207 public DetectParams GetDetectParams(UUID item, int number)
201 { 208 {
202 throw new System.NotImplementedException (); 209 throw new System.NotImplementedException ();