mirror of
https://github.com/opensim/opensim.git
synced 2026-06-30 19:37:01 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Interfaces/IEstateModule.cs
This commit is contained in:
@@ -3095,5 +3095,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
return ScriptBaseClass.TRUE;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets terrain estate texture
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="texture"></param>
|
||||
/// <returns></returns>
|
||||
public void osSetTerrainTexture(int level, LSL_Key texture)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
//Check to make sure that the script's owner is the estate manager/master
|
||||
//World.Permissions.GenericEstatePermission(
|
||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
||||
{
|
||||
if (level < 0 || level > 3)
|
||||
return;
|
||||
|
||||
UUID textureID = new UUID();
|
||||
if (!UUID.TryParse(texture, out textureID))
|
||||
return;
|
||||
|
||||
// estate module is required
|
||||
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
|
||||
if (estate != null)
|
||||
estate.setEstateTerrainBaseTexture(level, textureID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets terrain heights of estate
|
||||
/// </summary>
|
||||
/// <param name="corner"></param>
|
||||
/// <param name="low"></param>
|
||||
/// <param name="high"></param>
|
||||
/// <returns></returns>
|
||||
public void osSetTerrainTextureHeight(int corner, double low, double high)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
//Check to make sure that the script's owner is the estate manager/master
|
||||
//World.Permissions.GenericEstatePermission(
|
||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
||||
{
|
||||
if (corner < 0 || corner > 3)
|
||||
return;
|
||||
|
||||
// estate module is required
|
||||
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
|
||||
if (estate != null)
|
||||
estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,5 +234,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
|
||||
LSL_Integer osInviteToGroup(LSL_Key agentId);
|
||||
LSL_Integer osEjectFromGroup(LSL_Key agentId);
|
||||
|
||||
void osSetTerrainTexture(int level, LSL_Key texture);
|
||||
void osSetTerrainTextureHeight(int corner, double low, double high);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -878,5 +878,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
return m_OSSL_Functions.osEjectFromGroup(agentId);
|
||||
}
|
||||
|
||||
public void osSetTerrainTexture(int level, LSL_Key texture)
|
||||
{
|
||||
m_OSSL_Functions.osSetTerrainTexture(level, texture);
|
||||
}
|
||||
|
||||
public void osSetTerrainTextureHeight(int corner, double low, double high)
|
||||
{
|
||||
m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user