add some lsl functions
parent
02ccbd0bbd
commit
e8b9735f95
|
@ -128,6 +128,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
protected IUrlModule m_UrlModule = null;
|
protected IUrlModule m_UrlModule = null;
|
||||||
|
|
||||||
protected IMaterialsModule m_materialsModule = null;
|
protected IMaterialsModule m_materialsModule = null;
|
||||||
|
protected IEnvironmentModule m_envModule = null;
|
||||||
|
|
||||||
protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>();
|
protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>();
|
||||||
protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
|
protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
|
||||||
|
@ -313,6 +314,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();
|
m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();
|
||||||
m_materialsModule = m_ScriptEngine.World.RequestModuleInterface<IMaterialsModule>();
|
m_materialsModule = m_ScriptEngine.World.RequestModuleInterface<IMaterialsModule>();
|
||||||
|
|
||||||
|
m_envModule = m_ScriptEngine.World.RequestModuleInterface< IEnvironmentModule>();
|
||||||
|
|
||||||
AsyncCommands = new AsyncCommandManager(m_ScriptEngine);
|
AsyncCommands = new AsyncCommandManager(m_ScriptEngine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5694,14 +5697,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_host.ParentGroup.RootPart.aggregateScriptEvents();
|
m_host.ParentGroup.RootPart.aggregateScriptEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Vector llGetSunDirection()
|
|
||||||
{
|
|
||||||
m_host.AddScriptLPS(1);
|
|
||||||
|
|
||||||
Vector3 sun = World.RegionInfo.RegionSettings.SunVector;
|
|
||||||
return new LSL_Vector(sun);
|
|
||||||
}
|
|
||||||
|
|
||||||
public LSL_Vector llGetTextureOffset(int face)
|
public LSL_Vector llGetTextureOffset(int face)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
@ -17432,6 +17427,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public LSL_String llGetAnimationOverride(LSL_String animState)
|
public LSL_String llGetAnimationOverride(LSL_String animState)
|
||||||
{
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
|
ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
|
||||||
if (presence == null)
|
if (presence == null)
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
@ -17483,8 +17480,138 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetDayLength()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return 14400;
|
||||||
|
|
||||||
|
return m_envModule.GetRegionDayLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetRegionDayLength()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return 14400;
|
||||||
|
|
||||||
|
return m_envModule.GetRegionDayLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetDayOffset()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return 57600;
|
||||||
|
|
||||||
|
return m_envModule.GetRegionDayOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetRegionDayOffset()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return 57600;
|
||||||
|
|
||||||
|
return m_envModule.GetRegionDayOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetSunDirection()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Vector3.Zero;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionSunDir(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetRegionSunDirection()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Vector3.Zero;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionSunDir(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetMoonDirection()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Vector3.Zero;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionMoonDir(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetRegionMoonDirection()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Vector3.Zero;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionMoonDir(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetSunRotation()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Quaternion.Identity;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionSunRot(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetRegionSunRotation()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Quaternion.Identity;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionSunRot(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetMoonRotation()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Quaternion.Identity;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionMoonRot(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetRegionMoonRotation()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
if (m_envModule == null)
|
||||||
|
return Quaternion.Identity;
|
||||||
|
|
||||||
|
float z = m_host.GetWorldPosition().Z;
|
||||||
|
return m_envModule.GetRegionMoonRot(z);
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_List llJson2List(LSL_String json)
|
public LSL_List llJson2List(LSL_String json)
|
||||||
{
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(json))
|
if (String.IsNullOrEmpty(json))
|
||||||
return new LSL_List();
|
return new LSL_List();
|
||||||
if(json == "[]")
|
if(json == "[]")
|
||||||
|
@ -18372,5 +18499,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_Integer llGetStartParameter();
|
LSL_Integer llGetStartParameter();
|
||||||
LSL_Integer llGetStatus(int status);
|
LSL_Integer llGetStatus(int status);
|
||||||
LSL_String llGetSubString(string src, int start, int end);
|
LSL_String llGetSubString(string src, int start, int end);
|
||||||
LSL_Vector llGetSunDirection();
|
|
||||||
LSL_String llGetTexture(int face);
|
LSL_String llGetTexture(int face);
|
||||||
LSL_Vector llGetTextureOffset(int face);
|
LSL_Vector llGetTextureOffset(int face);
|
||||||
LSL_Float llGetTextureRot(int side);
|
LSL_Float llGetTextureRot(int side);
|
||||||
|
@ -461,5 +460,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String llList2Json(LSL_String type, LSL_List values);
|
LSL_String llList2Json(LSL_String type, LSL_List values);
|
||||||
LSL_String llJsonSetValue(LSL_String json, LSL_List specifiers, LSL_String value);
|
LSL_String llJsonSetValue(LSL_String json, LSL_List specifiers, LSL_String value);
|
||||||
LSL_String llJsonValueType(LSL_String json, LSL_List specifiers);
|
LSL_String llJsonValueType(LSL_String json, LSL_List specifiers);
|
||||||
|
|
||||||
|
|
||||||
|
LSL_Integer llGetDayLength();
|
||||||
|
LSL_Integer llGetRegionDayLength();
|
||||||
|
LSL_Integer llGetDayOffset();
|
||||||
|
LSL_Integer llGetRegionDayOffset();
|
||||||
|
LSL_Vector llGetSunDirection();
|
||||||
|
LSL_Vector llGetRegionSunDirection();
|
||||||
|
LSL_Vector llGetMoonDirection();
|
||||||
|
LSL_Vector llGetRegionMoonDirection();
|
||||||
|
LSL_Rotation llGetSunRotation();
|
||||||
|
LSL_Rotation llGetRegionSunRotation();
|
||||||
|
LSL_Rotation llGetMoonRotation();
|
||||||
|
LSL_Rotation llGetRegionMoonRotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -821,11 +821,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_LSL_Functions.llGetSubString(src, start, end);
|
return m_LSL_Functions.llGetSubString(src, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Vector llGetSunDirection()
|
|
||||||
{
|
|
||||||
return m_LSL_Functions.llGetSunDirection();
|
|
||||||
}
|
|
||||||
|
|
||||||
public LSL_String llGetTexture(int face)
|
public LSL_String llGetTexture(int face)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llGetTexture(face);
|
return m_LSL_Functions.llGetTexture(face);
|
||||||
|
@ -2110,5 +2105,65 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llJsonValueType(json, specifiers);
|
return m_LSL_Functions.llJsonValueType(json, specifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetDayLength()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetDayLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetRegionDayLength()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionDayLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetDayOffset()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetDayOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llGetRegionDayOffset()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionDayOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetSunDirection()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetSunDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetRegionSunDirection()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionSunDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetMoonDirection()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetMoonDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Vector llGetRegionMoonDirection()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionMoonDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetSunRotation()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetSunRotation();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetRegionSunRotation()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionSunRotation();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetMoonRotation()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetMoonRotation();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Rotation llGetRegionMoonRotation()
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetRegionMoonRotation();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue