Adding --gettextures command line to TestClient to enable automatic texture downloading. "textures [on/off]" will also globally enable/disable texture downloading
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2287 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -42,19 +42,20 @@ namespace OpenMetaverse.TestClient
|
||||
public Dictionary<Simulator, Dictionary<uint, Primitive>> SimPrims = new Dictionary<Simulator, Dictionary<uint, Primitive>>();
|
||||
|
||||
public bool Running = true;
|
||||
public bool GetTextures = false;
|
||||
|
||||
string version = "1.0.0";
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="accounts"></param>
|
||||
public ClientManager(List<LoginDetails> accounts)
|
||||
public ClientManager(List<LoginDetails> accounts, bool getTextures)
|
||||
{
|
||||
foreach (LoginDetails account in accounts)
|
||||
Login(account);
|
||||
}
|
||||
|
||||
public ClientManager(List<LoginDetails> accounts, string s)
|
||||
public ClientManager(List<LoginDetails> accounts, string s, bool getTextures)
|
||||
{
|
||||
char sep = '/';
|
||||
string[] startbits = s.Split(sep);
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
public TexturesCommand(TestClient testClient)
|
||||
{
|
||||
enabled = testClient.ClientManager.GetTextures;
|
||||
|
||||
Name = "textures";
|
||||
Description = "Turns automatic texture downloading on or off. Usage: textures [on/off]";
|
||||
Category = CommandCategory.Objects;
|
||||
@@ -27,12 +29,12 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
if (args[0].ToLower() == "on")
|
||||
{
|
||||
enabled = true;
|
||||
Client.ClientManager.GetTextures = enabled = true;
|
||||
return "Texture downloading is on";
|
||||
}
|
||||
else if (args[0].ToLower() == "off")
|
||||
{
|
||||
enabled = false;
|
||||
Client.ClientManager.GetTextures = enabled = false;
|
||||
return "Texture downloading is off";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace OpenMetaverse.TestClient
|
||||
private static void Usage()
|
||||
{
|
||||
Console.WriteLine("Usage: " + Environment.NewLine +
|
||||
"TestClient.exe --first firstname --last lastname --pass password --contact \"youremail\" [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] --loginuri=\"uri\"");
|
||||
"TestClient.exe --first firstname --last lastname --pass password [--loginuri=\"uri\"] [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--gettextures]");
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
@@ -29,6 +29,7 @@ namespace OpenMetaverse.TestClient
|
||||
UUID masterKey = UUID.Zero;
|
||||
string file = String.Empty;
|
||||
string loginuri = String.Empty;
|
||||
bool getTextures = false;
|
||||
|
||||
if (arguments["groupcommands"] != null)
|
||||
groupCommands = true;
|
||||
@@ -42,6 +43,9 @@ namespace OpenMetaverse.TestClient
|
||||
if (arguments["loginuri"] != null)
|
||||
loginuri = arguments["loginuri"];
|
||||
|
||||
if (arguments["gettextures"] != null)
|
||||
getTextures = true;
|
||||
|
||||
if (arguments["file"] != null)
|
||||
{
|
||||
file = arguments["file"];
|
||||
@@ -116,9 +120,9 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
// Login the accounts and run the input loop
|
||||
if (arguments["startpos"] != null)
|
||||
manager = new ClientManager(accounts, arguments["startpos"]);
|
||||
manager = new ClientManager(accounts, arguments["startpos"], getTextures);
|
||||
else
|
||||
manager = new ClientManager(accounts);
|
||||
manager = new ClientManager(accounts, getTextures);
|
||||
|
||||
manager.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user