diff options
author | Melanie Thielker | 2010-06-02 01:01:56 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-06-02 01:01:56 +0200 |
commit | d8962ef4151043babe8d5c33c332bf49b020b119 (patch) | |
tree | 9cf812114a6e26d6cf92ec068aa5edf2ef29cbf6 /OpenSim/Region/ScriptEngine | |
parent | One should not lock null objects. (diff) | |
download | opensim-SC-d8962ef4151043babe8d5c33c332bf49b020b119.zip opensim-SC-d8962ef4151043babe8d5c33c332bf49b020b119.tar.gz opensim-SC-d8962ef4151043babe8d5c33c332bf49b020b119.tar.bz2 opensim-SC-d8962ef4151043babe8d5c33c332bf49b020b119.tar.xz |
Add two new osFunctions:
list osGetPrimititveParams(key prim, list rules);
osSetPrimitiveParams(key prim, list rules);
Diffstat (limited to '')
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; | |||
35 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | 35 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; |
36 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | 36 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; |
37 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | 37 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; |
38 | using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | 40 | namespace 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; | |||
41 | using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | 41 | using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; |
42 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | 42 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; |
43 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | 43 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; |
44 | using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
44 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | 45 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; |
45 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | 46 | using 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 | } |