mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Merge branch 'master' into httptests
This commit is contained in:
@@ -6307,6 +6307,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
return World.RegionInfo.ObjectCapacity.ToString();
|
||||
}
|
||||
else if (name == "region_object_bonus")
|
||||
{
|
||||
return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
|
||||
@@ -3001,7 +3001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void osNpcSetProfileAbout(LSL_Key npc, string about)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
|
||||
CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||
@@ -3018,6 +3018,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public void osNpcSetProfileImage(LSL_Key npc, string image)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||
if (module != null)
|
||||
{
|
||||
UUID npcId = new UUID(npc.m_string);
|
||||
|
||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||
return;
|
||||
|
||||
UUID ImageID = new UUID();
|
||||
|
||||
ImageID = ScriptUtils.GetAssetIdFromItemName(m_host, image, (int)AssetType.Texture);
|
||||
|
||||
if (ImageID == null || ImageID == UUID.Zero)
|
||||
{
|
||||
if (!UUID.TryParse(image, out ImageID))
|
||||
return;
|
||||
}
|
||||
|
||||
ScenePresence sp = World.GetScenePresence(npcId);
|
||||
if (sp != null)
|
||||
((INPC)(sp.ControllingClient)).profileImage = ImageID;
|
||||
}
|
||||
}
|
||||
|
||||
public void osNpcSay(LSL_Key npc, string message)
|
||||
{
|
||||
osNpcSay(npc, 0, message);
|
||||
|
||||
@@ -344,6 +344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void osNpcSetRot(LSL_Key npc, rotation rot);
|
||||
void osNpcStopMoveToTarget(LSL_Key npc);
|
||||
void osNpcSetProfileAbout(LSL_Key npc, string about);
|
||||
void osNpcSetProfileImage(LSL_Key npc, string image);
|
||||
void osNpcSay(key npc, string message);
|
||||
void osNpcSay(key npc, int channel, string message);
|
||||
void osNpcShout(key npc, int channel, string message);
|
||||
|
||||
@@ -642,6 +642,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
|
||||
}
|
||||
|
||||
public void osNpcSetProfileImage(LSL_Key npc, string image)
|
||||
{
|
||||
m_OSSL_Functions.osNpcSetProfileImage(npc, image);
|
||||
}
|
||||
|
||||
public void osNpcSay(key npc, string message)
|
||||
{
|
||||
m_OSSL_Functions.osNpcSay(npc, message);
|
||||
|
||||
Reference in New Issue
Block a user