From fb1104c0ef3c34100bec3297e41de9f38bb78a45 Mon Sep 17 00:00:00 2001
From: alexiscatnip <alexiscatnip@gmail.com>
Date: Sat, 8 May 2021 01:44:01 +0800
Subject: [PATCH] fixed the asmdef reference issue (hopefully!). removed some
 login errors raised. routed debugging into Debug.Log

---
 Assets/Plugins/Catnip/CatnipAssembly.asmref   |  3 -
 .../Plugins/Catnip/CatnipAssembly.asmref.meta |  7 --
 .../Plugins/{ => LibreMetaverse}/Catnip.meta  |  0
 .../{ => LibreMetaverse}/Catnip/Drawing.meta  |  0
 .../Catnip/Drawing/Bitmap.cs                  |  0
 .../Catnip/Drawing/Bitmap.cs.meta             |  0
 .../Catnip/Drawing/Drawing2D.cs               |  0
 .../Catnip/Drawing/Drawing2D.cs.meta          |  0
 .../Catnip/Drawing/Graphics.cs                |  0
 .../Catnip/Drawing/Graphics.cs.meta           |  0
 .../Catnip/Drawing/Image.cs                   |  0
 .../Catnip/Drawing/Image.cs.meta              |  0
 .../Catnip/Drawing/Imaging.cs                 |  0
 .../Catnip/Drawing/Imaging.cs.meta            |  0
 .../Catnip/Drawing/Rectangle.cs               |  0
 .../Catnip/Drawing/Rectangle.cs.meta          |  0
 .../Catnip/Drawing/Size.cs                    |  0
 .../Catnip/Drawing/Size.cs.meta               |  0
 .../LibreMetaverseAssembly.asmdef             |  4 +-
 Assets/Plugins/LibreMetaverse/Logger.cs       |  2 -
 Assets/Raindrop/RaindropClient.cs             | 76 +++++++++++++------
 Assets/Scenes/SampleScene.unity               |  4 +-
 22 files changed, 58 insertions(+), 38 deletions(-)
 delete mode 100644 Assets/Plugins/Catnip/CatnipAssembly.asmref
 delete mode 100644 Assets/Plugins/Catnip/CatnipAssembly.asmref.meta
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Bitmap.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Bitmap.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Drawing2D.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Drawing2D.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Graphics.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Graphics.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Image.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Image.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Imaging.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Imaging.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Rectangle.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Rectangle.cs.meta (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Size.cs (100%)
 rename Assets/Plugins/{ => LibreMetaverse}/Catnip/Drawing/Size.cs.meta (100%)

diff --git a/Assets/Plugins/Catnip/CatnipAssembly.asmref b/Assets/Plugins/Catnip/CatnipAssembly.asmref
deleted file mode 100644
index 5154302..0000000
--- a/Assets/Plugins/Catnip/CatnipAssembly.asmref
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-    "reference": "GUID:b6ef318018e211441b43da945a1caf13"
-}
\ No newline at end of file
diff --git a/Assets/Plugins/Catnip/CatnipAssembly.asmref.meta b/Assets/Plugins/Catnip/CatnipAssembly.asmref.meta
deleted file mode 100644
index b96b7cf..0000000
--- a/Assets/Plugins/Catnip/CatnipAssembly.asmref.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: e392e90217751074883ae145b1b472ef
-AssemblyDefinitionReferenceImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Assets/Plugins/Catnip.meta b/Assets/Plugins/LibreMetaverse/Catnip.meta
similarity index 100%
rename from Assets/Plugins/Catnip.meta
rename to Assets/Plugins/LibreMetaverse/Catnip.meta
diff --git a/Assets/Plugins/Catnip/Drawing.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Bitmap.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Bitmap.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Bitmap.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Bitmap.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Bitmap.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Bitmap.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Bitmap.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Bitmap.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Drawing2D.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Drawing2D.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Drawing2D.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Drawing2D.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Drawing2D.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Drawing2D.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Drawing2D.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Drawing2D.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Graphics.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Graphics.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Graphics.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Graphics.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Graphics.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Graphics.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Graphics.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Graphics.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Image.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Image.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Image.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Image.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Image.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Image.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Image.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Image.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Imaging.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Imaging.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Imaging.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Imaging.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Imaging.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Imaging.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Imaging.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Imaging.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Rectangle.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Rectangle.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Rectangle.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Rectangle.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Rectangle.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Rectangle.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Rectangle.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Rectangle.cs.meta
diff --git a/Assets/Plugins/Catnip/Drawing/Size.cs b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Size.cs
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Size.cs
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Size.cs
diff --git a/Assets/Plugins/Catnip/Drawing/Size.cs.meta b/Assets/Plugins/LibreMetaverse/Catnip/Drawing/Size.cs.meta
similarity index 100%
rename from Assets/Plugins/Catnip/Drawing/Size.cs.meta
rename to Assets/Plugins/LibreMetaverse/Catnip/Drawing/Size.cs.meta
diff --git a/Assets/Plugins/LibreMetaverse/LibreMetaverseAssembly.asmdef b/Assets/Plugins/LibreMetaverse/LibreMetaverseAssembly.asmdef
index 016719b..e2afbb0 100644
--- a/Assets/Plugins/LibreMetaverse/LibreMetaverseAssembly.asmdef
+++ b/Assets/Plugins/LibreMetaverse/LibreMetaverseAssembly.asmdef
@@ -1,7 +1,9 @@
 {
     "name": "LibreMetaverseAssembly",
     "rootNamespace": "",
-    "references": [],
+    "references": [
+        ""
+    ],
     "includePlatforms": [],
     "excludePlatforms": [],
     "allowUnsafeCode": true,
diff --git a/Assets/Plugins/LibreMetaverse/Logger.cs b/Assets/Plugins/LibreMetaverse/Logger.cs
index fcdea3b..6d1db10 100644
--- a/Assets/Plugins/LibreMetaverse/Logger.cs
+++ b/Assets/Plugins/LibreMetaverse/Logger.cs
@@ -29,7 +29,6 @@ using System.Reflection;
 using log4net;
 using log4net.Appender;
 using log4net.Config;
-using UnityEngine;
 
 [assembly: XmlConfigurator(Watch = true)]
 
@@ -118,7 +117,6 @@ namespace OpenMetaverse
         /// <param name="exception">Exception that was raised</param>
         public static void Log(object message, Helpers.LogLevel level, GridClient client, Exception exception)
         {
-            Debug.Log(message);
 
             if (client != null && client.Settings.LOG_NAMES)
                 message = $"<{client.Self.Name}>: {message}";
diff --git a/Assets/Raindrop/RaindropClient.cs b/Assets/Raindrop/RaindropClient.cs
index b1f308b..770c53f 100644
--- a/Assets/Raindrop/RaindropClient.cs
+++ b/Assets/Raindrop/RaindropClient.cs
@@ -52,10 +52,10 @@ namespace Raindrop
         private void RegisterClientEvents()
         {
             ////register events
-            Client.Appearance.AgentWearablesReply += Appearance_AgentWearablesReply;
-            Client.Appearance.AppearanceSet += Appearance_AppearanceSet;
-            Client.Appearance.CachedBakesReply += Appearance_CachedBakesReply;
-            Client.Appearance.RebakeAvatarRequested += Appearance_RebakeAvatarRequested;
+            //Client.Appearance.AgentWearablesReply += Appearance_AgentWearablesReply;
+            //Client.Appearance.AppearanceSet += Appearance_AppearanceSet;
+            //Client.Appearance.CachedBakesReply += Appearance_CachedBakesReply;
+            //Client.Appearance.RebakeAvatarRequested += Appearance_RebakeAvatarRequested;
 
             ////local chat
             Client.Self.ChatFromSimulator += Self_ChatFromSimulator;
@@ -68,10 +68,35 @@ namespace Raindrop
             Client.Grid.CoarseLocationUpdate += Grid_CoarseLocationUpdate;
             Client.Network.SimChanged += Network_SimChanged;
 
-
+            //log
+            OpenMetaverse.Logger.OnLogMessage += Logger_OnLogMessage;
         }
 
-            internal void setConfigPath(string app_data_Path)
+        private void Logger_OnLogMessage(object message, Helpers.LogLevel level)
+        {
+            if (level == Helpers.LogLevel.Debug)
+            {
+                Debug.Log(message);
+            }
+            else if (level == Helpers.LogLevel.Error)
+            {
+                Debug.LogError(message);
+            }
+            else if (level == Helpers.LogLevel.Info)
+            {
+                Debug.Log(message);
+            }
+            else if (level == Helpers.LogLevel.Warning)
+            {
+                Debug.LogWarning(message);
+            }
+            else 
+            {
+                Debug.LogError(message);
+            }
+        }
+
+        internal void setConfigPath(string app_data_Path)
         {
             this.configdatapath = app_data_Path;
 
@@ -110,6 +135,11 @@ namespace Raindrop
             {
                 Debug.Log("ConnectingToLogin. \n Message: " + e.Message);
 
+            } 
+            else if (e.Status == LoginStatus.ConnectingToSim)
+            {
+                Debug.Log("ConnectingToSim. \n Message: " + e.Message);
+
             }
             else
             {
@@ -127,25 +157,25 @@ namespace Raindrop
             throw new System.NotImplementedException();
         }
 
-        private void Appearance_RebakeAvatarRequested(object sender, RebakeAvatarTexturesEventArgs e)
-        {
-            throw new System.NotImplementedException();
-        }
+        //private void Appearance_RebakeAvatarRequested(object sender, RebakeAvatarTexturesEventArgs e)
+        //{
+        //    throw new System.NotImplementedException();
+        //}
 
-        private void Appearance_CachedBakesReply(object sender, AgentCachedBakesReplyEventArgs e)
-        {
-            throw new System.NotImplementedException();
-        }
+        //private void Appearance_CachedBakesReply(object sender, AgentCachedBakesReplyEventArgs e)
+        //{
+        //    throw new System.NotImplementedException();
+        //}
 
-        private void Appearance_AppearanceSet(object sender, AppearanceSetEventArgs e)
-        {
-            throw new System.NotImplementedException();
-        }
+        //private void Appearance_AppearanceSet(object sender, AppearanceSetEventArgs e)
+        //{
+        //    throw new System.NotImplementedException();
+        //}
 
-        private void Appearance_AgentWearablesReply(object sender, AgentWearablesReplyEventArgs e)
-        {
-            throw new System.NotImplementedException();
-        }
+        //private void Appearance_AgentWearablesReply(object sender, AgentWearablesReplyEventArgs e)
+        //{
+        //    throw new System.NotImplementedException();
+        //}
 
         //connects to SL. username is either format; ie: "firstname lastname" or "Jaken69" are both compaitble.
         public void connectTo(string username, string password)
@@ -169,7 +199,7 @@ namespace Raindrop
                 return;
             }
 
-            var lp = new LoginParams(Global.MainRaindropInstance.Client, _splitname[0], _splitname[1], password, "test", "0.1");
+            var lp = new LoginParams(Global.MainRaindropInstance.Client, _splitname[0], _splitname[1], password, "raindropviewer@gmail.com", "RaindropViewer_0.1");
             Debug.Log("attempt login with name1 " + _splitname[0] + " name 2 " + _splitname[1] + " password " + password);
             Global.MainRaindropInstance.Client.Network.BeginLogin(lp);
 
diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity
index 2dc9b98..a282c7f 100644
--- a/Assets/Scenes/SampleScene.unity
+++ b/Assets/Scenes/SampleScene.unity
@@ -4641,8 +4641,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   modalReference: {fileID: 1999675307}
-  modal_message: 
-  modal_title: 
+  modal_message: login failed!
+  modal_title: login failed!
 --- !u!114 &1999675310
 MonoBehaviour:
   m_ObjectHideFlags: 0
