aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-02 01:01:56 +0200
committerMelanie Thielker2010-06-02 01:01:56 +0200
commitd8962ef4151043babe8d5c33c332bf49b020b119 (patch)
tree9cf812114a6e26d6cf92ec068aa5edf2ef29cbf6 /OpenSim/Region/ScriptEngine/Shared/Api
parentOne should not lock null objects. (diff)
downloadopensim-SC_OLD-d8962ef4151043babe8d5c33c332bf49b020b119.zip
opensim-SC_OLD-d8962ef4151043babe8d5c33c332bf49b020b119.tar.gz
opensim-SC_OLD-d8962ef4151043babe8d5c33c332bf49b020b119.tar.bz2
opensim-SC_OLD-d8962ef4151043babe8d5c33c332bf49b020b119.tar.xz
Add two new osFunctions:
list osGetPrimititveParams(key prim, list rules); osSetPrimitiveParams(key prim, list rules);
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs9
5 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8cc5e25..481a3e6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10261,6 +10261,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10261 ScriptSleep(100); 10261 ScriptSleep(100);
10262 return tid.ToString(); 10262 return tid.ToString();
10263 } 10263 }
10264
10265 public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
10266 {
10267 SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
10268 if (obj == null)
10269 return;
10270
10271 SetPrimParams(obj, rules);
10272 }
10273
10274 public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
10275 {
10276 SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
10277 if (obj == null)
10278 return new LSL_List();
10279
10280 return GetLinkPrimitiveParams(obj, rules);
10281 }
10264 } 10282 }
10265 10283
10266 public class NotecardCache 10284 public class NotecardCache
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 2e0456e..f2a2f32 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2190,5 +2190,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2190 } 2190 }
2191 } 2191 }
2192 } 2192 }
2193
2194 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
2195 {
2196 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
2197 m_host.AddScriptLPS(1);
2198
2199 return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
2200 }
2201
2202 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
2203 {
2204 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
2205 m_host.AddScriptLPS(1);
2206
2207 m_LSL_Api.SetPrimitiveParamsEx(prim, rules);
2208 }
2193 } 2209 }
2194} 2210}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 7ab04a3..cba46a3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -395,5 +395,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
395 LSL_Vector llWind(LSL_Vector offset); 395 LSL_Vector llWind(LSL_Vector offset);
396 LSL_String llXorBase64Strings(string str1, string str2); 396 LSL_String llXorBase64Strings(string str1, string str2);
397 LSL_String llXorBase64StringsCorrect(string str1, string str2); 397 LSL_String llXorBase64StringsCorrect(string str1, string str2);
398
399 void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
400 LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
398 } 401 }
399} 402}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 9dbd369..1ab7f10 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -35,6 +35,7 @@ using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
35using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; 35using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
36using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 36using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
37using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 37using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
38using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
38 39
39namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces 40namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
40{ 41{
@@ -173,5 +174,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
173 void osSetSpeed(string UUID, float SpeedModifier); 174 void osSetSpeed(string UUID, float SpeedModifier);
174 void osCauseHealing(string avatar, double healing); 175 void osCauseHealing(string avatar, double healing);
175 void osCauseDamage(string avatar, double damage); 176 void osCauseDamage(string avatar, double damage);
177 LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
178 void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
179
176 } 180 }
177} 181}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index fd9309a..7af5d43 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -41,6 +41,7 @@ using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
41using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; 41using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
42using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; 42using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
43using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; 43using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
44using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
44using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 45using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
45using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 46using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
46 47
@@ -678,5 +679,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
678 { 679 {
679 m_OSSL_Functions.osCauseHealing(avatar, healing); 680 m_OSSL_Functions.osCauseHealing(avatar, healing);
680 } 681 }
682 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
683 {
684 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
685 }
686 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
687 {
688 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
689 }
681 } 690 }
682} 691}