From 7837c611fb483dc776b531306d3d791e8f177aab Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 28 Jan 2012 00:00:12 +0000
Subject: Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().
This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension).
Wiki doc on this and other recent NPC functions will follow soon
---
OpenSim/Region/Framework/Interfaces/INPCModule.cs | 34 ++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index b428c40..2731291 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -31,6 +31,19 @@ using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Framework.Interfaces
{
+ ///
+ /// Temporary interface. More methods to come at some point to make NPCs more object oriented rather than
+ /// controlling purely through module level interface calls (e.g. sit/stand).
+ ///
+ public interface INPC
+ {
+ ///
+ /// Should this NPC be sensed by LSL sensors as an 'agent' (interpreted here to mean a normal user)
+ /// rather than an OpenSim specific NPC extension?
+ ///
+ bool SenseAsAgent { get; }
+ }
+
public interface INPCModule
{
///
@@ -39,10 +52,21 @@ namespace OpenSim.Region.Framework.Interfaces
///
///
///
+ ///
+ /// Make the NPC show up as an agent on LSL sensors. The default is that they
+ /// show up as the NPC type instead, but this is currently an OpenSim-only extension.
+ ///
///
/// The avatar appearance to use for the new NPC.
/// The UUID of the ScenePresence created.
- UUID CreateNPC(string firstname, string lastname, Vector3 position, UUID owner, Scene scene, AvatarAppearance appearance);
+ UUID CreateNPC(
+ string firstname,
+ string lastname,
+ Vector3 position,
+ UUID owner,
+ bool senseAsAgent,
+ Scene scene,
+ AvatarAppearance appearance);
///
/// Check if the agent is an NPC.
@@ -53,6 +77,14 @@ namespace OpenSim.Region.Framework.Interfaces
bool IsNPC(UUID agentID, Scene scene);
///
+ /// Get the NPC. This is not currently complete - manipulation of NPCs still occurs through the region interface
+ ///
+ ///
+ ///
+ /// The NPC. null if it does not exist.
+ INPC GetNPC(UUID agentID, Scene scene);
+
+ ///
/// Check if the caller has permission to manipulate the given NPC.
///
///
--
cgit v1.1