Merge branch 'master' into varregion

This commit is contained in:
Robert Adams
2013-10-07 13:58:17 -07:00
68 changed files with 243 additions and 71 deletions

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -32,6 +32,7 @@ using log4net;
using Nini.Config;
using Mono.Addins;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@@ -94,6 +95,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
public virtual void RegionLoaded(Scene scene)
{
if (!m_enabled)
return;
ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>();
if (featuresModule != null)
featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;
}
public virtual void RemoveRegion(Scene scene)
@@ -351,5 +360,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
return true;
}
#region SimulatorFeaturesRequest
static OSDInteger m_SayRange, m_WhisperRange, m_ShoutRange;
private void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features)
{
OSD extras = new OSDMap();
if (features.ContainsKey("OpenSimExtras"))
extras = features["OpenSimExtras"];
else
features["OpenSimExtras"] = extras;
if (m_SayRange == null)
{
// Do this only once
m_SayRange = new OSDInteger(m_saydistance);
m_WhisperRange = new OSDInteger(m_whisperdistance);
m_ShoutRange = new OSDInteger(m_shoutdistance);
}
((OSDMap)extras)["say-range"] = m_SayRange;
((OSDMap)extras)["whisper-range"] = m_WhisperRange;
((OSDMap)extras)["shout-range"] = m_ShoutRange;
}
#endregion
}
}

View File

@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]
[assembly: Addin("OpenSim.Region.CoreModules", "0.1")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]
[assembly: Addin("OpenSim.Region.OptionalModules", "0.1")]

View File

@@ -44,6 +44,20 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
public bool SenseAsAgent { get; set; }
public delegate void ChatToNPC(
string message, byte type, Vector3 fromPos, string fromName,
UUID fromAgentID, UUID ownerID, byte source, byte audible);
/// <summary>
/// Fired when the NPC receives a chat message.
/// </summary>
public event ChatToNPC OnChatToNPC;
/// <summary>
/// Fired when the NPC receives an instant message.
/// </summary>
public event Action<GridInstantMessage> OnInstantMessageToNPC;
private readonly string m_firstname;
private readonly string m_lastname;
private readonly Vector3 m_startPos;
@@ -614,17 +628,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC
string message, byte type, Vector3 fromPos, string fromName,
UUID fromAgentID, UUID ownerID, byte source, byte audible)
{
}
ChatToNPC ctn = OnChatToNPC;
public virtual void SendChatMessage(
byte[] message, byte type, Vector3 fromPos, string fromName,
UUID fromAgentID, UUID ownerID, byte source, byte audible)
{
if (ctn != null)
ctn(message, type, fromPos, fromName, fromAgentID, ownerID, source, audible);
}
public void SendInstantMessage(GridInstantMessage im)
{
Action<GridInstantMessage> oimtn = OnInstantMessageToNPC;
if (oimtn != null)
oimtn(im);
}
public void SendGenericMessage(string method, UUID invoice, List<string> message)

View File

@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.7.6.*")]
[assembly : AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.7.6.*")]
[assembly : AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.7.6.*")]
[assembly : AssemblyVersion("0.8.0.*")]

View File

@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly : AssemblyVersion("0.7.6.*")]
[assembly : AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]

View File

@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.7.6.*")]
[assembly: AssemblyVersion("0.8.0.*")]