aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs40
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs6
10 files changed, 36 insertions, 46 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
index cced522..2027ca6 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
@@ -42,8 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
42 /// proper runtime assembly at load time. 42 /// proper runtime assembly at load time.
43 /// <param name='engine'>/param> 43 /// <param name='engine'>/param>
44 /// <param name='part'></param> 44 /// <param name='part'></param>
45 /// <param name='localID'></param>
46 /// <param name='item'></param> 45 /// <param name='item'></param>
47 void Initialize(IScriptEngine engine, SceneObjectPart part, uint localID, TaskInventoryItem item); 46 void Initialize(IScriptEngine engine, SceneObjectPart part, TaskInventoryItem item);
48 } 47 }
49} \ No newline at end of file 48} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e8e4dab..afd943b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -84,7 +84,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
84 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 84 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
85 protected IScriptEngine m_ScriptEngine; 85 protected IScriptEngine m_ScriptEngine;
86 protected SceneObjectPart m_host; 86 protected SceneObjectPart m_host;
87 protected uint m_localID;
88 87
89 /// <summary> 88 /// <summary>
90 /// The item that hosts this script 89 /// The item that hosts this script
@@ -108,11 +107,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
108 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = 107 protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache =
109 new Dictionary<UUID, UserInfoCacheEntry>(); 108 new Dictionary<UUID, UserInfoCacheEntry>();
110 109
111 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, TaskInventoryItem item) 110 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
112 { 111 {
113 m_ScriptEngine = ScriptEngine; 112 m_ScriptEngine = ScriptEngine;
114 m_host = host; 113 m_host = host;
115 m_localID = localID;
116 m_item = item; 114 m_item = item;
117 115
118 m_ScriptDelayFactor = 116 m_ScriptDelayFactor =
@@ -843,7 +841,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
843 UUID.TryParse(ID, out keyID); 841 UUID.TryParse(ID, out keyID);
844 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 842 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
845 if (wComm != null) 843 if (wComm != null)
846 return wComm.Listen(m_localID, m_item.ItemID, m_host.UUID, channelID, name, keyID, msg); 844 return wComm.Listen(m_host.LocalId, m_item.ItemID, m_host.UUID, channelID, name, keyID, msg);
847 else 845 else
848 return -1; 846 return -1;
849 } 847 }
@@ -870,7 +868,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
870 UUID keyID = UUID.Zero; 868 UUID keyID = UUID.Zero;
871 UUID.TryParse(id, out keyID); 869 UUID.TryParse(id, out keyID);
872 870
873 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_localID, m_item.ItemID, name, keyID, type, range, arc, m_host); 871 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, m_host);
874 } 872 }
875 873
876 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 874 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
@@ -879,13 +877,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
879 UUID keyID = UUID.Zero; 877 UUID keyID = UUID.Zero;
880 UUID.TryParse(id, out keyID); 878 UUID.TryParse(id, out keyID);
881 879
882 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_localID, m_item.ItemID, name, keyID, type, range, arc, rate, m_host); 880 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, rate, m_host);
883 } 881 }
884 882
885 public void llSensorRemove() 883 public void llSensorRemove()
886 { 884 {
887 m_host.AddScriptLPS(1); 885 m_host.AddScriptLPS(1);
888 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_localID, m_item.ItemID); 886 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID);
889 } 887 }
890 888
891 public string resolveName(UUID objecUUID) 889 public string resolveName(UUID objecUUID)
@@ -2874,7 +2872,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2874 sec = m_MinTimerInterval; 2872 sec = m_MinTimerInterval;
2875 m_host.AddScriptLPS(1); 2873 m_host.AddScriptLPS(1);
2876 // Setting timer repeat 2874 // Setting timer repeat
2877 AsyncCommands.TimerPlugin.SetTimerEvent(m_localID, m_item.ItemID, sec); 2875 AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec);
2878 } 2876 }
2879 2877
2880 public virtual void llSleep(double sec) 2878 public virtual void llSleep(double sec)
@@ -2937,7 +2935,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2937 { 2935 {
2938 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) 2936 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0)
2939 { 2937 {
2940 presence.RegisterControlEventsToScript(controls, accept, pass_on, m_localID, m_item.ItemID); 2938 presence.RegisterControlEventsToScript(controls, accept, pass_on, m_host.LocalId, m_item.ItemID);
2941 } 2939 }
2942 } 2940 }
2943 } 2941 }
@@ -2958,7 +2956,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2958 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) 2956 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0)
2959 { 2957 {
2960 // Unregister controls from Presence 2958 // Unregister controls from Presence
2961 presence.UnRegisterControlEventsToScript(m_localID, m_item.ItemID); 2959 presence.UnRegisterControlEventsToScript(m_host.LocalId, m_item.ItemID);
2962 // Remove Take Control permission. 2960 // Remove Take Control permission.
2963 m_item.PermsMask &= ~ScriptBaseClass.PERMISSION_TAKE_CONTROLS; 2961 m_item.PermsMask &= ~ScriptBaseClass.PERMISSION_TAKE_CONTROLS;
2964 } 2962 }
@@ -4089,7 +4087,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4089 UUID rq = UUID.Random(); 4087 UUID rq = UUID.Random();
4090 4088
4091 UUID tid = AsyncCommands. 4089 UUID tid = AsyncCommands.
4092 DataserverPlugin.RegisterRequest(m_localID, 4090 DataserverPlugin.RegisterRequest(m_host.LocalId,
4093 m_item.ItemID, rq.ToString()); 4091 m_item.ItemID, rq.ToString());
4094 4092
4095 AsyncCommands. 4093 AsyncCommands.
@@ -4110,7 +4108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4110 if (item.Type == 3 && item.Name == name) 4108 if (item.Type == 3 && item.Name == name)
4111 { 4109 {
4112 UUID tid = AsyncCommands. 4110 UUID tid = AsyncCommands.
4113 DataserverPlugin.RegisterRequest(m_localID, 4111 DataserverPlugin.RegisterRequest(m_host.LocalId,
4114 m_item.ItemID, item.AssetID.ToString()); 4112 m_item.ItemID, item.AssetID.ToString());
4115 4113
4116 Vector3 region = new Vector3( 4114 Vector3 region = new Vector3(
@@ -6564,7 +6562,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6564 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6562 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6565 if (xmlrpcMod.IsEnabled()) 6563 if (xmlrpcMod.IsEnabled())
6566 { 6564 {
6567 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_item.ItemID, UUID.Zero); 6565 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero);
6568 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); 6566 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
6569 if (xmlRpcRouter != null) 6567 if (xmlRpcRouter != null)
6570 { 6568 {
@@ -6594,7 +6592,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6594 m_host.AddScriptLPS(1); 6592 m_host.AddScriptLPS(1);
6595 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6593 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6596 ScriptSleep(3000); 6594 ScriptSleep(3000);
6597 return (xmlrpcMod.SendRemoteData(m_localID, m_item.ItemID, channel, dest, idata, sdata)).ToString(); 6595 return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
6598 } 6596 }
6599 6597
6600 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) 6598 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata)
@@ -9083,7 +9081,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9083 UUID rq = UUID.Random(); 9081 UUID rq = UUID.Random();
9084 9082
9085 UUID tid = AsyncCommands. 9083 UUID tid = AsyncCommands.
9086 DataserverPlugin.RegisterRequest(m_localID, m_item.ItemID, rq.ToString()); 9084 DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, rq.ToString());
9087 9085
9088 AsyncCommands. 9086 AsyncCommands.
9089 DataserverPlugin.DataserverReply(rq.ToString(), reply); 9087 DataserverPlugin.DataserverReply(rq.ToString(), reply);
@@ -9982,8 +9980,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9982 } 9980 }
9983 } 9981 }
9984 9982
9985 UUID reqID = httpScriptMod. 9983 UUID reqID
9986 StartHttpRequest(m_localID, m_item.ItemID, url, param, httpHeaders, body); 9984 = httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body);
9987 9985
9988 if (reqID != UUID.Zero) 9986 if (reqID != UUID.Zero)
9989 return reqID.ToString(); 9987 return reqID.ToString();
@@ -10413,7 +10411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10413 } 10411 }
10414 10412
10415 // was: UUID tid = tid = AsyncCommands. 10413 // was: UUID tid = tid = AsyncCommands.
10416 UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_item.ItemID, assetID.ToString()); 10414 UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString());
10417 10415
10418 if (NotecardCache.IsCached(assetID)) 10416 if (NotecardCache.IsCached(assetID))
10419 { 10417 {
@@ -10475,7 +10473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10475 } 10473 }
10476 10474
10477 // was: UUID tid = tid = AsyncCommands. 10475 // was: UUID tid = tid = AsyncCommands.
10478 UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_item.ItemID, assetID.ToString()); 10476 UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString());
10479 10477
10480 if (NotecardCache.IsCached(assetID)) 10478 if (NotecardCache.IsCached(assetID))
10481 { 10479 {
@@ -10561,7 +10559,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10561 { 10559 {
10562 UUID rq = UUID.Random(); 10560 UUID rq = UUID.Random();
10563 10561
10564 AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_item.ItemID, rq.ToString()); 10562 AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, rq.ToString());
10565 10563
10566 AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), Name2Username(llKey2Name(id))); 10564 AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), Name2Username(llKey2Name(id)));
10567 10565
@@ -10577,7 +10575,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10577 { 10575 {
10578 UUID rq = UUID.Random(); 10576 UUID rq = UUID.Random();
10579 10577
10580 AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_item.ItemID, rq.ToString()); 10578 AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, rq.ToString());
10581 10579
10582 AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), llKey2Name(id)); 10580 AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), llKey2Name(id));
10583 10581
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
index cd47d96..795de80 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
@@ -58,15 +58,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
58 { 58 {
59 internal IScriptEngine m_ScriptEngine; 59 internal IScriptEngine m_ScriptEngine;
60 internal SceneObjectPart m_host; 60 internal SceneObjectPart m_host;
61 internal uint m_localID;
62 internal bool m_LSFunctionsEnabled = false; 61 internal bool m_LSFunctionsEnabled = false;
63 internal IScriptModuleComms m_comms = null; 62 internal IScriptModuleComms m_comms = null;
64 63
65 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, TaskInventoryItem item) 64 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
66 { 65 {
67 m_ScriptEngine = ScriptEngine; 66 m_ScriptEngine = ScriptEngine;
68 m_host = host; 67 m_host = host;
69 m_localID = localID;
70 68
71 if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false)) 69 if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false))
72 m_LSFunctionsEnabled = true; 70 m_LSFunctionsEnabled = true;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index a578b50..4bd3dff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -57,16 +57,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
57 { 57 {
58 internal IScriptEngine m_ScriptEngine; 58 internal IScriptEngine m_ScriptEngine;
59 internal SceneObjectPart m_host; 59 internal SceneObjectPart m_host;
60 internal uint m_localID;
61 internal TaskInventoryItem m_item; 60 internal TaskInventoryItem m_item;
62 internal bool m_MODFunctionsEnabled = false; 61 internal bool m_MODFunctionsEnabled = false;
63 internal IScriptModuleComms m_comms = null; 62 internal IScriptModuleComms m_comms = null;
64 63
65 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, TaskInventoryItem item) 64 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
66 { 65 {
67 m_ScriptEngine = ScriptEngine; 66 m_ScriptEngine = ScriptEngine;
68 m_host = host; 67 m_host = host;
69 m_localID = localID;
70 m_item = item; 68 m_item = item;
71 69
72 if (m_ScriptEngine.Config.GetBoolean("AllowMODFunctions", false)) 70 if (m_ScriptEngine.Config.GetBoolean("AllowMODFunctions", false))
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 9b2022a..ad1a358 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -133,7 +133,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
133 internal IScriptEngine m_ScriptEngine; 133 internal IScriptEngine m_ScriptEngine;
134 internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there 134 internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there
135 internal SceneObjectPart m_host; 135 internal SceneObjectPart m_host;
136 internal uint m_localID;
137 internal TaskInventoryItem m_item; 136 internal TaskInventoryItem m_item;
138 internal bool m_OSFunctionsEnabled = false; 137 internal bool m_OSFunctionsEnabled = false;
139 internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; 138 internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow;
@@ -141,11 +140,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
141 internal float m_ScriptDistanceFactor = 1.0f; 140 internal float m_ScriptDistanceFactor = 1.0f;
142 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); 141 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
143 142
144 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, TaskInventoryItem item) 143 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
145 { 144 {
146 m_ScriptEngine = ScriptEngine; 145 m_ScriptEngine = ScriptEngine;
147 m_host = host; 146 m_host = host;
148 m_localID = localID;
149 m_item = item; 147 m_item = item;
150 148
151 if (m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) 149 if (m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index dd47393..329e361 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -232,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
232 foreach (string api in am.GetApis()) 232 foreach (string api in am.GetApis())
233 { 233 {
234 m_Apis[api] = am.CreateApi(api); 234 m_Apis[api] = am.CreateApi(api);
235 m_Apis[api].Initialize(engine, part, LocalID, ScriptTask); 235 m_Apis[api].Initialize(engine, part, ScriptTask);
236 } 236 }
237 237
238 try 238 try
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
index f480e1d..c73e22f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
@@ -88,11 +88,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
88 88
89 // Create an object embedded inside the first 89 // Create an object embedded inside the first
90 UUID itemId = TestHelpers.ParseTail(0x20); 90 UUID itemId = TestHelpers.ParseTail(0x20);
91 TaskInventoryItem item 91 TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId);
92 = TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId);
93 92
94 LSL_Api api = new LSL_Api(); 93 LSL_Api api = new LSL_Api();
95 api.Initialize(m_engine, so1.RootPart, so1.RootPart.LocalId, null); 94 api.Initialize(m_engine, so1.RootPart, null);
96 95
97 // Create a second object 96 // Create a second object
98 SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, userId, "so2", 0x100); 97 SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, userId, "so2", 0x100);
@@ -125,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
125 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); 124 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10);
126 m_scene.AddSceneObject(so1); 125 m_scene.AddSceneObject(so1);
127 LSL_Api api = new LSL_Api(); 126 LSL_Api api = new LSL_Api();
128 api.Initialize(m_engine, so1.RootPart, so1.RootPart.LocalId, null); 127 api.Initialize(m_engine, so1.RootPart, null);
129 128
130 // Create an object embedded inside the first 129 // Create an object embedded inside the first
131 UUID itemId = TestHelpers.ParseTail(0x20); 130 UUID itemId = TestHelpers.ParseTail(0x20);
@@ -135,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
135 SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); 134 SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100);
136 m_scene.AddSceneObject(so2); 135 m_scene.AddSceneObject(so2);
137 LSL_Api api2 = new LSL_Api(); 136 LSL_Api api2 = new LSL_Api();
138 api2.Initialize(m_engine, so2.RootPart, so2.RootPart.LocalId, null); 137 api2.Initialize(m_engine, so2.RootPart, null);
139 138
140 // *** Firstly, we test where llAllowInventoryDrop() has not been called. *** 139 // *** Firstly, we test where llAllowInventoryDrop() has not been called. ***
141 api.llGiveInventory(so2.UUID.ToString(), inventoryItemName); 140 api.llGiveInventory(so2.UUID.ToString(), inventoryItemName);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index bba6c56..f96a156 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
66 engine.AddRegion(scene); 66 engine.AddRegion(scene);
67 67
68 m_lslApi = new LSL_Api(); 68 m_lslApi = new LSL_Api();
69 m_lslApi.Initialize(engine, part, part.LocalId, null); 69 m_lslApi.Initialize(engine, part, null);
70 } 70 }
71 71
72 [Test] 72 [Test]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
index dff8f6e..3965734 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
95 m_scene.AddSceneObject(so); 95 m_scene.AddSceneObject(so);
96 96
97 OSSL_Api osslApi = new OSSL_Api(); 97 OSSL_Api osslApi = new OSSL_Api();
98 osslApi.Initialize(m_engine, part, part.LocalId, null); 98 osslApi.Initialize(m_engine, part, null);
99 99
100 string notecardName = "appearanceNc"; 100 string notecardName = "appearanceNc";
101 osslApi.osOwnerSaveAppearance(notecardName); 101 osslApi.osOwnerSaveAppearance(notecardName);
@@ -130,7 +130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
130 m_scene.AddSceneObject(so); 130 m_scene.AddSceneObject(so);
131 131
132 OSSL_Api osslApi = new OSSL_Api(); 132 OSSL_Api osslApi = new OSSL_Api();
133 osslApi.Initialize(m_engine, part, part.LocalId, null); 133 osslApi.Initialize(m_engine, part, null);
134 134
135 string notecardName = "appearanceNc"; 135 string notecardName = "appearanceNc";
136 osslApi.osOwnerSaveAppearance(notecardName); 136 osslApi.osOwnerSaveAppearance(notecardName);
@@ -161,7 +161,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
161 m_scene.AddSceneObject(so); 161 m_scene.AddSceneObject(so);
162 162
163 OSSL_Api osslApi = new OSSL_Api(); 163 OSSL_Api osslApi = new OSSL_Api();
164 osslApi.Initialize(m_engine, part, part.LocalId, null); 164 osslApi.Initialize(m_engine, part, null);
165 165
166 string notecardName = "appearanceNc"; 166 string notecardName = "appearanceNc";
167 167
@@ -202,7 +202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
202 m_scene.AddSceneObject(so); 202 m_scene.AddSceneObject(so);
203 203
204 OSSL_Api osslApi = new OSSL_Api(); 204 OSSL_Api osslApi = new OSSL_Api();
205 osslApi.Initialize(m_engine, part, part.LocalId, null); 205 osslApi.Initialize(m_engine, part, null);
206 206
207 string notecardName = "appearanceNc"; 207 string notecardName = "appearanceNc";
208 208
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
index 80ac52c..0ccd889 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
@@ -104,10 +104,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
104 m_scene.AddSceneObject(otherSo); 104 m_scene.AddSceneObject(otherSo);
105 105
106 OSSL_Api osslApi = new OSSL_Api(); 106 OSSL_Api osslApi = new OSSL_Api();
107 osslApi.Initialize(m_engine, part, part.LocalId, null); 107 osslApi.Initialize(m_engine, part, null);
108 108
109 OSSL_Api otherOsslApi = new OSSL_Api(); 109 OSSL_Api otherOsslApi = new OSSL_Api();
110 otherOsslApi.Initialize(m_engine, otherPart, otherPart.LocalId, null); 110 otherOsslApi.Initialize(m_engine, otherPart, null);
111 111
112 string notecardName = "appearanceNc"; 112 string notecardName = "appearanceNc";
113 osslApi.osOwnerSaveAppearance(notecardName); 113 osslApi.osOwnerSaveAppearance(notecardName);
@@ -151,7 +151,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
151 m_scene.AddSceneObject(so); 151 m_scene.AddSceneObject(so);
152 152
153 OSSL_Api osslApi = new OSSL_Api(); 153 OSSL_Api osslApi = new OSSL_Api();
154 osslApi.Initialize(m_engine, part, part.LocalId, null); 154 osslApi.Initialize(m_engine, part, null);
155 155
156 string notecardName = "appearanceNc"; 156 string notecardName = "appearanceNc";
157 osslApi.osOwnerSaveAppearance(notecardName); 157 osslApi.osOwnerSaveAppearance(notecardName);