diff options
author | Melanie Thielker | 2010-06-02 01:01:56 +0200 |
---|---|---|
committer | Melanie | 2010-06-02 01:21:50 +0100 |
commit | 53e96dccef005237a4d5afe477e19ab1837a5c7c (patch) | |
tree | 6d96c947e8ed958fe70e947857554cbd36df7a38 /OpenSim/Region/ScriptEngine/Shared | |
parent | One should not lock null objects. (diff) | |
download | opensim-SC_OLD-53e96dccef005237a4d5afe477e19ab1837a5c7c.zip opensim-SC_OLD-53e96dccef005237a4d5afe477e19ab1837a5c7c.tar.gz opensim-SC_OLD-53e96dccef005237a4d5afe477e19ab1837a5c7c.tar.bz2 opensim-SC_OLD-53e96dccef005237a4d5afe477e19ab1837a5c7c.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 6e9a823..a8a3595 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9788,6 +9788,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9788 | ScriptSleep(100); | 9788 | ScriptSleep(100); |
9789 | return tid.ToString(); | 9789 | return tid.ToString(); |
9790 | } | 9790 | } |
9791 | |||
9792 | public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules) | ||
9793 | { | ||
9794 | SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); | ||
9795 | if (obj == null) | ||
9796 | return; | ||
9797 | |||
9798 | SetPrimParams(obj, rules); | ||
9799 | } | ||
9800 | |||
9801 | public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules) | ||
9802 | { | ||
9803 | SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); | ||
9804 | if (obj == null) | ||
9805 | return new LSL_List(); | ||
9806 | |||
9807 | return GetLinkPrimitiveParams(obj, rules); | ||
9808 | } | ||
9791 | } | 9809 | } |
9792 | 9810 | ||
9793 | public class NotecardCache | 9811 | 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 7ada738..dde664e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2186,5 +2186,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2186 | } | 2186 | } |
2187 | } | 2187 | } |
2188 | } | 2188 | } |
2189 | |||
2190 | public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) | ||
2191 | { | ||
2192 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); | ||
2193 | m_host.AddScriptLPS(1); | ||
2194 | |||
2195 | return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules); | ||
2196 | } | ||
2197 | |||
2198 | public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) | ||
2199 | { | ||
2200 | CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); | ||
2201 | m_host.AddScriptLPS(1); | ||
2202 | |||
2203 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); | ||
2204 | } | ||
2189 | } | 2205 | } |
2190 | } | 2206 | } |
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 7a8f469..9785b24 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 | } |