Moving examples, mapgenerator, and VisualParamGenerator to Programs folder (SVN is seriously ruined still, don't check out yet)
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1961 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenMetaverse.TestClient.Commands.Appearance
|
||||
{
|
||||
public class AvatarInfoCommand : Command
|
||||
{
|
||||
public AvatarInfoCommand(TestClient testClient)
|
||||
{
|
||||
Name = "avatarinfo";
|
||||
Description = "Print out information on a nearby avatar. Usage: avatarinfo [firstname] [lastname]";
|
||||
}
|
||||
|
||||
public override string Execute(string[] args, LLUUID fromAgentID)
|
||||
{
|
||||
if (args.Length != 2)
|
||||
return "Usage: avatarinfo [firstname] [lastname]";
|
||||
|
||||
string targetName = String.Format("{0} {1}", args[0], args[1]);
|
||||
|
||||
Avatar foundAv = Client.Network.CurrentSim.ObjectsAvatars.Find(
|
||||
delegate(Avatar avatar) { return (avatar.Name == targetName); }
|
||||
);
|
||||
|
||||
if (foundAv != null)
|
||||
{
|
||||
StringBuilder output = new StringBuilder();
|
||||
|
||||
output.AppendFormat("{0} ({1})", targetName, foundAv.ID);
|
||||
output.AppendLine();
|
||||
|
||||
for (int i = 0; i < foundAv.Textures.FaceTextures.Length; i++)
|
||||
{
|
||||
if (foundAv.Textures.FaceTextures[i] != null)
|
||||
{
|
||||
LLObject.TextureEntryFace face = foundAv.Textures.FaceTextures[i];
|
||||
AppearanceManager.TextureIndex type = (AppearanceManager.TextureIndex)i;
|
||||
|
||||
output.AppendFormat("{0}: {1}", type, face.TextureID);
|
||||
output.AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
return output.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "No nearby avatar with the name " + targetName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user