From 970249a3c7b1d9cffe88eb8d7075cce6fa8ca3d9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Oct 2013 19:40:43 +0100
Subject: Add OnChatToNPC and OnInstantMessageToNPC messages to NPCAvatar to
allow region modules to directly subscribe to chat and messages received by
NPCs
Currently still requires INPC from NPCModule.GetNPC() to be cast to an NPCAvatar.
---
.../Region/OptionalModules/World/NPC/NPCAvatar.cs | 27 +++++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 9a61702..a895ee1 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -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);
+
+ ///
+ /// Fired when the NPC receives a chat message.
+ ///
+ public event ChatToNPC OnChatToNPC;
+
+ ///
+ /// Fired when the NPC receives an instant message.
+ ///
+ public event Action 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 oimtn = OnInstantMessageToNPC;
+
+ if (oimtn != null)
+ oimtn(im);
}
public void SendGenericMessage(string method, UUID invoice, List message)
--
cgit v1.1
From 42bdf446585007029faf4cd21abd289487f0f797 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 4 Oct 2013 23:33:47 +0100
Subject: Bump OPenSimulator version and assembly versions up to 0.8.0 Dev
---
OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Framework/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs | 2 +-
.../Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/Manager/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs | 2 +-
OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs | 2 +-
.../ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs | 2 +-
19 files changed, 19 insertions(+), 19 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 595d01a..112608b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
index 98ef72f..f8d0c02 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
index bfe0383..9809c86 100644
--- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
index 0e7df07..3d74597 100644
--- a/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
index 167c248..a2a99d4 100644
--- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
index 70bda72..ba0b578 100644
--- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
index 6fd6f7e..ffcb01e 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
@@ -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.*")]
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
index 02b03a8..d069178 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index f611b9a..b8cf624 100644
--- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -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.*")]
diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
index 5da3956..10e850e 100644
--- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
@@ -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.*")]
diff --git a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
index 3de061a..8542753 100644
--- a/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
index f477ed1..288cab5 100644
--- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
@@ -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.*")]
diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
index 4289863..83be103 100644
--- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
@@ -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.*")]
diff --git a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
index 86a3101..c341dfd 100644
--- a/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index 6d218a6..9137c69 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index 5b5c4fd..d163438 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index 48964b6..815d11b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index f0640da..87ea9c4 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
diff --git a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
index 1fff12a..f2d3255 100644
--- a/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.7.6.*")]
+[assembly: AssemblyVersion("0.8.0.*")]
--
cgit v1.1
From 083eb7679b8565757e025d8fe090e9d147fe132d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 4 Oct 2013 17:32:17 -0700
Subject: Added SimulatorFeatures/OpenSimExtras: say-range, whisper-range,
shout-range, at the request of Singularity dev Liru-Dargon
---
.../Region/CoreModules/Avatar/Chat/ChatModule.cs | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 5229c08..27ace68 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -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();
+
+ if (featuresModule != null)
+ featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;
+
}
public virtual void RemoveRegion(Scene scene)
@@ -353,5 +362,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
}
}
\ No newline at end of file
--
cgit v1.1