rename NPC.Autopilot to NPC.MoveToTarget internally. Add method doc to INPCModule
parent
31cea17f8e
commit
61d49d4f63
|
@ -32,9 +32,39 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
{
|
||||
public interface INPCModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Create an NPC
|
||||
/// </summary>
|
||||
/// <param name="firstname"></param>
|
||||
/// <param name="lastname"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="cloneAppearanceFrom">The UUID of the avatar from which to clone the NPC's appearance from.</param>
|
||||
/// <returns>The UUID of the ScenePresence created.</returns>
|
||||
UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, UUID cloneAppearanceFrom);
|
||||
void Autopilot(UUID agentID, Scene scene, Vector3 pos);
|
||||
|
||||
/// <summary>
|
||||
/// Move an NPC to a target over time.
|
||||
/// </summary>
|
||||
/// <param name="agentID">The UUID of the NPC</param>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="pos"></param>
|
||||
void MoveToTarget(UUID agentID, Scene scene, Vector3 pos);
|
||||
|
||||
/// <summary>
|
||||
/// Get the NPC to say something.
|
||||
/// </summary>
|
||||
/// <param name="agentID">The UUID of the NPC</param>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="text"></param>
|
||||
void Say(UUID agentID, Scene scene, string text);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Delete an NPC.
|
||||
/// </summary>
|
||||
/// <param name="agentID">The UUID of the NPC</param>
|
||||
/// <param name="scene"></param>
|
||||
void DeleteNPC(UUID agentID, Scene scene);
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue