From 61d49d4f63eafa68d0b63877029da3475d977263 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 3 Aug 2011 23:20:36 +0100
Subject: rename NPC.Autopilot to NPC.MoveToTarget internally. Add method doc
to INPCModule
---
OpenSim/Region/Framework/Interfaces/INPCModule.cs | 32 +++++++++++++++++++++-
.../Region/OptionalModules/World/NPC/NPCModule.cs | 2 +-
.../World/NPC/Tests/NPCModuleTests.cs | 2 +-
.../Shared/Api/Implementation/OSSL_Api.cs | 2 +-
4 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 21a755f..fa8d6b6 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -32,9 +32,39 @@ namespace OpenSim.Region.Framework.Interfaces
{
public interface INPCModule
{
+ ///
+ /// Create an NPC
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The UUID of the avatar from which to clone the NPC's appearance from.
+ /// The UUID of the ScenePresence created.
UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, UUID cloneAppearanceFrom);
- void Autopilot(UUID agentID, Scene scene, Vector3 pos);
+
+ ///
+ /// Move an NPC to a target over time.
+ ///
+ /// The UUID of the NPC
+ ///
+ ///
+ void MoveToTarget(UUID agentID, Scene scene, Vector3 pos);
+
+ ///
+ /// Get the NPC to say something.
+ ///
+ /// The UUID of the NPC
+ ///
+ ///
void Say(UUID agentID, Scene scene, string text);
+
+
+ ///
+ /// Delete an NPC.
+ ///
+ /// The UUID of the NPC
+ ///
void DeleteNPC(UUID agentID, Scene scene);
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 1d88e43..f9c41d7 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -177,7 +177,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
return npcAvatar.AgentId;
}
- public void Autopilot(UUID agentID, Scene scene, Vector3 pos)
+ public void MoveToTarget(UUID agentID, Scene scene, Vector3 pos)
{
lock (m_avatars)
{
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 512405a..2e3d431 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
Vector3 targetPos = new Vector3(128, 128, 40);
- npcModule.Autopilot(npc.UUID, scene, targetPos);
+ npcModule.MoveToTarget(npc.UUID, scene, targetPos);
Assert.That(npc.AbsolutePosition, Is.EqualTo(startPos));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b710229..8093502 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2110,7 +2110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (module != null)
{
Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z);
- module.Autopilot(new UUID(npc.m_string), World, pos);
+ module.MoveToTarget(new UUID(npc.m_string), World, pos);
}
}
--
cgit v1.1