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,45 @@
|
||||
using System;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenMetaverse.TestClient
|
||||
{
|
||||
public class WearCommand : Command
|
||||
{
|
||||
public WearCommand(TestClient testClient)
|
||||
{
|
||||
Client = testClient;
|
||||
Name = "wear";
|
||||
Description = "Wear an outfit folder from inventory. Usage: wear [outfit name] [nobake]";
|
||||
}
|
||||
|
||||
public override string Execute(string[] args, LLUUID fromAgentID)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
return "Usage: wear [outfit name] eg: 'wear /My Outfit/Dance Party";
|
||||
|
||||
string target = String.Empty;
|
||||
bool bake = true;
|
||||
|
||||
for (int ct = 0; ct < args.Length; ct++)
|
||||
{
|
||||
if (args[ct].Equals("nobake"))
|
||||
bake = false;
|
||||
else
|
||||
target = target + args[ct] + " ";
|
||||
}
|
||||
|
||||
target = target.TrimEnd();
|
||||
|
||||
try
|
||||
{
|
||||
Client.Appearance.WearOutfit(target.Split('/'), bake);
|
||||
}
|
||||
catch (InvalidOutfitException ex)
|
||||
{
|
||||
return "Invalid outfit (" + ex.Message + ")";
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user