Add two new osFunctions:

list osGetPrimititveParams(key prim, list rules);
osSetPrimitiveParams(key prim, list rules);
avinationmerge
Melanie Thielker 2010-06-02 01:01:56 +02:00
parent 6668c789d3
commit d8962ef415
5 changed files with 50 additions and 0 deletions

View File

@ -10261,6 +10261,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(100);
return tid.ToString();
}
public void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
{
SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
if (obj == null)
return;
SetPrimParams(obj, rules);
}
public LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
{
SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
if (obj == null)
return new LSL_List();
return GetLinkPrimitiveParams(obj, rules);
}
}
public class NotecardCache

View File

@ -2190,5 +2190,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
}
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
m_host.AddScriptLPS(1);
return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
}
public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
m_host.AddScriptLPS(1);
m_LSL_Api.SetPrimitiveParamsEx(prim, rules);
}
}
}

View File

@ -395,5 +395,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Vector llWind(LSL_Vector offset);
LSL_String llXorBase64Strings(string str1, string str2);
LSL_String llXorBase64StringsCorrect(string str1, string str2);
void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
}
}

View File

@ -35,6 +35,7 @@ using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
{
@ -173,5 +174,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osSetSpeed(string UUID, float SpeedModifier);
void osCauseHealing(string avatar, double healing);
void osCauseDamage(string avatar, double damage);
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
}
}

View File

@ -41,6 +41,7 @@ using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
@ -678,5 +679,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
m_OSSL_Functions.osCauseHealing(avatar, healing);
}
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
}
public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
}
}
}