TC-35 Adds new TestClient inventory commands, cd, ls, and give Patch courtesy of CrisOmega

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1854 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2008-05-11 09:02:59 +00:00
parent 3a55873e27
commit 7a6a7c12ad
5 changed files with 259 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ namespace libsecondlife.TestClient
public LLUUID MasterKey = LLUUID.Zero;
public ClientManager ClientManager;
public VoiceManager VoiceManager;
// Shell-like inventory commands need to be aware of the 'current' inventory folder.
public InventoryFolder CurrentDirectory = null;
private LLQuaternion bodyRotation = LLQuaternion.Identity;
private LLVector3 forward = new LLVector3(0, 0.9999f, 0);
@@ -48,7 +50,7 @@ namespace libsecondlife.TestClient
Settings.USE_TEXTURE_CACHE = true;
Network.RegisterCallback(PacketType.AgentDataUpdate, new NetworkManager.PacketCallback(AgentDataUpdateHandler));
Network.OnLogin += new NetworkManager.LoginCallback(LoginHandler);
Self.OnInstantMessage += new AgentManager.InstantMessageCallback(Self_OnInstantMessage);
Groups.OnGroupMembers += new GroupManager.GroupMembersCallback(GroupMembersHandler);
Inventory.OnObjectOffered += new InventoryManager.ObjectOfferedCallback(Inventory_OnInventoryObjectReceived);
@@ -61,6 +63,20 @@ namespace libsecondlife.TestClient
updateTimer.Start();
}
/// <summary>
/// Initialize everything that needs to be initialized once we're logged in.
/// </summary>
/// <param name="login">The status of the login</param>
/// <param name="message">Error message on failure, MOTD on success.</param>
public void LoginHandler(LoginStatus login, string message)
{
if (login == LoginStatus.Success)
{
// Start in the inventory root folder.
CurrentDirectory = Inventory.Store.RootFolder;
}
}
public void RegisterAllCommands(Assembly assembly)
{
foreach (Type t in assembly.GetTypes())